From bfb3689c7a4bdf5339f34797049553c4efdb7bd9 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Tue, 3 Jul 2018 07:08:35 +0200 Subject: [PATCH 01/14] CS translation update public_server THX Aditoo --- public_server/lang/cs/messages.po | 15 ++++++++------- public_server/lang/cs/strings.php | 10 ++++++++++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/public_server/lang/cs/messages.po b/public_server/lang/cs/messages.po index 6cd521a5..c00d525b 100644 --- a/public_server/lang/cs/messages.po +++ b/public_server/lang/cs/messages.po @@ -4,20 +4,21 @@ # # # Translators: -# Michal Šupler , 2014 +# Aditoo, 2018 +# michal_s , 2014 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2014-10-15 09:02+0000\n" -"Last-Translator: fabrixxm \n" -"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n" +"PO-Revision-Date: 2018-07-02 14:25+0000\n" +"Last-Translator: Aditoo\n" +"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: cs\n" -"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" +"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" #: public_server.php:62 msgid "Administrator" @@ -30,7 +31,7 @@ msgstr "Platnost Vašeho účtu na %s vyprší během několika dní." #: public_server.php:127 msgid "Your Friendica account is about to expire." -msgstr "Vašemu účetu Friendica brzy vyprší platnost" +msgstr "Váš účet na Frendica brzy vyprší." #: public_server.php:128 #, php-format @@ -38,4 +39,4 @@ msgid "" "Hi %1$s,\n" "\n" "Your account on %2$s will expire in less than five days. You may keep your account by logging in at least once every 30 days" -msgstr "Ahoj %1$s,\n\nVáš účet na %2$s vyprší v méně než pěti dnech. Svůj účet si zachováte, pokud se přihlásíte alespoň jednou za každých 30 dní." +msgstr "Dobrý den, %1$s,\n\nVáš účet na %2$s vyprší za méně než pět dní. Svůj účet si zachováte, pokud se přihlásíte alespoň jednou za každých 30 dní." diff --git a/public_server/lang/cs/strings.php b/public_server/lang/cs/strings.php index a4abe2da..0d6c5118 100644 --- a/public_server/lang/cs/strings.php +++ b/public_server/lang/cs/strings.php @@ -1,2 +1,12 @@ = 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;; +}} +; +$a->strings["Administrator"] = "Administrátor"; +$a->strings["Your account on %s will expire in a few days."] = "Platnost Vašeho účtu na %s vyprší během několika dní."; +$a->strings["Your Friendica account is about to expire."] = "Váš účet na Frendica brzy vyprší."; +$a->strings["Hi %1\$s,\n\nYour account on %2\$s will expire in less than five days. You may keep your account by logging in at least once every 30 days"] = "Dobrý den, %1\$s,\n\nVáš účet na %2\$s vyprší za méně než pět dní. Svůj účet si zachováte, pokud se přihlásíte alespoň jednou za každých 30 dní."; -- 2.40.1 From 8b93ef0fe9763bacda7b3420e1b2f98d58e66498 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 4 Jul 2018 07:33:57 +0200 Subject: [PATCH 02/14] CS translation morepokes, numfriends THX Aditoo --- morepokes/lang/cs/messages.po | 42 +++++++++++++++++----------------- morepokes/lang/cs/strings.php | 40 ++++++++++++++++---------------- numfriends/lang/cs/messages.po | 15 ++++++------ numfriends/lang/cs/strings.php | 7 +++--- 4 files changed, 53 insertions(+), 51 deletions(-) diff --git a/morepokes/lang/cs/messages.po b/morepokes/lang/cs/messages.po index 34c7f9b5..df515f7d 100644 --- a/morepokes/lang/cs/messages.po +++ b/morepokes/lang/cs/messages.po @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2018-06-24 17:19+0000\n" +"PO-Revision-Date: 2018-07-03 15:20+0000\n" "Last-Translator: Aditoo\n" "Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n" "MIME-Version: 1.0\n" @@ -26,15 +26,15 @@ msgstr "dát facku" #: morepokes.php:19 msgid "bitchslapped" -msgstr "dal facku" +msgstr "dal/a facku" #: morepokes.php:20 msgid "shag" -msgstr "ošoustat" +msgstr "pomilovat" #: morepokes.php:20 msgid "shagged" -msgstr "ošoustal" +msgstr "pomiloval/a" #: morepokes.php:21 msgid "do something obscenely biological to" @@ -42,7 +42,7 @@ msgstr "udělat něco obscéně biologického uživateli" #: morepokes.php:21 msgid "did something obscenely biological to" -msgstr "udělal něco obscéně biologického uživateli" +msgstr "udělal/a něco obscéně biologického uživateli" #: morepokes.php:22 msgid "point out the poke feature to" @@ -50,7 +50,7 @@ msgstr "upozornit na funkci šťouchnutí" #: morepokes.php:22 msgid "pointed out the poke feature to" -msgstr "upozornil na funkci šťouchnutí" +msgstr "upozornil/a na funkci šťouchnutí" #: morepokes.php:23 msgid "declare undying love for" @@ -58,7 +58,7 @@ msgstr "vyjadřit nehynoucí lásku ke" #: morepokes.php:23 msgid "declared undying love for" -msgstr "vyjadřil nehynoucí lásku ke" +msgstr "vyjadřil/a nehynoucí lásku ke" #: morepokes.php:24 msgid "patent" @@ -66,7 +66,7 @@ msgstr "patentovat" #: morepokes.php:24 msgid "patented" -msgstr "patentoval" +msgstr "patentoval/a" #: morepokes.php:25 msgid "stroke beard" @@ -74,7 +74,7 @@ msgstr "pohladit plnovous" #: morepokes.php:25 msgid "stroked their beard at" -msgstr "pohladil jeho/její plnovous na" +msgstr "pohladil/a jeho/její plnovous na" #: morepokes.php:26 msgid "" @@ -85,7 +85,7 @@ msgstr "stěžovat si na klesající úroveň moderního sekundárního a terci msgid "" "bemoans the declining standards of modern secondary and tertiary education " "to" -msgstr "si stěžoval na klesající úroveň moderního sekundárního a terciárního vzdělávání u" +msgstr "si stěžuje na klesající úroveň moderního sekundárního a terciárního vzdělávání u" #: morepokes.php:27 msgid "hug" @@ -93,7 +93,7 @@ msgstr "obejmout" #: morepokes.php:27 msgid "hugged" -msgstr "obejmut " +msgstr "obejmul/a" #: morepokes.php:28 msgid "kiss" @@ -101,7 +101,7 @@ msgstr "políbit" #: morepokes.php:28 msgid "kissed" -msgstr "políbil" +msgstr "políbil/a" #: morepokes.php:29 msgid "raise eyebrows at" @@ -109,7 +109,7 @@ msgstr "zvednout obočí na" #: morepokes.php:29 msgid "raised their eyebrows at" -msgstr "zvednul obočí na" +msgstr "zvedl/a obočí na" #: morepokes.php:30 msgid "insult" @@ -117,7 +117,7 @@ msgstr "urazit" #: morepokes.php:30 msgid "insulted" -msgstr "urazil" +msgstr "urazil/a" #: morepokes.php:31 msgid "praise" @@ -125,7 +125,7 @@ msgstr "pochválit" #: morepokes.php:31 msgid "praised" -msgstr "pochválil" +msgstr "pochválil/a" #: morepokes.php:32 msgid "be dubious of" @@ -133,7 +133,7 @@ msgstr "mít pochyby o" #: morepokes.php:32 msgid "was dubious of" -msgstr "měl pochyby o" +msgstr "měl/a pochyby o" #: morepokes.php:33 msgid "eat" @@ -141,15 +141,15 @@ msgstr "sníst" #: morepokes.php:33 msgid "ate" -msgstr "snědl" +msgstr "snědl/a" #: morepokes.php:34 msgid "giggle and fawn at" -msgstr "hihňat se" +msgstr "hihňat se na" #: morepokes.php:34 msgid "giggled and fawned at" -msgstr "se hihňal" +msgstr "se hihňal/a na" #: morepokes.php:35 msgid "doubt" @@ -157,7 +157,7 @@ msgstr "pochybovat" #: morepokes.php:35 msgid "doubted" -msgstr "pochyboval" +msgstr "zapochyboval/a o" #: morepokes.php:36 msgid "glare" @@ -165,4 +165,4 @@ msgstr "zabodávát pohledem" #: morepokes.php:36 msgid "glared at" -msgstr "zabodával pohledem " +msgstr "zabodával/a pohledem " diff --git a/morepokes/lang/cs/strings.php b/morepokes/lang/cs/strings.php index f00fcae7..6ba868e6 100644 --- a/morepokes/lang/cs/strings.php +++ b/morepokes/lang/cs/strings.php @@ -7,38 +7,38 @@ function string_plural_select_cs($n){ }} ; $a->strings["bitchslap"] = "dát facku"; -$a->strings["bitchslapped"] = "dal facku"; -$a->strings["shag"] = "ošoustat"; -$a->strings["shagged"] = "ošoustal"; +$a->strings["bitchslapped"] = "dal/a facku"; +$a->strings["shag"] = "pomilovat"; +$a->strings["shagged"] = "pomiloval/a"; $a->strings["do something obscenely biological to"] = "udělat něco obscéně biologického uživateli"; -$a->strings["did something obscenely biological to"] = "udělal něco obscéně biologického uživateli"; +$a->strings["did something obscenely biological to"] = "udělal/a něco obscéně biologického uživateli"; $a->strings["point out the poke feature to"] = "upozornit na funkci šťouchnutí"; -$a->strings["pointed out the poke feature to"] = "upozornil na funkci šťouchnutí"; +$a->strings["pointed out the poke feature to"] = "upozornil/a na funkci šťouchnutí"; $a->strings["declare undying love for"] = "vyjadřit nehynoucí lásku ke"; -$a->strings["declared undying love for"] = "vyjadřil nehynoucí lásku ke"; +$a->strings["declared undying love for"] = "vyjadřil/a nehynoucí lásku ke"; $a->strings["patent"] = "patentovat"; -$a->strings["patented"] = "patentoval"; +$a->strings["patented"] = "patentoval/a"; $a->strings["stroke beard"] = "pohladit plnovous"; -$a->strings["stroked their beard at"] = "pohladil jeho/její plnovous na"; +$a->strings["stroked their beard at"] = "pohladil/a jeho/její plnovous na"; $a->strings["bemoan the declining standards of modern secondary and tertiary education to"] = "stěžovat si na klesající úroveň moderního sekundárního a terciárního vzdělávání u"; -$a->strings["bemoans the declining standards of modern secondary and tertiary education to"] = "si stěžoval na klesající úroveň moderního sekundárního a terciárního vzdělávání u"; +$a->strings["bemoans the declining standards of modern secondary and tertiary education to"] = "si stěžuje na klesající úroveň moderního sekundárního a terciárního vzdělávání u"; $a->strings["hug"] = "obejmout"; -$a->strings["hugged"] = "obejmut "; +$a->strings["hugged"] = "obejmul/a"; $a->strings["kiss"] = "políbit"; -$a->strings["kissed"] = "políbil"; +$a->strings["kissed"] = "políbil/a"; $a->strings["raise eyebrows at"] = "zvednout obočí na"; -$a->strings["raised their eyebrows at"] = "zvednul obočí na"; +$a->strings["raised their eyebrows at"] = "zvedl/a obočí na"; $a->strings["insult"] = "urazit"; -$a->strings["insulted"] = "urazil"; +$a->strings["insulted"] = "urazil/a"; $a->strings["praise"] = "pochválit"; -$a->strings["praised"] = "pochválil"; +$a->strings["praised"] = "pochválil/a"; $a->strings["be dubious of"] = "mít pochyby o"; -$a->strings["was dubious of"] = "měl pochyby o"; +$a->strings["was dubious of"] = "měl/a pochyby o"; $a->strings["eat"] = "sníst"; -$a->strings["ate"] = "snědl"; -$a->strings["giggle and fawn at"] = "hihňat se"; -$a->strings["giggled and fawned at"] = "se hihňal"; +$a->strings["ate"] = "snědl/a"; +$a->strings["giggle and fawn at"] = "hihňat se na"; +$a->strings["giggled and fawned at"] = "se hihňal/a na"; $a->strings["doubt"] = "pochybovat"; -$a->strings["doubted"] = "pochyboval"; +$a->strings["doubted"] = "zapochyboval/a o"; $a->strings["glare"] = "zabodávát pohledem"; -$a->strings["glared at"] = "zabodával pohledem "; +$a->strings["glared at"] = "zabodával/a pohledem "; diff --git a/numfriends/lang/cs/messages.po b/numfriends/lang/cs/messages.po index 89e454b1..1c2b092e 100644 --- a/numfriends/lang/cs/messages.po +++ b/numfriends/lang/cs/messages.po @@ -4,24 +4,25 @@ # # # Translators: -# Michal Šupler , 2014-2015 +# Aditoo, 2018 +# michal_s , 2014-2015 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2015-02-11 19:38+0000\n" -"Last-Translator: Michal Šupler \n" -"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n" +"PO-Revision-Date: 2018-07-03 14:45+0000\n" +"Last-Translator: Aditoo\n" +"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: cs\n" -"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" +"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" #: numfriends.php:46 msgid "Numfriends settings updated." -msgstr "Numfriends nastavení aktualizováno" +msgstr "Nastavení Numfriends aktualizováno" #: numfriends.php:77 msgid "Numfriends Settings" @@ -29,7 +30,7 @@ msgstr "Nastavení Numfriends" #: numfriends.php:79 msgid "How many contacts to display on profile sidebar" -msgstr "Kolik kontaktů zobrazit na profilovém bočním menu" +msgstr "Kolik kontaktů zobrazit na profilové postranní liště" #: numfriends.php:85 msgid "Submit" diff --git a/numfriends/lang/cs/strings.php b/numfriends/lang/cs/strings.php index 32f2232b..e8565071 100644 --- a/numfriends/lang/cs/strings.php +++ b/numfriends/lang/cs/strings.php @@ -2,10 +2,11 @@ if(! function_exists("string_plural_select_cs")) { function string_plural_select_cs($n){ - return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;; + $n = intval($n); + return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;; }} ; -$a->strings["Numfriends settings updated."] = "Numfriends nastavení aktualizováno"; +$a->strings["Numfriends settings updated."] = "Nastavení Numfriends aktualizováno"; $a->strings["Numfriends Settings"] = "Nastavení Numfriends"; -$a->strings["How many contacts to display on profile sidebar"] = "Kolik kontaktů zobrazit na profilovém bočním menu"; +$a->strings["How many contacts to display on profile sidebar"] = "Kolik kontaktů zobrazit na profilové postranní liště"; $a->strings["Submit"] = "Odeslat"; -- 2.40.1 From 50ec0b800c439677350f18f200815fb2d9d7704e Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Fri, 6 Jul 2018 06:32:21 +0200 Subject: [PATCH 03/14] uCS translation of the curweather addon THX Aditoo --- curweather/lang/cs/messages.po | 9 +++++---- curweather/lang/cs/strings.php | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/curweather/lang/cs/messages.po b/curweather/lang/cs/messages.po index 256502c6..389550eb 100644 --- a/curweather/lang/cs/messages.po +++ b/curweather/lang/cs/messages.po @@ -4,15 +4,16 @@ # # # Translators: -# Lorem Ipsum , 2018 +# Aditoo, 2018 +# Aditoo, 2018 # michal_s , 2014-2015 msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-09-25 17:17+0200\n" -"PO-Revision-Date: 2018-06-09 09:44+0000\n" -"Last-Translator: Lorem Ipsum \n" +"PO-Revision-Date: 2018-07-05 17:03+0000\n" +"Last-Translator: Aditoo\n" "Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -88,7 +89,7 @@ msgstr "Vaše poloha" msgid "" "Identifier of your location (name or zip code), e.g. Berlin,DE or " "14476,DE." -msgstr "Identifikátor vaší polohy (název nebo PSČ), např. Berlin,DE nebo 14476,DE" +msgstr "Identifikátor vaší polohy (název nebo PSČ), např. Praha,CZ nebo 11000,CZ." #: curweather.php:176 msgid "Units" diff --git a/curweather/lang/cs/strings.php b/curweather/lang/cs/strings.php index 482489b1..565fe7d7 100644 --- a/curweather/lang/cs/strings.php +++ b/curweather/lang/cs/strings.php @@ -22,7 +22,7 @@ $a->strings["Save Settings"] = "Uložit nastavení"; $a->strings["Settings"] = "Nastavení"; $a->strings["Enter either the name of your location or the zip code."] = "Zadejte buď název místa, kde se nacházíte, nebo PSČ."; $a->strings["Your Location"] = "Vaše poloha"; -$a->strings["Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE."] = "Identifikátor vaší polohy (název nebo PSČ), např. Berlin,DE nebo 14476,DE"; +$a->strings["Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE."] = "Identifikátor vaší polohy (název nebo PSČ), např. Praha,CZ nebo 11000,CZ."; $a->strings["Units"] = "Jednotky"; $a->strings["select if the temperature should be displayed in °C or °F"] = "vyberte, jestli by se teplota měla zobrazovat v °C či °F"; $a->strings["Show weather data"] = "Ukázat data o počasí"; -- 2.40.1 From b490c01e5930a8057e70287a4afaead64d42272e Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 7 Jul 2018 11:24:37 +0200 Subject: [PATCH 04/14] morepokes translation update THX Aditoo --- morepokes/lang/cs/messages.po | 18 +++++++++--------- morepokes/lang/cs/strings.php | 16 ++++++++-------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/morepokes/lang/cs/messages.po b/morepokes/lang/cs/messages.po index df515f7d..b5dd60b9 100644 --- a/morepokes/lang/cs/messages.po +++ b/morepokes/lang/cs/messages.po @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-02-27 05:01-0500\n" -"PO-Revision-Date: 2018-07-03 15:20+0000\n" +"PO-Revision-Date: 2018-07-06 18:55+0000\n" "Last-Translator: Aditoo\n" "Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n" "MIME-Version: 1.0\n" @@ -38,11 +38,11 @@ msgstr "pomiloval/a" #: morepokes.php:21 msgid "do something obscenely biological to" -msgstr "udělat něco obscéně biologického uživateli" +msgstr "udělat příjemci něco obscéně biologického" #: morepokes.php:21 msgid "did something obscenely biological to" -msgstr "udělal/a něco obscéně biologického uživateli" +msgstr "udělal/a něco obscéně biologického" #: morepokes.php:22 msgid "point out the poke feature to" @@ -54,11 +54,11 @@ msgstr "upozornil/a na funkci šťouchnutí" #: morepokes.php:23 msgid "declare undying love for" -msgstr "vyjadřit nehynoucí lásku ke" +msgstr "vyjadřit nehynoucí lásku" #: morepokes.php:23 msgid "declared undying love for" -msgstr "vyjadřil/a nehynoucí lásku ke" +msgstr "vyjadřil/a nehynoucí lásku k uživateli" #: morepokes.php:24 msgid "patent" @@ -66,7 +66,7 @@ msgstr "patentovat" #: morepokes.php:24 msgid "patented" -msgstr "patentoval/a" +msgstr "patentoval/a uživatele" #: morepokes.php:25 msgid "stroke beard" @@ -74,18 +74,18 @@ msgstr "pohladit plnovous" #: morepokes.php:25 msgid "stroked their beard at" -msgstr "pohladil/a jeho/její plnovous na" +msgstr "pohladil/a plnovous" #: morepokes.php:26 msgid "" "bemoan the declining standards of modern secondary and tertiary education to" -msgstr "stěžovat si na klesající úroveň moderního sekundárního a terciárního vzdělávání u" +msgstr "stěžovat si příjemci na klesající úroveň moderního sekundárního a terciárního vzdělávání" #: morepokes.php:26 msgid "" "bemoans the declining standards of modern secondary and tertiary education " "to" -msgstr "si stěžuje na klesající úroveň moderního sekundárního a terciárního vzdělávání u" +msgstr "si stěžuje na klesající úroveň moderního sekundárního a terciárního vzdělávání" #: morepokes.php:27 msgid "hug" diff --git a/morepokes/lang/cs/strings.php b/morepokes/lang/cs/strings.php index 6ba868e6..86114ca6 100644 --- a/morepokes/lang/cs/strings.php +++ b/morepokes/lang/cs/strings.php @@ -10,18 +10,18 @@ $a->strings["bitchslap"] = "dát facku"; $a->strings["bitchslapped"] = "dal/a facku"; $a->strings["shag"] = "pomilovat"; $a->strings["shagged"] = "pomiloval/a"; -$a->strings["do something obscenely biological to"] = "udělat něco obscéně biologického uživateli"; -$a->strings["did something obscenely biological to"] = "udělal/a něco obscéně biologického uživateli"; +$a->strings["do something obscenely biological to"] = "udělat příjemci něco obscéně biologického"; +$a->strings["did something obscenely biological to"] = "udělal/a něco obscéně biologického"; $a->strings["point out the poke feature to"] = "upozornit na funkci šťouchnutí"; $a->strings["pointed out the poke feature to"] = "upozornil/a na funkci šťouchnutí"; -$a->strings["declare undying love for"] = "vyjadřit nehynoucí lásku ke"; -$a->strings["declared undying love for"] = "vyjadřil/a nehynoucí lásku ke"; +$a->strings["declare undying love for"] = "vyjadřit nehynoucí lásku"; +$a->strings["declared undying love for"] = "vyjadřil/a nehynoucí lásku k uživateli"; $a->strings["patent"] = "patentovat"; -$a->strings["patented"] = "patentoval/a"; +$a->strings["patented"] = "patentoval/a uživatele"; $a->strings["stroke beard"] = "pohladit plnovous"; -$a->strings["stroked their beard at"] = "pohladil/a jeho/její plnovous na"; -$a->strings["bemoan the declining standards of modern secondary and tertiary education to"] = "stěžovat si na klesající úroveň moderního sekundárního a terciárního vzdělávání u"; -$a->strings["bemoans the declining standards of modern secondary and tertiary education to"] = "si stěžuje na klesající úroveň moderního sekundárního a terciárního vzdělávání u"; +$a->strings["stroked their beard at"] = "pohladil/a plnovous"; +$a->strings["bemoan the declining standards of modern secondary and tertiary education to"] = "stěžovat si příjemci na klesající úroveň moderního sekundárního a terciárního vzdělávání"; +$a->strings["bemoans the declining standards of modern secondary and tertiary education to"] = "si stěžuje na klesající úroveň moderního sekundárního a terciárního vzdělávání"; $a->strings["hug"] = "obejmout"; $a->strings["hugged"] = "obejmul/a"; $a->strings["kiss"] = "políbit"; -- 2.40.1 From 3874e491f913cfafe12e14f57a217273e63e4f4c Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 8 Jul 2018 17:19:35 +0000 Subject: [PATCH 05/14] Avoid warnings in addons --- blockem/blockem.php | 6 +++++- jappixmini/jappixmini.php | 2 +- openstreetmap/openstreetmap.php | 2 +- pumpio/pumpio.php | 1 + rendertime/rendertime.php | 2 +- showmore/showmore.php | 2 ++ xmpp/xmpp.php | 2 +- 7 files changed, 12 insertions(+), 5 deletions(-) diff --git a/blockem/blockem.php b/blockem/blockem.php index aaa69399..3de7be40 100644 --- a/blockem/blockem.php +++ b/blockem/blockem.php @@ -138,6 +138,10 @@ function blockem_prepare_body_content_filter(\Friendica\App $a, &$hook_data) } function blockem_display_item(&$a,&$b) { + if (empty($b['output']['body'])) { + return; + } + if(strstr($b['output']['body'],'id="blockem-wrap-')) $b['output']['thumb'] = $a->get_baseurl() . "/images/person-80.jpg"; } @@ -177,7 +181,7 @@ function blockem_item_photo_menu(&$a,&$b) { $blocked = false; $author = $b['item']['author-link']; - if(is_array($a->data['blockem'])) { + if(!empty($a->data['blockem'])) { foreach($a->data['blockem'] as $bloke) { if(link_compare($bloke,$author)) { $blocked = true; diff --git a/jappixmini/jappixmini.php b/jappixmini/jappixmini.php index 37d2ce5c..372193fb 100644 --- a/jappixmini/jappixmini.php +++ b/jappixmini/jappixmini.php @@ -477,7 +477,7 @@ function jappixmini_script(App $a) return; } - if ($_GET["mode"] == "minimal") { + if (defaults($_GET, "mode", '') == "minimal") { return; } diff --git a/openstreetmap/openstreetmap.php b/openstreetmap/openstreetmap.php index 974be0a0..0fe2a2fd 100644 --- a/openstreetmap/openstreetmap.php +++ b/openstreetmap/openstreetmap.php @@ -94,7 +94,7 @@ function openstreetmap_location($a, &$item) } } - if ($target == "") { + if (empty($target)) { $target = $nomserver.'?q='.urlencode($item['location']); } diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index 1b6469ed..2c7d0be4 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -957,6 +957,7 @@ function pumpio_dolike(&$a, $uid, $self, $post, $own_id, $threadcompletion = tru $likedata['gravity'] = GRAVITY_ACTIVITY; $likedata['uid'] = $uid; $likedata['wall'] = 0; + $likedata['network'] = NETWORK_PUMPIO; $likedata['uri'] = Item::newURI($uid); $likedata['parent-uri'] = $orig_post["uri"]; $likedata['contact-id'] = $contactid; diff --git a/rendertime/rendertime.php b/rendertime/rendertime.php index ae7f6d66..3bb8892b 100644 --- a/rendertime/rendertime.php +++ b/rendertime/rendertime.php @@ -30,7 +30,7 @@ function rendertime_page_end(&$a, &$o) { $ignored_modules = ["fbrowser"]; $ignored = in_array($a->module, $ignored_modules); - if (is_site_admin() && ($_GET["mode"] != "minimal") && !$a->is_mobile && !$a->is_tablet && !$ignored) { + if (is_site_admin() && (defaults($_GET, "mode", '') != "minimal") && !$a->is_mobile && !$a->is_tablet && !$ignored) { $o = $o.'
'. L10n::t("Database: %s/%s, Network: %s, Rendering: %s, Session: %s, I/O: %s, Other: %s, Total: %s", round($a->performance["database"] - $a->performance["database_write"], 3), round($a->performance["database_write"], 3), diff --git a/showmore/showmore.php b/showmore/showmore.php index e39acdee..3673c956 100644 --- a/showmore/showmore.php +++ b/showmore/showmore.php @@ -126,6 +126,8 @@ function showmore_prepare_body(\Friendica\App $a, &$hook_data) if (get_body_length($hook_data['html']) > $chars) { $found = true; $shortened = trim(showmore_cutitem($hook_data['html'], $chars)) . "..."; + } else { + $found = false; } if ($found) { diff --git a/xmpp/xmpp.php b/xmpp/xmpp.php index bd5adb57..bef31fed 100644 --- a/xmpp/xmpp.php +++ b/xmpp/xmpp.php @@ -131,7 +131,7 @@ function xmpp_converse(App $a) return; } - if ($_GET["mode"] == "minimal") { + if (defaults($_GET, "mode", '') == "minimal") { return; } -- 2.40.1 From 1613cba9150aa4252b17cfd93e8cc2a796a95e9f Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 9 Jul 2018 04:59:43 +0000 Subject: [PATCH 06/14] And some warnings removed --- fromgplus/fromgplus.php | 2 +- pumpio/pumpio.php | 17 ++++++++--------- statusnet/statusnet.php | 12 ++++++------ twitter/twitter.php | 30 ++++++++++++++++-------------- 4 files changed, 31 insertions(+), 30 deletions(-) diff --git a/fromgplus/fromgplus.php b/fromgplus/fromgplus.php index 5dfac50c..fcee3260 100644 --- a/fromgplus/fromgplus.php +++ b/fromgplus/fromgplus.php @@ -455,7 +455,7 @@ function fromgplus_fetch($a, $uid) { $lastdate = 0; - if (!is_array($activities->items)) + if (empty($activities->items)) return; $reversed = array_reverse($activities->items); diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index 2c7d0be4..56888548 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -654,8 +654,7 @@ function pumpio_action(&$a, $uid, $uri, $action, $content = "") function pumpio_sync(&$a) { - $r = q("SELECT * FROM `addon` WHERE `installed` = 1 AND `name` = 'pumpio'", - $plugin); + $r = q("SELECT * FROM `addon` WHERE `installed` = 1 AND `name` = 'pumpio'"); if (!DBM::is_result($r)) { return; @@ -765,7 +764,7 @@ function pumpio_fetchtimeline(&$a, $uid) logger('pumpio: fetching for user '.$uid.' '.$url.' C:'.$client->client_id.' CS:'.$client->client_secret.' T:'.$client->access_token.' TS:'.$client->access_token_secret); - $username = $user.'@'.$host; + $useraddr = $username.'@'.$hostname; if (pumpio_reachable($url)) { $success = $client->CallAPI($url, 'GET', [], ['FailOnAccessError'=>true], $user); @@ -774,7 +773,7 @@ function pumpio_fetchtimeline(&$a, $uid) } if (!$success) { - logger('pumpio: error fetching posts for user '.$uid." ".$username." ".print_r($user, true)); + logger('pumpio: error fetching posts for user '.$uid." ".$useraddr." ".print_r($user, true)); return; } @@ -903,7 +902,7 @@ function pumpio_dolike(&$a, $uid, $self, $post, $own_id, $threadcompletion = tru { require_once('include/items.php'); - if ($post->object->id == "") { + if (empty($post->object->id)) { logger('Got empty like: '.print_r($post, true), LOGGER_DEBUG); return; } @@ -1187,7 +1186,7 @@ function pumpio_dopost(&$a, $client, $uid, $self, $post, $own_id, $threadcomplet $postarray['parent-uri'] = $post->object->inReplyTo->id; } - if ($post->object->pump_io->proxyURL) { + if (!empty($post->object->pump_io->proxyURL)) { $postarray['extid'] = $post->object->pump_io->proxyURL; } @@ -1204,7 +1203,7 @@ function pumpio_dopost(&$a, $client, $uid, $self, $post, $own_id, $threadcomplet $postarray['body'] = HTML::toBBCode($post->object->content); $postarray['object'] = json_encode($post); - if ($post->object->fullImage->url != "") { + if (!empty($post->object->fullImage->url)) { $postarray["body"] = "[url=".$post->object->fullImage->url."][img]".$post->object->image->url."[/img][/url]\n".$postarray["body"]; } @@ -1588,9 +1587,9 @@ function pumpio_fetchallcomments(&$a, $uid, $id) $like->object->id = $item->id; $like->actor = new stdClass; $like->actor->displayName = $item->displayName; - $like->actor->preferredUsername = $item->preferredUsername; + //$like->actor->preferredUsername = $item->preferredUsername; + //$like->actor->image = $item->image; $like->actor->url = $item->url; - $like->actor->image = $item->image; $like->generator = new stdClass; $like->generator->displayName = "pumpio"; pumpio_dolike($a, $uid, $self, $post, $own_id, false); diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php index b97a6ca5..6fc5b8a9 100644 --- a/statusnet/statusnet.php +++ b/statusnet/statusnet.php @@ -1065,7 +1065,7 @@ function statusnet_createpost(App $a, $uid, $post, $self, $create_user, $only_ex $postarray['uid'] = $uid; $postarray['wall'] = 0; - if (is_object($post->retweeted_status)) { + if (!empty($post->retweeted_status)) { $content = $post->retweeted_status; statusnet_fetch_contact($uid, $content->user, false); } else { @@ -1080,7 +1080,7 @@ function statusnet_createpost(App $a, $uid, $post, $self, $create_user, $only_ex $contactid = 0; - if ($content->in_reply_to_status_id != "") { + if (!empty($content->in_reply_to_status_id)) { $parent = $hostname . "::" . $content->in_reply_to_status_id; @@ -1166,19 +1166,19 @@ function statusnet_createpost(App $a, $uid, $post, $self, $create_user, $only_ex $postarray['created'] = DateTimeFormat::utc($content->created_at); $postarray['edited'] = DateTimeFormat::utc($content->created_at); - if (is_string($content->place->name)) { + if (!empty($content->place->name)) { $postarray["location"] = $content->place->name; } - if (is_string($content->place->full_name)) { + if (!empty($content->place->full_name)) { $postarray["location"] = $content->place->full_name; } - if (is_array($content->geo->coordinates)) { + if (!empty($content->geo->coordinates)) { $postarray["coord"] = $content->geo->coordinates[0] . " " . $content->geo->coordinates[1]; } - if (is_array($content->coordinates->coordinates)) { + if (!empty($content->coordinates->coordinates)) { $postarray["coord"] = $content->coordinates->coordinates[1] . " " . $content->coordinates->coordinates[0]; } diff --git a/twitter/twitter.php b/twitter/twitter.php index 99c7d496..2b5b4b53 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -799,7 +799,7 @@ function twitter_do_mirrorpost(App $a, $uid, $post) // $datarray['object'] = json_encode($post); // Activate for debugging $datarray["title"] = ""; - if (is_object($post->retweeted_status)) { + if (!empty($post->retweeted_status)) { // We don't support nested shares, so we mustn't show quotes as shares on retweets $item = twitter_createpost($a, $uid, $post->retweeted_status, ['id' => 0], false, false, true); @@ -1254,7 +1254,7 @@ function twitter_expand_entities(App $a, $body, $item, $picture) function twitter_media_entities($post, &$postarray) { // There are no media entities? So we quit. - if (!is_array($post->extended_entities->media)) { + if (empty($post->extended_entities->media)) { return ""; } @@ -1274,6 +1274,9 @@ function twitter_media_entities($post, &$postarray) // This is a pure media post, first search for all media urls $media = []; foreach ($post->extended_entities->media AS $medium) { + if (!isset($media[$medium->url])) { + $media[$medium->url] = ''; + } switch ($medium->type) { case 'photo': $media[$medium->url] .= "\n[img]" . $medium->media_url_https . "[/img]"; @@ -1396,6 +1399,9 @@ function twitter_createpost(App $a, $uid, $post, $self, $create_user, $only_exis if ($post->user->protected) { $postarray['private'] = 1; $postarray['allow_cid'] = '<' . $self['id'] . '>'; + } else { + $postarray['private'] = 0; + $postarray['allow_cid'] = ''; } if (is_string($post->full_text)) { @@ -1420,22 +1426,22 @@ function twitter_createpost(App $a, $uid, $post, $self, $create_user, $only_exis $statustext = $converted["plain"]; - if (is_string($post->place->name)) { + if (!empty($post->place->name)) { $postarray["location"] = $post->place->name; } - if (is_string($post->place->full_name)) { + if (!empty($post->place->full_name)) { $postarray["location"] = $post->place->full_name; } - if (is_array($post->geo->coordinates)) { + if (!empty($post->geo->coordinates)) { $postarray["coord"] = $post->geo->coordinates[0] . " " . $post->geo->coordinates[1]; } - if (is_array($post->coordinates->coordinates)) { + if (!empty($post->coordinates->coordinates)) { $postarray["coord"] = $post->coordinates->coordinates[1] . " " . $post->coordinates->coordinates[0]; } - if (is_object($post->retweeted_status)) { + if (!empty($post->retweeted_status)) { $retweet = twitter_createpost($a, $uid, $post->retweeted_status, $self, false, false, $noquote); - $retweet['object'] = $postarray['object']; + //$retweet['object'] = $postarray['object']; $retweet['private'] = $postarray['private']; $retweet['allow_cid'] = $postarray['allow_cid']; $retweet['contact-id'] = $postarray['contact-id']; @@ -1446,7 +1452,7 @@ function twitter_createpost(App $a, $uid, $post, $self, $create_user, $only_exis $postarray = $retweet; } - if (is_object($post->quoted_status) && !$noquote) { + if (!empty($post->quoted_status) && !$noquote) { $quoted = twitter_createpost($a, $uid, $post->quoted_status, $self, false, false, true); $postarray['body'] = $statustext; @@ -1508,10 +1514,6 @@ function twitter_fetchparentposts(App $a, $uid, $post, TwitterOAuth $connection, $item = Item::insert($postarray); - if ($notify) { - $item = $notify; - } - $postarray["id"] = $item; logger('twitter_fetchparentpost: User ' . $self["nick"] . ' posted parent timeline item ' . $item); @@ -1629,7 +1631,7 @@ function twitter_fetchhometimeline(App $a, $uid) $postarray = twitter_createpost($a, $uid, $post, $self, $create_user, true, false); - if (trim($postarray['body']) == "") { + if (empty($postarray['body']) || trim($postarray['body']) == "") { continue; } -- 2.40.1 From 2954559a39c90eae7f20426cb013f3c2cb25939a Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 9 Jul 2018 08:52:12 +0000 Subject: [PATCH 07/14] And more ... --- pumpio/pumpio.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index 56888548..40fb7d68 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -494,23 +494,23 @@ function pumpio_send(&$a, &$b) 'objectType' => "note", 'content' => $content]; - if ($title != "") { + if (!empty($title)) { $params["object"]["displayName"] = $title; } - if (count($receiver["to"])) { + if (!empty($receiver["to"])) { $params["to"] = $receiver["to"]; } - if (count($receiver["bto"])) { + if (!empty($receiver["bto"])) { $params["bto"] = $receiver["bto"]; } - if (count($receiver["cc"])) { + if (!empty($receiver["cc"])) { $params["cc"] = $receiver["cc"]; } - if (count($receiver["bcc"])) { + if (!empty($receiver["bcc"])) { $params["bcc"] = $receiver["bcc"]; } } else { -- 2.40.1 From 3e4dc941ed37b2e6bb842cab5ae1c804b68e8f2a Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 9 Jul 2018 21:07:23 +0000 Subject: [PATCH 08/14] And some more ... --- pumpio/pumpio.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index 40fb7d68..534367a0 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -1207,7 +1207,7 @@ function pumpio_dopost(&$a, $client, $uid, $self, $post, $own_id, $threadcomplet $postarray["body"] = "[url=".$post->object->fullImage->url."][img]".$post->object->image->url."[/img][/url]\n".$postarray["body"]; } - if ($post->object->displayName != "") { + if (!empty($post->object->displayName)) { $postarray['title'] = $post->object->displayName; } -- 2.40.1 From f2f028d8b3e150c18260007ee962c452fb1e434b Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 9 Jul 2018 21:12:49 +0000 Subject: [PATCH 09/14] Added comment --- twitter/twitter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twitter/twitter.php b/twitter/twitter.php index 2b5b4b53..34622967 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -1441,7 +1441,7 @@ function twitter_createpost(App $a, $uid, $post, $self, $create_user, $only_exis if (!empty($post->retweeted_status)) { $retweet = twitter_createpost($a, $uid, $post->retweeted_status, $self, false, false, $noquote); - //$retweet['object'] = $postarray['object']; + //$retweet['object'] = $postarray['object']; // Activate for debugging $retweet['private'] = $postarray['private']; $retweet['allow_cid'] = $postarray['allow_cid']; $retweet['contact-id'] = $postarray['contact-id']; -- 2.40.1 From 953ffd683851a9355c35fdda592b65bc5bab53aa Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 9 Jul 2018 22:17:18 +0000 Subject: [PATCH 10/14] And again ... --- twitter/twitter.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/twitter/twitter.php b/twitter/twitter.php index 34622967..e6c3e4a7 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -1131,6 +1131,10 @@ function twitter_expand_entities(App $a, $body, $item, $picture) $oembed_data = OEmbed::fetchURL($expanded_url); + if (empty($oembed_data)) { + continue; + } + // Quickfix: Workaround for URL with "[" and "]" in it if (strpos($expanded_url, "[") || strpos($expanded_url, "]")) { $expanded_url = $url->url; -- 2.40.1 From eefb7f48bf866e14a6f72178577bfd75e75d322e Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 9 Jul 2018 22:38:47 +0000 Subject: [PATCH 11/14] And again ... --- leistungsschutzrecht/leistungsschutzrecht.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/leistungsschutzrecht/leistungsschutzrecht.php b/leistungsschutzrecht/leistungsschutzrecht.php index 04d3e556..6cfe95fe 100644 --- a/leistungsschutzrecht/leistungsschutzrecht.php +++ b/leistungsschutzrecht/leistungsschutzrecht.php @@ -138,6 +138,10 @@ function leistungsschutzrecht_is_member_site($url) { $cleanedurlpart = explode("%", $urldata["host"]); $hostname = explode(".", $cleanedurlpart[0]); + if (empty($hostname)) { + return false; + } + $site = $hostname[sizeof($hostname) - 2].".".$hostname[sizeof($hostname) - 1]; return (isset($sites[$site])); -- 2.40.1 From b6e5caf0833267c341f5dcb64fe4a558037a2404 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 10 Jul 2018 04:57:17 +0000 Subject: [PATCH 12/14] Partly reworked "newmemberwidget" --- newmemberwidget/newmemberwidget.php | 47 ++++++++++++++++++----------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/newmemberwidget/newmemberwidget.php b/newmemberwidget/newmemberwidget.php index 57b49230..5aff1c96 100644 --- a/newmemberwidget/newmemberwidget.php +++ b/newmemberwidget/newmemberwidget.php @@ -11,29 +11,42 @@ use Friendica\Core\Addon; use Friendica\Core\Config; use Friendica\Core\L10n; -function newmemberwidget_install () { - Addon::registerHook( 'network_mod_init', 'addon/newmemberwidget/newmemberwidget.php', 'newmemberwidget_network_mod_init'); - logger('newmemberwidget installed'); -} -function newmemberwidget_uninstall () { - Addon::unregisterHook( 'network_mod_init', 'addon/newmemberwidget/newmemberwidget.php', 'newmemberwidget_network_mod_init'); +function newmemberwidget_install() +{ + Addon::registerHook( 'network_mod_init', 'addon/newmemberwidget/newmemberwidget.php', 'newmemberwidget_network_mod_init'); + logger('newmemberwidget installed'); } -function newmemberwidget_network_mod_init ( $a, $b) { - if (x($_SESSION['new_member'])) { +function newmemberwidget_uninstall() +{ + Addon::unregisterHook( 'network_mod_init', 'addon/newmemberwidget/newmemberwidget.php', 'newmemberwidget_network_mod_init'); +} + +function newmemberwidget_network_mod_init ($a, $b) +{ + if (empty($_SESSION['new_member'])) { + return; + } + $t = '
'.EOL; $t .= '

