From 5648924852d6108e3cf2c795483ad710dceb0fa6 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 15 Oct 2022 17:49:28 +0200 Subject: [PATCH 1/4] [impressum] notes and email field were exchanged --- impressum/impressum.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/impressum/impressum.php b/impressum/impressum.php index ae5e2637..69beba59 100644 --- a/impressum/impressum.php +++ b/impressum/impressum.php @@ -98,8 +98,8 @@ function impressum_addon_admin_post (App $a) DI::config()->set('impressum', 'owner', strip_tags(trim($_POST['owner'] ?? ''))); DI::config()->set('impressum', 'ownerprofile', strip_tags(trim($_POST['ownerprofile'] ?? ''))); DI::config()->set('impressum', 'postal', strip_tags(trim($_POST['postal'] ?? ''))); - DI::config()->set('impressum', 'email', strip_tags(trim($_POST['notes'] ?? ''))); - DI::config()->set('impressum', 'notes', strip_tags(trim($_POST['email'] ?? ''))); + DI::config()->set('impressum', 'email', strip_tags(trim($_POST['email'] ?? ''))); + DI::config()->set('impressum', 'notes', strip_tags(trim($_POST['notes'] ?? ''))); DI::config()->set('impressum', 'footer_text', strip_tags(trim($_POST['footer_text'] ?? ''))); } -- 2.45.3 From d75f4b30f3c78d979ff52bbd08a4ec56954ad763 Mon Sep 17 00:00:00 2001 From: Matthew Exon Date: Sat, 15 Oct 2022 18:03:55 +0200 Subject: [PATCH 2/4] correct typo "arrat" --- mailstream/mailstream.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mailstream/mailstream.php b/mailstream/mailstream.php index 8c6e2693..f4540188 100644 --- a/mailstream/mailstream.php +++ b/mailstream/mailstream.php @@ -197,7 +197,7 @@ function mailstream_post_hook(App $a, array &$item) * * @return array new value of the attachments table (results are also stored in the reference parameter) */ -function mailstream_do_images(arrat &$item, array &$attachments) +function mailstream_do_images(array &$item, array &$attachments) { if (!DI::pConfig()->get($item['uid'], 'mailstream', 'attachimg')) { return; -- 2.45.3 From 26c6d501e04e0df78a5c81534b3f30a4d5301467 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 15 Oct 2022 21:09:03 +0200 Subject: [PATCH 3/4] [twitter] DE translation update --- twitter/lang/de/messages.po | 60 ++++++++++++++++++++----------------- twitter/lang/de/strings.php | 1 + 2 files changed, 33 insertions(+), 28 deletions(-) diff --git a/twitter/lang/de/messages.po b/twitter/lang/de/messages.po index 7a020d6d..66ae14dc 100644 --- a/twitter/lang/de/messages.po +++ b/twitter/lang/de/messages.po @@ -12,9 +12,9 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-27 10:25-0500\n" -"PO-Revision-Date: 2022-01-22 17:43+0000\n" -"Last-Translator: Tobias Diekershoff \n" +"POT-Creation-Date: 2022-10-02 23:56+0000\n" +"PO-Revision-Date: 2014-06-23 12:58+0000\n" +"Last-Translator: Tobias Diekershoff , 2018,2020-2022\n" "Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -22,23 +22,23 @@ msgstr "" "Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: twitter.php:213 +#: twitter.php:216 msgid "Post to Twitter" msgstr "Auf Twitter veröffentlichen" -#: twitter.php:258 +#: twitter.php:262 msgid "" "You submitted an empty PIN, please Sign In with Twitter again to get a new " "one." msgstr "Du hast keine PIN übertragen. Bitte melde dich erneut bei Twitter an, um eine neue PIN zu erhalten." -#: twitter.php:321 +#: twitter.php:327 msgid "" "No consumer key pair for Twitter found. Please contact your site " "administrator." msgstr "Kein Consumer-Schlüsselpaar für Twitter gefunden. Bitte wende dich an den Administrator der Seite." -#: twitter.php:334 +#: twitter.php:340 msgid "" "At this Friendica instance the Twitter addon was enabled but you have not " "yet connected your account to your Twitter account. To do so click the " @@ -47,26 +47,26 @@ msgid "" " be posted to Twitter." msgstr "Auf diesem Friendica-Server wurde das Twitter-Addon aktiviert, aber du hast deinen Account noch nicht mit deinem Twitter-Account verbunden. Klicke dazu auf die Schaltfläche unten. Du erhältst dann eine PIN von Twitter, die du in das Eingabefeld unten einfügst. Denk daran, den Senden-Knopf zu drücken! Nur öffentliche Beiträge werden bei Twitter veröffentlicht." -#: twitter.php:335 +#: twitter.php:341 msgid "Log in with Twitter" msgstr "bei Twitter anmelden" -#: twitter.php:337 +#: twitter.php:343 msgid "Copy the PIN from Twitter here" msgstr "Kopiere die Twitter-PIN hierher" -#: twitter.php:345 twitter.php:388 +#: twitter.php:351 twitter.php:395 msgid "An error occured: " msgstr "Ein Fehler ist aufgetreten:" -#: twitter.php:359 +#: twitter.php:365 #, php-format msgid "" "Currently connected to: %1$s" msgstr "Derzeit verbunden mit: %1$s" -#: twitter.php:365 +#: twitter.php:371 msgid "" "Note: Due to your privacy settings (Hide your profile " "details from unknown viewers?) the link potentially included in public " @@ -74,42 +74,46 @@ msgid "" "the visitor that the access to your profile has been restricted." msgstr "Hinweis: Aufgrund deiner Privatsphären-Einstellungen (Profil-Details vor unbekannten Betrachtern verbergen?) wird der Link, der eventuell an deinen Twitter-Beitrag angehängt wird, um auf den Originalbeitrag zu verweisen, den Betrachter auf eine leere Seite führen, die ihn darüber informiert, dass der Zugriff eingeschränkt wurde." -#: twitter.php:372 +#: twitter.php:378 msgid "Invalid Twitter info" msgstr "Ungültige Twitter Informationen" -#: twitter.php:373 +#: twitter.php:379 msgid "Disconnect" msgstr "Trennen" -#: twitter.php:378 +#: twitter.php:384 msgid "Allow posting to Twitter" msgstr "Veröffentlichung bei Twitter erlauben" -#: twitter.php:378 +#: twitter.php:384 msgid "" "If enabled all your public postings can be posted to the " "associated Twitter account. You can choose to do so by default (here) or for" " every posting separately in the posting options when writing the entry." msgstr "Wenn aktiviert, können all deine öffentlichen Einträge auf dem verbundenen Twitter-Konto veröffentlicht werden. Du kannst dies (hier) als Standardverhalten einstellen oder beim Schreiben eines Beitrags in den Beitragsoptionen festlegen." -#: twitter.php:379 +#: twitter.php:385 msgid "Send public postings to Twitter by default" msgstr "Veröffentliche öffentliche Beiträge standardmäßig bei Twitter" -#: twitter.php:380 +#: twitter.php:386 +msgid "Use threads instead of truncating the content" +msgstr "Verwende Threads anstelle den Inhalt zu kürzen" + +#: twitter.php:387 msgid "Mirror all posts from twitter that are no replies" msgstr "Spiegle alle Beiträge von Twitter, die keine Antworten sind" -#: twitter.php:381 +#: twitter.php:388 msgid "Import the remote timeline" msgstr "Importiere die Remote-Zeitleiste" -#: twitter.php:382 +#: twitter.php:389 msgid "Automatically create contacts" msgstr "Automatisch Kontakte anlegen" -#: twitter.php:382 +#: twitter.php:389 msgid "" "This will automatically create a contact in Friendica as soon as you receive" " a message from an existing contact via the Twitter network. If you do not " @@ -117,33 +121,33 @@ msgid "" "from whom you would like to see posts here." msgstr "Mit dieser Option wird automatisch ein Kontakt bei Friendica angelegt, wenn du eine Nachricht von einem bestehenden Kontakt auf Twitter erhältst. Ist die Option nicht aktiv, musst du manuell Kontakte für diejenigen deiner Twitter-Kontakte anlegen, deren Nachrichten du auf Friendica lesen möchtest." -#: twitter.php:395 +#: twitter.php:402 msgid "Twitter Import/Export/Mirror" msgstr "Twitter-Import/Export/Spiegeln" -#: twitter.php:547 +#: twitter.php:554 msgid "" "Please connect a Twitter account in your Social Network settings to import " "Twitter posts." msgstr "Bitte verbinde deinen Twitter Account in den Einstellungen zu den Soziale Netzwerken damit deine Twitter Beiträge importiert werden." -#: twitter.php:554 +#: twitter.php:561 msgid "Twitter post not found." msgstr "Beiträge auf Twitter nicht gefunden." -#: twitter.php:914 +#: twitter.php:961 msgid "Save Settings" msgstr "Einstellungen speichern" -#: twitter.php:916 +#: twitter.php:963 msgid "Consumer key" msgstr "Consumer Key" -#: twitter.php:917 +#: twitter.php:964 msgid "Consumer secret" msgstr "Consumer Secret" -#: twitter.php:1113 +#: twitter.php:1163 #, php-format msgid "%s on Twitter" msgstr "%s auf Twitter" diff --git a/twitter/lang/de/strings.php b/twitter/lang/de/strings.php index 85a96ad6..0316f18a 100644 --- a/twitter/lang/de/strings.php +++ b/twitter/lang/de/strings.php @@ -19,6 +19,7 @@ $a->strings['Disconnect'] = 'Trennen'; $a->strings['Allow posting to Twitter'] = 'Veröffentlichung bei Twitter erlauben'; $a->strings['If enabled all your public postings can be posted to the associated Twitter account. You can choose to do so by default (here) or for every posting separately in the posting options when writing the entry.'] = 'Wenn aktiviert, können all deine öffentlichen Einträge auf dem verbundenen Twitter-Konto veröffentlicht werden. Du kannst dies (hier) als Standardverhalten einstellen oder beim Schreiben eines Beitrags in den Beitragsoptionen festlegen.'; $a->strings['Send public postings to Twitter by default'] = 'Veröffentliche öffentliche Beiträge standardmäßig bei Twitter'; +$a->strings['Use threads instead of truncating the content'] = 'Verwende Threads anstelle den Inhalt zu kürzen'; $a->strings['Mirror all posts from twitter that are no replies'] = 'Spiegle alle Beiträge von Twitter, die keine Antworten sind'; $a->strings['Import the remote timeline'] = 'Importiere die Remote-Zeitleiste'; $a->strings['Automatically create contacts'] = 'Automatisch Kontakte anlegen'; -- 2.45.3 From e5842e83c793037d1b2b600856a7099b2e5160a0 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 17 Oct 2022 05:50:23 +0000 Subject: [PATCH 4/4] The priority is now a class constant --- ifttt/ifttt.php | 3 ++- mailstream/mailstream.php | 10 +++++----- pumpio/pumpio.php | 4 ++-- twitter/twitter.php | 8 ++++---- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/ifttt/ifttt.php b/ifttt/ifttt.php index 7154178a..9ad16007 100644 --- a/ifttt/ifttt.php +++ b/ifttt/ifttt.php @@ -12,6 +12,7 @@ use Friendica\Core\Hook; use Friendica\Core\Logger; use Friendica\Core\Protocol; use Friendica\Core\Renderer; +use Friendica\Core\Worker; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Item; @@ -183,5 +184,5 @@ function ifttt_message($uid, $item) $link = hash('ripemd128', $item['msg']); } - Post\Delayed::add($link, $post, PRIORITY_MEDIUM, Post\Delayed::UNPREPARED); + Post\Delayed::add($link, $post, Worker::PRIORITY_MEDIUM, Post\Delayed::UNPREPARED); } diff --git a/mailstream/mailstream.php b/mailstream/mailstream.php index 8c6e2693..a7d1dec5 100644 --- a/mailstream/mailstream.php +++ b/mailstream/mailstream.php @@ -53,7 +53,7 @@ function mailstream_check_version() 'addon/mailstream/mailstream.php', 'mailstream_convert_table_entries' ); - Hook::fork(PRIORITY_LOW, 'mailstream_convert_table_entries'); + Hook::fork(Worker::PRIORITY_LOW, 'mailstream_convert_table_entries'); } } @@ -183,7 +183,7 @@ function mailstream_post_hook(App $a, array &$item) 'message_id' => $message_id, 'tries' => 0, ]; - Hook::fork(PRIORITY_LOW, 'mailstream_send_hook', $send_hook_data); + Hook::fork(Worker::PRIORITY_LOW, 'mailstream_send_hook', $send_hook_data); } /** @@ -197,7 +197,7 @@ function mailstream_post_hook(App $a, array &$item) * * @return array new value of the attachments table (results are also stored in the reference parameter) */ -function mailstream_do_images(arrat &$item, array &$attachments) +function mailstream_do_images(array &$item, array &$attachments) { if (!DI::pConfig()->get($item['uid'], 'mailstream', 'attachimg')) { return; @@ -439,7 +439,7 @@ function mailstream_send(string $message_id, array $item, array $user): bool * * @param string $text text to word wrap - modified in-place */ -function mailstream_html_wrap(string &$text): string +function mailstream_html_wrap(string &$text) { $lines = str_split($text, 200); for ($i = 0; $i < count($lines); $i++) { @@ -467,7 +467,7 @@ function mailstream_convert_table_entries() continue; } Logger::info('mailstream_convert_table_entries: convert item to workerqueue', $send_hook_data); - Hook::fork(PRIORITY_LOW, 'mailstream_send_hook', $send_hook_data); + Hook::fork(Worker::PRIORITY_LOW, 'mailstream_send_hook', $send_hook_data); } DBA::e('DROP TABLE `mailstream_item`'); } diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index eacc394b..a88b0d32 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -694,7 +694,7 @@ function pumpio_sync(App $a) function pumpio_cron(App $a, $b) { - Worker::add(PRIORITY_MEDIUM, 'addon/pumpio/pumpio_sync.php'); + Worker::add(Worker::PRIORITY_MEDIUM, 'addon/pumpio/pumpio_sync.php'); } function pumpio_fetchtimeline(App $a, int $uid) @@ -1506,7 +1506,7 @@ function pumpio_fetchallcomments(App $a, $uid, $id) $post->object = $item; - Logger::notice('pumpio_fetchallcomments: posting comment ' . $post->object->id . ' ', $post); + Logger::notice('pumpio_fetchallcomments: posting comment ' . $post->object->id . ' ', json_decode(json_encode($post), true)); pumpio_dopost($a, $client, $uid, $self, $post, $own_id, false); } } diff --git a/twitter/twitter.php b/twitter/twitter.php index 550f9dad..a4acb3f1 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -986,7 +986,7 @@ function twitter_cron(App $a) $pconfigs = DBA::selectToArray('pconfig', [], ['cat' => 'twitter', 'k' => 'mirror_posts', 'v' => true]); foreach ($pconfigs as $rr) { Logger::notice('Fetching', ['user' => $rr['uid']]); - Worker::add(['priority' => PRIORITY_MEDIUM, 'force_priority' => true], 'addon/twitter/twitter_sync.php', 1, (int) $rr['uid']); + Worker::add(['priority' => Worker::PRIORITY_MEDIUM, 'force_priority' => true], 'addon/twitter/twitter_sync.php', 1, (int) $rr['uid']); } $abandon_days = intval(DI::config()->get('system', 'account_abandon_days')); @@ -1006,7 +1006,7 @@ function twitter_cron(App $a) } Logger::notice('importing timeline', ['user' => $rr['uid']]); - Worker::add(['priority' => PRIORITY_MEDIUM, 'force_priority' => true], 'addon/twitter/twitter_sync.php', 2, (int) $rr['uid']); + Worker::add(['priority' => Worker::PRIORITY_MEDIUM, 'force_priority' => true], 'addon/twitter/twitter_sync.php', 2, (int) $rr['uid']); /* // To-Do // check for new contacts once a day @@ -1333,7 +1333,7 @@ function twitter_fetchtimeline(App $a, int $uid): void Logger::info('Posting mirror post', ['twitter-id' => $post->id_str, 'uid' => $uid]); - Post\Delayed::add($mirrorpost['extid'], $mirrorpost, PRIORITY_MEDIUM, Post\Delayed::UNPREPARED); + Post\Delayed::add($mirrorpost['extid'], $mirrorpost, Worker::PRIORITY_MEDIUM, Post\Delayed::UNPREPARED); } } DI::pConfig()->set($uid, 'twitter', 'lastid', $lastid); @@ -2191,7 +2191,7 @@ function twitter_fetchhometimeline(App $a, int $uid): void if (empty($postarray['thr-parent'])) { $contact = DBA::selectFirst('contact', [], ['id' => $postarray['contact-id'], 'self' => false]); if (DBA::isResult($contact) && Item::isRemoteSelf($contact, $postarray)) { - $notify = PRIORITY_MEDIUM; + $notify = Worker::PRIORITY_MEDIUM; } } -- 2.45.3