'.L10n::t('New Member').'

'.EOL; $t .= '' . L10n::t('Tips for New Members') . '
'.EOL; - if (Config::get('newmemberwidget','linkglobalsupport')==1) - $t .= ''.L10n::t('Global Support Forum').'
'.EOL; - if (Config::get('newmemberwidget','linklocalsupport')==1) - $t .= ''.L10n::t('Local Support Forum').'
'.EOL; - $ft = Config::get('newmemberwidget','freetext'); - if (!trim($ft)=="") - $t .= '

'.BBCode::convert(trim($ft)).'

'; + + if (Config::get('newmemberwidget','linkglobalsupport', false)) { + $t .= ''.L10n::t('Global Support Forum').'
'.EOL; + } + + if (Config::get('newmemberwidget','linklocalsupport', false)) { + $t .= ''.L10n::t('Local Support Forum').'
'.EOL; + } + + $ft = Config::get('newmemberwidget','freetext', ''); + if (!empty($ft)) { + $t .= '

'.BBCode::convert(trim($ft)).'

'; + } + $t .= '
'; - $a->page['aside'] = $t . $a->page['aside']; - } + $a->page['aside'] = $t . $a->page['aside']; } function newmemberwidget_addon_admin_post(&$a) -- 2.40.1 From e6765f72502901fdf1a4c55d35cd9ae024e56cda Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 10 Jul 2018 04:58:04 +0000 Subject: [PATCH 13/14] And more warnings ... --- pumpio/pumpio.php | 6 +++++- twitter/twitter.php | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index 534367a0..a8e5c31f 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -1168,7 +1168,11 @@ function pumpio_dopost(&$a, $client, $uid, $self, $post, $own_id, $threadcomplet $reply = new stdClass; $reply->verb = "note"; - $reply->cc = $post->cc; + + if (isset($post->cc)) { + $reply->cc = $post->cc; + } + $reply->to = $post->to; $reply->object = new stdClass; $reply->object->objectType = $post->object->inReplyTo->objectType; diff --git a/twitter/twitter.php b/twitter/twitter.php index e6c3e4a7..c106db88 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -422,6 +422,7 @@ function twitter_action(App $a, $uid, $pid, $action) switch ($action) { case "delete": // To-Do: $result = $connection->post('statuses/destroy', $post); + $result = []; break; case "like": $result = $connection->post('favorites/create', $post); @@ -429,6 +430,9 @@ function twitter_action(App $a, $uid, $pid, $action) case "unlike": $result = $connection->post('favorites/destroy', $post); break; + default: + logger('Unhandled action ' . $action, LOGGER_DEBUG); + $result = []; } logger("twitter_action '" . $action . "' send, result: " . print_r($result, true), LOGGER_DEBUG); } @@ -1508,11 +1512,11 @@ function twitter_fetchparentposts(App $a, $uid, $post, TwitterOAuth $connection, $posts = array_reverse($posts); - if (count($posts)) { + if (!empty($posts)) { foreach ($posts as $post) { $postarray = twitter_createpost($a, $uid, $post, $self, false, false, false); - if (trim($postarray['body']) == "") { + if (emptx($postarray['body'])) { continue; } -- 2.40.1 From 105452ef796c13fa3faddb92d6d27db6c25cb7d6 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 10 Jul 2018 05:25:54 +0000 Subject: [PATCH 14/14] The next round --- pumpio/pumpio.php | 4 ++++ twitter/twitter.php | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index a8e5c31f..9e02a74d 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -1307,6 +1307,10 @@ function pumpio_fetchinbox(&$a, $uid) $success = false; } + if (!$success) { + return; + } + if ($user->items) { $posts = array_reverse($user->items); diff --git a/twitter/twitter.php b/twitter/twitter.php index c106db88..d9baf1bd 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -1135,7 +1135,7 @@ function twitter_expand_entities(App $a, $body, $item, $picture) $oembed_data = OEmbed::fetchURL($expanded_url); - if (empty($oembed_data)) { + if (empty($oembed_data) || empty($oembed_data->type)) { continue; } @@ -1516,7 +1516,7 @@ function twitter_fetchparentposts(App $a, $uid, $post, TwitterOAuth $connection, foreach ($posts as $post) { $postarray = twitter_createpost($a, $uid, $post, $self, false, false, false); - if (emptx($postarray['body'])) { + if (empty($postarray['body'])) { continue; } -- 2.40.1