From aeb4645ba64b13241d5fd4b6de9f1f446d8e7da7 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 10 Oct 2022 22:39:30 +0000 Subject: [PATCH 01/27] New field "quote-uri-id" for quoted posts --- database.sql | 19 +++++++++++++++-- doc/database/db_post-content.md | 3 +++ src/Content/Text/BBCode.php | 16 +++++++++++++++ src/Model/Item.php | 26 +++++++++++++++++++++--- src/Protocol/ActivityPub/Transmitter.php | 25 ++++------------------- static/dbstructure.config.php | 4 +++- static/dbview.config.php | 12 +++++++++++ 7 files changed, 78 insertions(+), 27 deletions(-) diff --git a/database.sql b/database.sql index 48de2fcae..119228656 100644 --- a/database.sql +++ b/database.sql @@ -1,6 +1,6 @@ -- ------------------------------------------ -- Friendica 2022.09-rc (Giant Rhubarb) --- DB_UPDATE_VERSION 1484 +-- DB_UPDATE_VERSION 1485 -- ------------------------------------------ @@ -1186,6 +1186,7 @@ CREATE TABLE IF NOT EXISTS `post-content` ( `content-warning` varchar(255) NOT NULL DEFAULT '' COMMENT '', `body` mediumtext COMMENT 'item body content', `raw-body` mediumtext COMMENT 'Body without embedded media links', + `quote-uri-id` int unsigned COMMENT 'Id of the item-uri table that contains the quoted uri', `location` varchar(255) NOT NULL DEFAULT '' COMMENT 'text location where this item originated', `coord` varchar(255) NOT NULL DEFAULT '' COMMENT 'longitude/latitude pair representing location where this item originated', `language` text COMMENT 'Language information about this post', @@ -1202,7 +1203,9 @@ CREATE TABLE IF NOT EXISTS `post-content` ( INDEX `plink` (`plink`(191)), INDEX `resource-id` (`resource-id`), FULLTEXT INDEX `title-content-warning-body` (`title`,`content-warning`,`body`), - FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE + INDEX `quote-uri-id` (`quote-uri-id`), + FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, + FOREIGN KEY (`quote-uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Content for all posts'; -- @@ -1807,6 +1810,8 @@ CREATE VIEW `post-user-view` AS SELECT `post-user`.`thr-parent-id` AS `thr-parent-id`, `conversation-item-uri`.`uri` AS `conversation`, `post-thread-user`.`conversation-id` AS `conversation-id`, + `quote-item-uri`.`uri` AS `quote-uri`, + `post-content`.`quote-uri-id` AS `quote-uri-id`, `item-uri`.`guid` AS `guid`, `post-user`.`wall` AS `wall`, `post-user`.`gravity` AS `gravity`, @@ -1962,6 +1967,7 @@ CREATE VIEW `post-user-view` AS SELECT LEFT JOIN `event` ON `event`.`id` = `post-user`.`event-id` LEFT JOIN `diaspora-interaction` ON `diaspora-interaction`.`uri-id` = `post-user`.`uri-id` LEFT JOIN `post-content` ON `post-content`.`uri-id` = `post-user`.`uri-id` + LEFT JOIN `item-uri` AS `quote-item-uri` ON `quote-item-uri`.`id` = `post-content`.`quote-uri-id` LEFT JOIN `post-delivery-data` ON `post-delivery-data`.`uri-id` = `post-user`.`uri-id` AND `post-user`.`origin` LEFT JOIN `post-question` ON `post-question`.`uri-id` = `post-user`.`uri-id` LEFT JOIN `permissionset` ON `permissionset`.`id` = `post-user`.`psid` @@ -1985,6 +1991,8 @@ CREATE VIEW `post-thread-user-view` AS SELECT `post-user`.`thr-parent-id` AS `thr-parent-id`, `conversation-item-uri`.`uri` AS `conversation`, `post-thread-user`.`conversation-id` AS `conversation-id`, + `quote-item-uri`.`uri` AS `quote-uri`, + `post-content`.`quote-uri-id` AS `quote-uri-id`, `item-uri`.`guid` AS `guid`, `post-thread-user`.`wall` AS `wall`, `post-user`.`gravity` AS `gravity`, @@ -2138,6 +2146,7 @@ CREATE VIEW `post-thread-user-view` AS SELECT LEFT JOIN `event` ON `event`.`id` = `post-user`.`event-id` LEFT JOIN `diaspora-interaction` ON `diaspora-interaction`.`uri-id` = `post-thread-user`.`uri-id` LEFT JOIN `post-content` ON `post-content`.`uri-id` = `post-thread-user`.`uri-id` + LEFT JOIN `item-uri` AS `quote-item-uri` ON `quote-item-uri`.`id` = `post-content`.`quote-uri-id` LEFT JOIN `post-delivery-data` ON `post-delivery-data`.`uri-id` = `post-thread-user`.`uri-id` AND `post-thread-user`.`origin` LEFT JOIN `post-question` ON `post-question`.`uri-id` = `post-thread-user`.`uri-id` LEFT JOIN `permissionset` ON `permissionset`.`id` = `post-thread-user`.`psid` @@ -2157,6 +2166,8 @@ CREATE VIEW `post-view` AS SELECT `post`.`thr-parent-id` AS `thr-parent-id`, `conversation-item-uri`.`uri` AS `conversation`, `post-thread`.`conversation-id` AS `conversation-id`, + `quote-item-uri`.`uri` AS `quote-uri`, + `post-content`.`quote-uri-id` AS `quote-uri-id`, `item-uri`.`guid` AS `guid`, `post`.`gravity` AS `gravity`, `external-item-uri`.`uri` AS `extid`, @@ -2279,6 +2290,7 @@ CREATE VIEW `post-view` AS SELECT LEFT JOIN `verb` ON `verb`.`id` = `post`.`vid` LEFT JOIN `diaspora-interaction` ON `diaspora-interaction`.`uri-id` = `post`.`uri-id` LEFT JOIN `post-content` ON `post-content`.`uri-id` = `post`.`uri-id` + LEFT JOIN `item-uri` AS `quote-item-uri` ON `quote-item-uri`.`id` = `post-content`.`quote-uri-id` LEFT JOIN `post-question` ON `post-question`.`uri-id` = `post`.`uri-id` LEFT JOIN `post` AS `parent-post` ON `parent-post`.`uri-id` = `post`.`parent-uri-id` LEFT JOIN `contact` AS `parent-post-author` ON `parent-post-author`.`id` = `parent-post`.`author-id`; @@ -2296,6 +2308,8 @@ CREATE VIEW `post-thread-view` AS SELECT `post`.`thr-parent-id` AS `thr-parent-id`, `conversation-item-uri`.`uri` AS `conversation`, `post-thread`.`conversation-id` AS `conversation-id`, + `quote-item-uri`.`uri` AS `quote-uri`, + `post-content`.`quote-uri-id` AS `quote-uri-id`, `item-uri`.`guid` AS `guid`, `post`.`gravity` AS `gravity`, `external-item-uri`.`uri` AS `extid`, @@ -2418,6 +2432,7 @@ CREATE VIEW `post-thread-view` AS SELECT LEFT JOIN `verb` ON `verb`.`id` = `post`.`vid` LEFT JOIN `diaspora-interaction` ON `diaspora-interaction`.`uri-id` = `post-thread`.`uri-id` LEFT JOIN `post-content` ON `post-content`.`uri-id` = `post-thread`.`uri-id` + LEFT JOIN `item-uri` AS `quote-item-uri` ON `quote-item-uri`.`id` = `post-content`.`quote-uri-id` LEFT JOIN `post-question` ON `post-question`.`uri-id` = `post-thread`.`uri-id` LEFT JOIN `post` AS `parent-post` ON `parent-post`.`uri-id` = `post`.`parent-uri-id` LEFT JOIN `contact` AS `parent-post-author` ON `parent-post-author`.`id` = `parent-post`.`author-id`; diff --git a/doc/database/db_post-content.md b/doc/database/db_post-content.md index 86714c5ec..27b372093 100644 --- a/doc/database/db_post-content.md +++ b/doc/database/db_post-content.md @@ -13,6 +13,7 @@ Fields | content-warning | | varchar(255) | NO | | | | | body | item body content | mediumtext | YES | | NULL | | | raw-body | Body without embedded media links | mediumtext | YES | | NULL | | +| quote-uri-id | Id of the item-uri table that contains the quoted uri | int unsigned | YES | | NULL | | | location | text location where this item originated | varchar(255) | NO | | | | | coord | longitude/latitude pair representing location where this item originated | varchar(255) | NO | | | | | language | Language information about this post | text | YES | | NULL | | @@ -35,6 +36,7 @@ Indexes | plink | plink(191) | | resource-id | resource-id | | title-content-warning-body | FULLTEXT, title, content-warning, body | +| quote-uri-id | quote-uri-id | Foreign Keys ------------ @@ -42,5 +44,6 @@ Foreign Keys | Field | Target Table | Target Field | |-------|--------------|--------------| | uri-id | [item-uri](help/database/db_item-uri) | id | +| quote-uri-id | [item-uri](help/database/db_item-uri) | id | Return to [database documentation](help/database) diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index 43d4127ea..59b2e77a4 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -1069,6 +1069,22 @@ class BBCode return $attributes; } + /** + * Replace the share block with a link + * + * @param string $body + * @return string + */ + public static function replaceSharedData(string $body): string + { + return BBCode::convertShare( + $body, + function (array $attributes) { + return '♲ ' . $attributes['link']; + } + ); + } + /** * This function converts a [share] block to text according to a provided callback function whose signature is: * diff --git a/src/Model/Item.php b/src/Model/Item.php index 381918535..797def3bd 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -93,7 +93,7 @@ class Item 'commented', 'created', 'edited', 'received', 'verb', 'object-type', 'postopts', 'plink', 'wall', 'private', 'starred', 'origin', 'parent-origin', 'title', 'body', 'language', 'content-warning', 'location', 'coord', 'app', 'rendered-hash', 'rendered-html', 'object', - 'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', 'mention', 'global', + 'quote-uri', 'quote-uri-id', 'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', 'mention', 'global', 'author-id', 'author-link', 'author-name', 'author-avatar', 'author-network', 'author-updated', 'author-gsid', 'author-addr', 'author-uri-id', 'owner-id', 'owner-link', 'owner-name', 'owner-avatar', 'owner-network', 'owner-contact-type', 'owner-updated', 'causer-id', 'causer-link', 'causer-name', 'causer-avatar', 'causer-contact-type', 'causer-network', @@ -115,7 +115,7 @@ class Item 'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', 'author-id', 'author-link', 'author-name', 'author-avatar', 'owner-id', 'owner-link', 'contact-uid', 'signed_text', 'network', 'wall', 'contact-id', 'plink', 'origin', - 'thr-parent-id', 'parent-uri-id', 'postopts', 'pubmail', + 'thr-parent-id', 'parent-uri-id', 'quote-uri', 'quote-uri-id', 'postopts', 'pubmail', 'event-created', 'event-edited', 'event-start', 'event-finish', 'event-summary', 'event-desc', 'event-location', 'event-type', 'event-nofinish', 'event-ignore', 'event-id']; @@ -123,7 +123,7 @@ class Item // All fields in the item table const ITEM_FIELDLIST = ['id', 'uid', 'parent', 'uri', 'parent-uri', 'thr-parent', 'guid', 'uri-id', 'parent-uri-id', 'thr-parent-id', 'conversation', 'vid', - 'contact-id', 'wall', 'gravity', 'extid', 'psid', + 'quote-uri', 'quote-uri-id', 'contact-id', 'wall', 'gravity', 'extid', 'psid', 'created', 'edited', 'commented', 'received', 'changed', 'verb', 'postopts', 'plink', 'resource-id', 'event-id', 'inform', 'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', 'post-type', 'post-reason', @@ -1119,6 +1119,11 @@ class Item $item['raw-body'] = Post\Media::insertFromBody($item['uri-id'], $item['raw-body']); $item['raw-body'] = self::setHashtags($item['raw-body']); + if ($quote_id = self::getQuoteUriId($item['body'])) { + $item['quote-uri-id'] = $quote_id; + $item['raw-body'] = BBCode::replaceSharedData($item['raw-body']); + } + if (!DBA::exists('contact', ['id' => $item['author-id'], 'network' => Protocol::DFRN])) { Post\Media::insertFromRelevantUrl($item['uri-id'], $item['raw-body']); } @@ -3629,4 +3634,19 @@ class Item Logger::debug('New shared data', ['uri-id' => $item['uri-id'], 'link' => $link, 'guid' => $item['guid']]); return $item['body']; } + + /** + * Fetch the uri-id of a quote + * + * @param string $body + * @return integer + */ + private static function getQuoteUriId(string $body): int + { + $shared = BBCode::fetchShareAttributes($body); + if (empty($shared['message_id'])) { + return 0; + } + return ItemURI::getIdByURI($shared['message_id']); + } } diff --git a/src/Protocol/ActivityPub/Transmitter.php b/src/Protocol/ActivityPub/Transmitter.php index 38482d3ec..de9a3535f 100644 --- a/src/Protocol/ActivityPub/Transmitter.php +++ b/src/Protocol/ActivityPub/Transmitter.php @@ -1662,10 +1662,9 @@ class Transmitter $body = BBCode::setMentionsToNicknames($body); - $shared = BBCode::fetchShareAttributes($body); - if (!empty($shared['link']) && !empty($shared['guid']) && !empty($shared['comment'])) { - $body = self::replaceSharedData($body); - $data['quoteUrl'] = $shared['link']; + if (!empty($item['quote-uri'])) { + $body = BBCode::replaceSharedData($body); + $data['quoteUrl'] = $item['quote-uri']; } $data['content'] = BBCode::convertForUriId($item['uri-id'], $body, BBCode::ACTIVITYPUB); @@ -1680,7 +1679,7 @@ class Transmitter $shared = BBCode::fetchShareAttributes($richbody); if (!empty($shared['link']) && !empty($shared['guid']) && !empty($shared['comment'])) { - $richbody = self::replaceSharedData($richbody); + $richbody = BBCode::replaceSharedData($richbody); } $richbody = BBCode::removeAttachment($richbody); @@ -1710,22 +1709,6 @@ class Transmitter return $data; } - /** - * Replace the share block with a link - * - * @param string $body - * @return string - */ - private static function replaceSharedData(string $body): string - { - return BBCode::convertShare( - $body, - function (array $attributes) { - return '♲ ' . $attributes['link']; - } - ); - } - /** * Fetches the language from the post, the user or the system. * diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index 90fea5bcf..5da1c1771 100644 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -55,7 +55,7 @@ use Friendica\Database\DBA; if (!defined('DB_UPDATE_VERSION')) { - define('DB_UPDATE_VERSION', 1484); + define('DB_UPDATE_VERSION', 1485); } return [ @@ -1218,6 +1218,7 @@ return [ "content-warning" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => ""], "body" => ["type" => "mediumtext", "comment" => "item body content"], "raw-body" => ["type" => "mediumtext", "comment" => "Body without embedded media links"], + "quote-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table that contains the quoted uri"], "location" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "text location where this item originated"], "coord" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "longitude/latitude pair representing location where this item originated"], "language" => ["type" => "text", "comment" => "Language information about this post"], @@ -1236,6 +1237,7 @@ return [ "plink" => ["plink(191)"], "resource-id" => ["resource-id"], "title-content-warning-body" => ["FULLTEXT", "title", "content-warning", "body"], + "quote-uri-id" => ["quote-uri-id"], ] ], "post-delivery" => [ diff --git a/static/dbview.config.php b/static/dbview.config.php index 2a7cb54fe..c12cccb4c 100644 --- a/static/dbview.config.php +++ b/static/dbview.config.php @@ -72,6 +72,8 @@ "thr-parent-id" => ["post-user", "thr-parent-id"], "conversation" => ["conversation-item-uri", "uri"], "conversation-id" => ["post-thread-user", "conversation-id"], + "quote-uri" => ["quote-item-uri", "uri"], + "quote-uri-id" => ["post-content", "quote-uri-id"], "guid" => ["item-uri", "guid"], "wall" => ["post-user", "wall"], "gravity" => ["post-user", "gravity"], @@ -229,6 +231,7 @@ LEFT JOIN `event` ON `event`.`id` = `post-user`.`event-id` LEFT JOIN `diaspora-interaction` ON `diaspora-interaction`.`uri-id` = `post-user`.`uri-id` LEFT JOIN `post-content` ON `post-content`.`uri-id` = `post-user`.`uri-id` + LEFT JOIN `item-uri` AS `quote-item-uri` ON `quote-item-uri`.`id` = `post-content`.`quote-uri-id` LEFT JOIN `post-delivery-data` ON `post-delivery-data`.`uri-id` = `post-user`.`uri-id` AND `post-user`.`origin` LEFT JOIN `post-question` ON `post-question`.`uri-id` = `post-user`.`uri-id` LEFT JOIN `permissionset` ON `permissionset`.`id` = `post-user`.`psid` @@ -249,6 +252,8 @@ "thr-parent-id" => ["post-user", "thr-parent-id"], "conversation" => ["conversation-item-uri", "uri"], "conversation-id" => ["post-thread-user", "conversation-id"], + "quote-uri" => ["quote-item-uri", "uri"], + "quote-uri-id" => ["post-content", "quote-uri-id"], "guid" => ["item-uri", "guid"], "wall" => ["post-thread-user", "wall"], "gravity" => ["post-user", "gravity"], @@ -404,6 +409,7 @@ LEFT JOIN `event` ON `event`.`id` = `post-user`.`event-id` LEFT JOIN `diaspora-interaction` ON `diaspora-interaction`.`uri-id` = `post-thread-user`.`uri-id` LEFT JOIN `post-content` ON `post-content`.`uri-id` = `post-thread-user`.`uri-id` + LEFT JOIN `item-uri` AS `quote-item-uri` ON `quote-item-uri`.`id` = `post-content`.`quote-uri-id` LEFT JOIN `post-delivery-data` ON `post-delivery-data`.`uri-id` = `post-thread-user`.`uri-id` AND `post-thread-user`.`origin` LEFT JOIN `post-question` ON `post-question`.`uri-id` = `post-thread-user`.`uri-id` LEFT JOIN `permissionset` ON `permissionset`.`id` = `post-thread-user`.`psid` @@ -420,6 +426,8 @@ "thr-parent-id" => ["post", "thr-parent-id"], "conversation" => ["conversation-item-uri", "uri"], "conversation-id" => ["post-thread", "conversation-id"], + "quote-uri" => ["quote-item-uri", "uri"], + "quote-uri-id" => ["post-content", "quote-uri-id"], "guid" => ["item-uri", "guid"], "gravity" => ["post", "gravity"], "extid" => ["external-item-uri", "uri"], @@ -544,6 +552,7 @@ LEFT JOIN `verb` ON `verb`.`id` = `post`.`vid` LEFT JOIN `diaspora-interaction` ON `diaspora-interaction`.`uri-id` = `post`.`uri-id` LEFT JOIN `post-content` ON `post-content`.`uri-id` = `post`.`uri-id` + LEFT JOIN `item-uri` AS `quote-item-uri` ON `quote-item-uri`.`id` = `post-content`.`quote-uri-id` LEFT JOIN `post-question` ON `post-question`.`uri-id` = `post`.`uri-id` LEFT JOIN `post` AS `parent-post` ON `parent-post`.`uri-id` = `post`.`parent-uri-id` LEFT JOIN `contact` AS `parent-post-author` ON `parent-post-author`.`id` = `parent-post`.`author-id`" @@ -558,6 +567,8 @@ "thr-parent-id" => ["post", "thr-parent-id"], "conversation" => ["conversation-item-uri", "uri"], "conversation-id" => ["post-thread", "conversation-id"], + "quote-uri" => ["quote-item-uri", "uri"], + "quote-uri-id" => ["post-content", "quote-uri-id"], "guid" => ["item-uri", "guid"], "gravity" => ["post", "gravity"], "extid" => ["external-item-uri", "uri"], @@ -682,6 +693,7 @@ LEFT JOIN `verb` ON `verb`.`id` = `post`.`vid` LEFT JOIN `diaspora-interaction` ON `diaspora-interaction`.`uri-id` = `post-thread`.`uri-id` LEFT JOIN `post-content` ON `post-content`.`uri-id` = `post-thread`.`uri-id` + LEFT JOIN `item-uri` AS `quote-item-uri` ON `quote-item-uri`.`id` = `post-content`.`quote-uri-id` LEFT JOIN `post-question` ON `post-question`.`uri-id` = `post-thread`.`uri-id` LEFT JOIN `post` AS `parent-post` ON `parent-post`.`uri-id` = `post`.`parent-uri-id` LEFT JOIN `contact` AS `parent-post-author` ON `parent-post-author`.`id` = `parent-post`.`author-id`" From 3e868416c72e9a827b8f4614ee70e05664313cfa Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 14 Oct 2022 22:02:25 +0000 Subject: [PATCH 02/27] Check for post existence --- src/Model/Item.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index 797def3bd..ceb8fcc88 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -1119,7 +1119,9 @@ class Item $item['raw-body'] = Post\Media::insertFromBody($item['uri-id'], $item['raw-body']); $item['raw-body'] = self::setHashtags($item['raw-body']); - if ($quote_id = self::getQuoteUriId($item['body'])) { + $quote_id = self::getQuoteUriId($item['body']); + + if (!empty($quote_id) && Post::exists(['uri-id' => $quote_id, 'network' => Protocol::FEDERATED])) { $item['quote-uri-id'] = $quote_id; $item['raw-body'] = BBCode::replaceSharedData($item['raw-body']); } From 34c3f189fc0368953a04f5b9c13aa86ced48ce1f Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 14 Oct 2022 22:48:03 +0000 Subject: [PATCH 03/27] Updated database.sql and messages.po --- database.sql | 2 +- view/lang/C/messages.po | 282 ++++++++++++++++++++-------------------- 2 files changed, 142 insertions(+), 142 deletions(-) diff --git a/database.sql b/database.sql index 119228656..c1b64fbed 100644 --- a/database.sql +++ b/database.sql @@ -1,5 +1,5 @@ -- ------------------------------------------ --- Friendica 2022.09-rc (Giant Rhubarb) +-- Friendica 2022.12-dev (Giant Rhubarb) -- DB_UPDATE_VERSION 1485 -- ------------------------------------------ diff --git a/view/lang/C/messages.po b/view/lang/C/messages.po index 080bd7366..1552d9cf3 100644 --- a/view/lang/C/messages.po +++ b/view/lang/C/messages.po @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: 2022.09-rc\n" +"Project-Id-Version: 2022.12-dev\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-25 07:08+0000\n" +"POT-Creation-Date: 2022-10-14 22:46+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -19,7 +19,7 @@ msgstr "" #: mod/cal.php:46 mod/cal.php:50 mod/follow.php:39 mod/redir.php:36 -#: mod/redir.php:177 src/Module/Conversation/Community.php:183 +#: mod/redir.php:177 src/Module/Conversation/Community.php:181 #: src/Module/Debug/ItemBody.php:38 src/Module/Diaspora/Receive.php:57 #: src/Module/Item/Follow.php:42 src/Module/Item/Ignore.php:41 #: src/Module/Item/Pin.php:42 src/Module/Item/Pin.php:57 @@ -105,7 +105,7 @@ msgid "calendar" msgstr "" #: mod/display.php:143 mod/photos.php:802 -#: src/Module/Conversation/Community.php:177 src/Module/Directory.php:49 +#: src/Module/Conversation/Community.php:175 src/Module/Directory.php:49 #: src/Module/Search/Index.php:65 msgid "Public access denied." msgstr "" @@ -119,7 +119,7 @@ msgid "The feed for this item is unavailable." msgstr "" #: mod/editpost.php:38 mod/events.php:217 mod/follow.php:56 mod/follow.php:130 -#: mod/item.php:181 mod/item.php:186 mod/item.php:870 mod/message.php:69 +#: mod/item.php:181 mod/item.php:186 mod/item.php:865 mod/message.php:69 #: mod/message.php:111 mod/notes.php:44 mod/ostatus_subscribe.php:33 #: mod/photos.php:160 mod/photos.php:891 mod/repair_ostatus.php:31 #: mod/settings.php:40 mod/settings.php:50 mod/settings.php:156 @@ -267,7 +267,7 @@ msgstr "" msgid "Preview" msgstr "" -#: mod/editpost.php:130 mod/fbrowser.php:118 mod/fbrowser.php:145 +#: mod/editpost.php:130 mod/fbrowser.php:119 mod/fbrowser.php:146 #: mod/follow.php:144 mod/photos.php:1004 mod/photos.php:1105 mod/tagrm.php:35 #: mod/tagrm.php:127 mod/unfollow.php:97 src/Content/Conversation.php:386 #: src/Module/Contact/Revoke.php:108 src/Module/RemoteFollow.php:127 @@ -426,7 +426,7 @@ msgstr "" msgid "Basic" msgstr "" -#: mod/events.php:517 src/Module/Admin/Site.php:441 src/Module/Contact.php:475 +#: mod/events.php:517 src/Module/Admin/Site.php:441 src/Module/Contact.php:477 #: src/Module/Profile/Profile.php:249 msgid "Advanced" msgstr "" @@ -440,12 +440,12 @@ msgstr "" msgid "Photos" msgstr "" -#: mod/fbrowser.php:120 mod/fbrowser.php:147 +#: mod/fbrowser.php:121 mod/fbrowser.php:148 #: src/Module/Settings/Profile/Photo/Index.php:129 msgid "Upload" msgstr "" -#: mod/fbrowser.php:142 +#: mod/fbrowser.php:143 msgid "Files" msgstr "" @@ -469,8 +469,8 @@ msgstr "" msgid "OStatus support is disabled. Contact can't be added." msgstr "" -#: mod/follow.php:138 src/Content/Item.php:397 src/Content/Widget.php:80 -#: src/Model/Contact.php:1146 src/Model/Contact.php:1157 +#: mod/follow.php:138 src/Content/Item.php:400 src/Content/Widget.php:80 +#: src/Model/Contact.php:1169 src/Model/Contact.php:1180 #: view/theme/vier/theme.php:181 msgid "Connect/Follow" msgstr "" @@ -507,7 +507,7 @@ msgid "Add a personal note:" msgstr "" #: mod/follow.php:163 mod/unfollow.php:109 src/Module/BaseProfile.php:59 -#: src/Module/Contact.php:445 +#: src/Module/Contact.php:447 msgid "Status Messages and Posts" msgstr "" @@ -523,19 +523,19 @@ msgstr "" msgid "Empty post discarded." msgstr "" -#: mod/item.php:682 +#: mod/item.php:677 msgid "Post updated." msgstr "" -#: mod/item.php:692 mod/item.php:697 +#: mod/item.php:687 mod/item.php:692 msgid "Item wasn't stored." msgstr "" -#: mod/item.php:708 +#: mod/item.php:703 msgid "Item couldn't be fetched." msgstr "" -#: mod/item.php:848 src/Module/Admin/Themes/Details.php:39 +#: mod/item.php:843 src/Module/Admin/Themes/Details.php:39 #: src/Module/Admin/Themes/Index.php:59 src/Module/Debug/ItemBody.php:42 #: src/Module/Debug/ItemBody.php:57 msgid "Item not found." @@ -1070,7 +1070,7 @@ msgid "Rotate CCW (left)" msgstr "" #: mod/photos.php:1333 mod/photos.php:1389 mod/photos.php:1463 -#: src/Module/Contact.php:545 src/Module/Item/Compose.php:160 +#: src/Module/Contact.php:547 src/Module/Item/Compose.php:160 #: src/Object/Post.php:989 msgid "This is you" msgstr "" @@ -1411,15 +1411,15 @@ msgstr "" msgid "Friend Suggestions" msgstr "" -#: mod/tagger.php:78 src/Content/Item.php:297 src/Model/Item.php:2846 +#: mod/tagger.php:78 src/Content/Item.php:300 src/Model/Item.php:2855 msgid "photo" msgstr "" -#: mod/tagger.php:78 src/Content/Item.php:291 src/Content/Item.php:301 +#: mod/tagger.php:78 src/Content/Item.php:294 src/Content/Item.php:304 msgid "status" msgstr "" -#: mod/tagger.php:111 src/Content/Item.php:311 +#: mod/tagger.php:111 src/Content/Item.php:314 #, php-format msgid "%1$s tagged %2$s's %3$s with %4$s" msgstr "" @@ -1595,16 +1595,16 @@ msgid "All contacts" msgstr "" #: src/BaseModule.php:424 src/Content/Widget.php:235 src/Core/ACL.php:194 -#: src/Module/Contact.php:368 src/Module/PermissionTooltip.php:122 +#: src/Module/Contact.php:370 src/Module/PermissionTooltip.php:122 #: src/Module/PermissionTooltip.php:144 msgid "Followers" msgstr "" -#: src/BaseModule.php:429 src/Content/Widget.php:236 src/Module/Contact.php:369 +#: src/BaseModule.php:429 src/Content/Widget.php:236 src/Module/Contact.php:371 msgid "Following" msgstr "" -#: src/BaseModule.php:434 src/Content/Widget.php:237 src/Module/Contact.php:370 +#: src/BaseModule.php:434 src/Content/Widget.php:237 src/Module/Contact.php:372 msgid "Mutual friends" msgstr "" @@ -2292,50 +2292,50 @@ msgstr "" msgid "show more" msgstr "" -#: src/Content/Item.php:288 src/Model/Item.php:2844 +#: src/Content/Item.php:291 src/Model/Item.php:2853 msgid "event" msgstr "" -#: src/Content/Item.php:380 view/theme/frio/theme.php:266 +#: src/Content/Item.php:383 view/theme/frio/theme.php:266 msgid "Follow Thread" msgstr "" -#: src/Content/Item.php:381 src/Model/Contact.php:1151 +#: src/Content/Item.php:384 src/Model/Contact.php:1174 msgid "View Status" msgstr "" -#: src/Content/Item.php:382 src/Content/Item.php:400 src/Model/Contact.php:1089 -#: src/Model/Contact.php:1143 src/Model/Contact.php:1152 +#: src/Content/Item.php:385 src/Content/Item.php:403 src/Model/Contact.php:1112 +#: src/Model/Contact.php:1166 src/Model/Contact.php:1175 #: src/Module/Directory.php:158 src/Module/Settings/Profile/Index.php:225 msgid "View Profile" msgstr "" -#: src/Content/Item.php:383 src/Model/Contact.php:1153 +#: src/Content/Item.php:386 src/Model/Contact.php:1176 msgid "View Photos" msgstr "" -#: src/Content/Item.php:384 src/Model/Contact.php:1144 -#: src/Model/Contact.php:1154 +#: src/Content/Item.php:387 src/Model/Contact.php:1167 +#: src/Model/Contact.php:1177 msgid "Network Posts" msgstr "" -#: src/Content/Item.php:385 src/Model/Contact.php:1145 -#: src/Model/Contact.php:1155 +#: src/Content/Item.php:388 src/Model/Contact.php:1168 +#: src/Model/Contact.php:1178 msgid "View Contact" msgstr "" -#: src/Content/Item.php:386 src/Model/Contact.php:1156 +#: src/Content/Item.php:389 src/Model/Contact.php:1179 msgid "Send PM" msgstr "" -#: src/Content/Item.php:387 src/Module/Admin/Blocklist/Contact.php:100 +#: src/Content/Item.php:390 src/Module/Admin/Blocklist/Contact.php:100 #: src/Module/Admin/Users/Active.php:140 src/Module/Admin/Users/Index.php:154 -#: src/Module/Contact.php:399 src/Module/Contact/Profile.php:348 +#: src/Module/Contact.php:401 src/Module/Contact/Profile.php:348 #: src/Module/Contact/Profile.php:449 msgid "Block" msgstr "" -#: src/Content/Item.php:388 src/Module/Contact.php:400 +#: src/Content/Item.php:391 src/Module/Contact.php:402 #: src/Module/Contact/Profile.php:349 src/Module/Contact/Profile.php:457 #: src/Module/Notifications/Introductions.php:132 #: src/Module/Notifications/Introductions.php:204 @@ -2343,7 +2343,7 @@ msgstr "" msgid "Ignore" msgstr "" -#: src/Content/Item.php:392 src/Object/Post.php:455 +#: src/Content/Item.php:395 src/Object/Post.php:455 msgid "Languages" msgstr "" @@ -2381,7 +2381,7 @@ msgid "Sign in" msgstr "" #: src/Content/Nav.php:192 src/Module/BaseProfile.php:56 -#: src/Module/Contact.php:434 src/Module/Contact/Profile.php:380 +#: src/Module/Contact.php:436 src/Module/Contact/Profile.php:380 #: src/Module/Settings/TwoFactor/Index.php:120 view/theme/frio/theme.php:236 msgid "Status" msgstr "" @@ -2392,7 +2392,7 @@ msgid "Your posts and conversations" msgstr "" #: src/Content/Nav.php:193 src/Module/BaseProfile.php:48 -#: src/Module/BaseSettings.php:55 src/Module/Contact.php:458 +#: src/Module/BaseSettings.php:55 src/Module/Contact.php:460 #: src/Module/Contact/Profile.php:382 src/Module/Profile/Profile.php:241 #: src/Module/Welcome.php:57 view/theme/frio/theme.php:237 msgid "Profile" @@ -2407,7 +2407,7 @@ msgid "Your photos" msgstr "" #: src/Content/Nav.php:195 src/Module/BaseProfile.php:72 -#: src/Module/BaseProfile.php:75 src/Module/Contact.php:450 +#: src/Module/BaseProfile.php:75 src/Module/Contact.php:452 #: view/theme/frio/theme.php:239 msgid "Media" msgstr "" @@ -2481,8 +2481,8 @@ msgstr "" #: src/Content/Nav.php:237 src/Content/Nav.php:296 #: src/Content/Text/HTML.php:899 src/Module/BaseProfile.php:125 -#: src/Module/BaseProfile.php:128 src/Module/Contact.php:371 -#: src/Module/Contact.php:465 view/theme/frio/theme.php:247 +#: src/Module/BaseProfile.php:128 src/Module/Contact.php:373 +#: src/Module/Contact.php:467 view/theme/frio/theme.php:247 msgid "Contacts" msgstr "" @@ -2628,39 +2628,39 @@ msgstr "" msgid "last" msgstr "" -#: src/Content/Text/BBCode.php:998 src/Content/Text/BBCode.php:1833 -#: src/Content/Text/BBCode.php:1834 +#: src/Content/Text/BBCode.php:1002 src/Content/Text/BBCode.php:1867 +#: src/Content/Text/BBCode.php:1868 msgid "Image/photo" msgstr "" -#: src/Content/Text/BBCode.php:1188 +#: src/Content/Text/BBCode.php:1222 #, php-format msgid "" "%2$s %3$s" msgstr "" -#: src/Content/Text/BBCode.php:1213 src/Model/Item.php:3420 -#: src/Model/Item.php:3426 src/Model/Item.php:3427 +#: src/Content/Text/BBCode.php:1247 src/Model/Item.php:3429 +#: src/Model/Item.php:3435 src/Model/Item.php:3436 msgid "Link to source" msgstr "" -#: src/Content/Text/BBCode.php:1751 src/Content/Text/HTML.php:940 +#: src/Content/Text/BBCode.php:1785 src/Content/Text/HTML.php:940 msgid "Click to open/close" msgstr "" -#: src/Content/Text/BBCode.php:1782 +#: src/Content/Text/BBCode.php:1816 msgid "$1 wrote:" msgstr "" -#: src/Content/Text/BBCode.php:1838 src/Content/Text/BBCode.php:1839 +#: src/Content/Text/BBCode.php:1872 src/Content/Text/BBCode.php:1873 msgid "Encrypted content" msgstr "" -#: src/Content/Text/BBCode.php:2057 +#: src/Content/Text/BBCode.php:2093 msgid "Invalid source protocol" msgstr "" -#: src/Content/Text/BBCode.php:2072 +#: src/Content/Text/BBCode.php:2108 msgid "Invalid link protocol" msgstr "" @@ -2712,7 +2712,7 @@ msgstr "" msgid "Examples: Robert Morgenstein, Fishing" msgstr "" -#: src/Content/Widget.php:82 src/Module/Contact.php:392 +#: src/Content/Widget.php:82 src/Module/Contact.php:394 #: src/Module/Directory.php:97 view/theme/vier/theme.php:183 msgid "Find" msgstr "" @@ -2739,7 +2739,7 @@ msgid "Local Directory" msgstr "" #: src/Content/Widget.php:211 src/Model/Group.php:587 -#: src/Module/Contact.php:355 src/Module/Welcome.php:76 +#: src/Module/Contact.php:357 src/Module/Welcome.php:76 msgid "Groups" msgstr "" @@ -2751,7 +2751,7 @@ msgstr "" msgid "Relationships" msgstr "" -#: src/Content/Widget.php:244 src/Module/Contact.php:307 +#: src/Content/Widget.php:244 src/Module/Contact.php:309 #: src/Module/Group.php:293 msgid "All Contacts" msgstr "" @@ -2795,7 +2795,7 @@ msgstr "" msgid "Organisations" msgstr "" -#: src/Content/Widget.php:523 src/Model/Contact.php:1582 +#: src/Content/Widget.php:523 src/Model/Contact.php:1605 msgid "News" msgstr "" @@ -3588,81 +3588,81 @@ msgstr "" msgid "Legacy module file not found: %s" msgstr "" -#: src/Model/Contact.php:1147 src/Model/Contact.php:1158 +#: src/Model/Contact.php:1170 src/Model/Contact.php:1181 msgid "UnFollow" msgstr "" -#: src/Model/Contact.php:1164 src/Module/Admin/Users/Pending.php:107 +#: src/Model/Contact.php:1187 src/Module/Admin/Users/Pending.php:107 #: src/Module/Notifications/Introductions.php:130 #: src/Module/Notifications/Introductions.php:202 msgid "Approve" msgstr "" -#: src/Model/Contact.php:1578 +#: src/Model/Contact.php:1601 msgid "Organisation" msgstr "" -#: src/Model/Contact.php:1586 +#: src/Model/Contact.php:1609 msgid "Forum" msgstr "" -#: src/Model/Contact.php:2774 +#: src/Model/Contact.php:2795 msgid "Disallowed profile URL." msgstr "" -#: src/Model/Contact.php:2779 src/Module/Friendica.php:81 +#: src/Model/Contact.php:2800 src/Module/Friendica.php:81 msgid "Blocked domain" msgstr "" -#: src/Model/Contact.php:2784 +#: src/Model/Contact.php:2805 msgid "Connect URL missing." msgstr "" -#: src/Model/Contact.php:2793 +#: src/Model/Contact.php:2814 msgid "" "The contact could not be added. Please check the relevant network " "credentials in your Settings -> Social Networks page." msgstr "" -#: src/Model/Contact.php:2835 +#: src/Model/Contact.php:2856 msgid "The profile address specified does not provide adequate information." msgstr "" -#: src/Model/Contact.php:2837 +#: src/Model/Contact.php:2858 msgid "No compatible communication protocols or feeds were discovered." msgstr "" -#: src/Model/Contact.php:2840 +#: src/Model/Contact.php:2861 msgid "An author or name was not found." msgstr "" -#: src/Model/Contact.php:2843 +#: src/Model/Contact.php:2864 msgid "No browser URL could be matched to this address." msgstr "" -#: src/Model/Contact.php:2846 +#: src/Model/Contact.php:2867 msgid "" "Unable to match @-style Identity Address with a known protocol or email " "contact." msgstr "" -#: src/Model/Contact.php:2847 +#: src/Model/Contact.php:2868 msgid "Use mailto: in front of address to force email check." msgstr "" -#: src/Model/Contact.php:2853 +#: src/Model/Contact.php:2874 msgid "" "The profile address specified belongs to a network which has been disabled " "on this site." msgstr "" -#: src/Model/Contact.php:2858 +#: src/Model/Contact.php:2879 msgid "" "Limited profile. This person will be unable to receive direct/personal " "notifications from you." msgstr "" -#: src/Model/Contact.php:2917 +#: src/Model/Contact.php:2938 msgid "Unable to retrieve contact information." msgstr "" @@ -3782,66 +3782,66 @@ msgstr "" msgid "Edit groups" msgstr "" -#: src/Model/Item.php:1956 +#: src/Model/Item.php:1965 #, php-format msgid "Detected languages in this post:\\n%s" msgstr "" -#: src/Model/Item.php:2848 +#: src/Model/Item.php:2857 msgid "activity" msgstr "" -#: src/Model/Item.php:2850 +#: src/Model/Item.php:2859 msgid "comment" msgstr "" -#: src/Model/Item.php:2853 +#: src/Model/Item.php:2862 msgid "post" msgstr "" -#: src/Model/Item.php:2969 +#: src/Model/Item.php:2978 #, php-format msgid "Content warning: %s" msgstr "" -#: src/Model/Item.php:3332 +#: src/Model/Item.php:3341 msgid "bytes" msgstr "" -#: src/Model/Item.php:3363 +#: src/Model/Item.php:3372 #, php-format msgid "%2$s (%3$d%%, %1$d vote)" msgid_plural "%2$s (%3$d%%, %1$d votes)" msgstr[0] "" msgstr[1] "" -#: src/Model/Item.php:3365 +#: src/Model/Item.php:3374 #, php-format msgid "%2$s (%1$d vote)" msgid_plural "%2$s (%1$d votes)" msgstr[0] "" msgstr[1] "" -#: src/Model/Item.php:3370 +#: src/Model/Item.php:3379 #, php-format msgid "%d voter. Poll end: %s" msgid_plural "%d voters. Poll end: %s" msgstr[0] "" msgstr[1] "" -#: src/Model/Item.php:3372 +#: src/Model/Item.php:3381 #, php-format msgid "%d voter." msgid_plural "%d voters." msgstr[0] "" msgstr[1] "" -#: src/Model/Item.php:3374 +#: src/Model/Item.php:3383 #, php-format msgid "Poll end: %s" msgstr "" -#: src/Model/Item.php:3408 src/Model/Item.php:3409 +#: src/Model/Item.php:3417 src/Model/Item.php:3418 msgid "View on separate page" msgstr "" @@ -4292,7 +4292,7 @@ msgstr "" #: src/Module/Admin/Blocklist/Server/Add.php:121 #: src/Module/Admin/Blocklist/Server/Import.php:117 #: src/Module/Admin/Blocklist/Server/Index.php:93 -#: src/Module/Admin/Federation.php:200 src/Module/Admin/Item/Delete.php:64 +#: src/Module/Admin/Federation.php:201 src/Module/Admin/Item/Delete.php:64 #: src/Module/Admin/Logs/Settings.php:79 src/Module/Admin/Logs/View.php:84 #: src/Module/Admin/Queue.php:72 src/Module/Admin/Site.php:433 #: src/Module/Admin/Storage.php:138 src/Module/Admin/Summary.php:233 @@ -4357,8 +4357,8 @@ msgstr "" msgid "List of active accounts" msgstr "" -#: src/Module/Admin/BaseUsers.php:67 src/Module/Contact.php:315 -#: src/Module/Contact.php:375 +#: src/Module/Admin/BaseUsers.php:67 src/Module/Contact.php:317 +#: src/Module/Contact.php:377 msgid "Pending" msgstr "" @@ -4366,8 +4366,8 @@ msgstr "" msgid "List of pending registrations" msgstr "" -#: src/Module/Admin/BaseUsers.php:75 src/Module/Contact.php:323 -#: src/Module/Contact.php:376 +#: src/Module/Admin/BaseUsers.php:75 src/Module/Contact.php:325 +#: src/Module/Contact.php:378 msgid "Blocked" msgstr "" @@ -4460,7 +4460,7 @@ msgstr "" #: src/Module/Admin/Blocklist/Contact.php:101 #: src/Module/Admin/Users/Blocked.php:142 src/Module/Admin/Users/Index.php:156 -#: src/Module/Contact.php:399 src/Module/Contact/Profile.php:348 +#: src/Module/Contact.php:401 src/Module/Contact/Profile.php:348 #: src/Module/Contact/Profile.php:449 msgid "Unblock" msgstr "" @@ -4821,75 +4821,75 @@ msgstr "" msgid "Manage Additional Features" msgstr "" -#: src/Module/Admin/Federation.php:68 +#: src/Module/Admin/Federation.php:69 msgid "Other" msgstr "" -#: src/Module/Admin/Federation.php:140 src/Module/Admin/Federation.php:389 +#: src/Module/Admin/Federation.php:141 src/Module/Admin/Federation.php:390 msgid "unknown" msgstr "" -#: src/Module/Admin/Federation.php:173 +#: src/Module/Admin/Federation.php:174 #, php-format msgid "%2$s total system" msgid_plural "%2$s total systems" msgstr[0] "" msgstr[1] "" -#: src/Module/Admin/Federation.php:174 +#: src/Module/Admin/Federation.php:175 #, php-format msgid "%2$s active user last month" msgid_plural "%2$s active users last month" msgstr[0] "" msgstr[1] "" -#: src/Module/Admin/Federation.php:175 +#: src/Module/Admin/Federation.php:176 #, php-format msgid "%2$s active user last six months" msgid_plural "%2$s active users last six months" msgstr[0] "" msgstr[1] "" -#: src/Module/Admin/Federation.php:176 +#: src/Module/Admin/Federation.php:177 #, php-format msgid "%2$s registered user" msgid_plural "%2$s registered users" msgstr[0] "" msgstr[1] "" -#: src/Module/Admin/Federation.php:177 +#: src/Module/Admin/Federation.php:178 #, php-format msgid "%2$s locally created post or comment" msgid_plural "%2$s locally created posts and comments" msgstr[0] "" msgstr[1] "" -#: src/Module/Admin/Federation.php:180 +#: src/Module/Admin/Federation.php:181 #, php-format msgid "%2$s post per user" msgid_plural "%2$s posts per user" msgstr[0] "" msgstr[1] "" -#: src/Module/Admin/Federation.php:185 +#: src/Module/Admin/Federation.php:186 #, php-format msgid "%2$s user per system" msgid_plural "%2$s users per system" msgstr[0] "" msgstr[1] "" -#: src/Module/Admin/Federation.php:195 +#: src/Module/Admin/Federation.php:196 msgid "" "This page offers you some numbers to the known part of the federated social " "network your Friendica node is part of. These numbers are not complete but " "only reflect the part of the network your node is aware of." msgstr "" -#: src/Module/Admin/Federation.php:201 src/Module/BaseAdmin.php:90 +#: src/Module/Admin/Federation.php:202 src/Module/BaseAdmin.php:90 msgid "Federation Statistics" msgstr "" -#: src/Module/Admin/Federation.php:205 +#: src/Module/Admin/Federation.php:206 #, php-format msgid "" "Currently this node is aware of %2$s node (%3$s active users last month, " @@ -6733,7 +6733,7 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/Module/BaseProfile.php:51 src/Module/Contact.php:461 +#: src/Module/BaseProfile.php:51 src/Module/Contact.php:463 msgid "Profile Details" msgstr "" @@ -6807,110 +6807,110 @@ msgid_plural "%d contacts edited." msgstr[0] "" msgstr[1] "" -#: src/Module/Contact.php:310 +#: src/Module/Contact.php:312 msgid "Show all contacts" msgstr "" -#: src/Module/Contact.php:318 +#: src/Module/Contact.php:320 msgid "Only show pending contacts" msgstr "" -#: src/Module/Contact.php:326 +#: src/Module/Contact.php:328 msgid "Only show blocked contacts" msgstr "" -#: src/Module/Contact.php:331 src/Module/Contact.php:378 +#: src/Module/Contact.php:333 src/Module/Contact.php:380 #: src/Object/Post.php:339 msgid "Ignored" msgstr "" -#: src/Module/Contact.php:334 +#: src/Module/Contact.php:336 msgid "Only show ignored contacts" msgstr "" -#: src/Module/Contact.php:339 src/Module/Contact.php:379 +#: src/Module/Contact.php:341 src/Module/Contact.php:381 msgid "Archived" msgstr "" -#: src/Module/Contact.php:342 +#: src/Module/Contact.php:344 msgid "Only show archived contacts" msgstr "" -#: src/Module/Contact.php:347 src/Module/Contact.php:377 +#: src/Module/Contact.php:349 src/Module/Contact.php:379 msgid "Hidden" msgstr "" -#: src/Module/Contact.php:350 +#: src/Module/Contact.php:352 msgid "Only show hidden contacts" msgstr "" -#: src/Module/Contact.php:358 +#: src/Module/Contact.php:360 msgid "Organize your contact groups" msgstr "" -#: src/Module/Contact.php:390 +#: src/Module/Contact.php:392 msgid "Search your contacts" msgstr "" -#: src/Module/Contact.php:391 src/Module/Search/Index.php:207 +#: src/Module/Contact.php:393 src/Module/Search/Index.php:207 #, php-format msgid "Results for: %s" msgstr "" -#: src/Module/Contact.php:398 +#: src/Module/Contact.php:400 msgid "Update" msgstr "" -#: src/Module/Contact.php:400 src/Module/Contact/Profile.php:349 +#: src/Module/Contact.php:402 src/Module/Contact/Profile.php:349 #: src/Module/Contact/Profile.php:457 msgid "Unignore" msgstr "" -#: src/Module/Contact.php:402 +#: src/Module/Contact.php:404 msgid "Batch Actions" msgstr "" -#: src/Module/Contact.php:437 +#: src/Module/Contact.php:439 msgid "Conversations started by this contact" msgstr "" -#: src/Module/Contact.php:442 +#: src/Module/Contact.php:444 msgid "Posts and Comments" msgstr "" -#: src/Module/Contact.php:453 +#: src/Module/Contact.php:455 msgid "Posts containing media objects" msgstr "" -#: src/Module/Contact.php:468 +#: src/Module/Contact.php:470 msgid "View all known contacts" msgstr "" -#: src/Module/Contact.php:478 +#: src/Module/Contact.php:480 msgid "Advanced Contact Settings" msgstr "" -#: src/Module/Contact.php:512 +#: src/Module/Contact.php:514 msgid "Mutual Friendship" msgstr "" -#: src/Module/Contact.php:516 +#: src/Module/Contact.php:518 msgid "is a fan of yours" msgstr "" -#: src/Module/Contact.php:520 +#: src/Module/Contact.php:522 msgid "you are a fan of" msgstr "" -#: src/Module/Contact.php:538 +#: src/Module/Contact.php:540 msgid "Pending outgoing contact request" msgstr "" -#: src/Module/Contact.php:540 +#: src/Module/Contact.php:542 msgid "Pending incoming contact request" msgstr "" -#: src/Module/Contact.php:553 src/Module/Contact/Profile.php:334 +#: src/Module/Contact.php:555 src/Module/Contact/Profile.php:334 #, php-format msgid "Visit %s's profile [%s]" msgstr "" @@ -7262,44 +7262,44 @@ msgid "" "not reflect the opinions of this node’s users." msgstr "" -#: src/Module/Conversation/Community.php:76 +#: src/Module/Conversation/Community.php:74 msgid "Local Community" msgstr "" -#: src/Module/Conversation/Community.php:79 +#: src/Module/Conversation/Community.php:77 msgid "Posts from local users on this server" msgstr "" -#: src/Module/Conversation/Community.php:87 +#: src/Module/Conversation/Community.php:85 msgid "Global Community" msgstr "" -#: src/Module/Conversation/Community.php:90 +#: src/Module/Conversation/Community.php:88 msgid "Posts from users of the whole federated network" msgstr "" -#: src/Module/Conversation/Community.php:123 +#: src/Module/Conversation/Community.php:121 msgid "Own Contacts" msgstr "" -#: src/Module/Conversation/Community.php:127 +#: src/Module/Conversation/Community.php:125 msgid "Include" msgstr "" -#: src/Module/Conversation/Community.php:128 +#: src/Module/Conversation/Community.php:126 msgid "Hide" msgstr "" -#: src/Module/Conversation/Community.php:145 src/Module/Search/Index.php:152 +#: src/Module/Conversation/Community.php:143 src/Module/Search/Index.php:152 #: src/Module/Search/Index.php:194 msgid "No results." msgstr "" -#: src/Module/Conversation/Community.php:201 +#: src/Module/Conversation/Community.php:199 msgid "Community option not available." msgstr "" -#: src/Module/Conversation/Community.php:217 +#: src/Module/Conversation/Community.php:215 msgid "Not available." msgstr "" From f862d73f49d5d1e4b65bb9d62eb1fc02703f32b9 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 15 Oct 2022 09:25:11 +0200 Subject: [PATCH 04/27] added PHP GMP module to the installation section of the Vagrant VM provision --- bin/dev/vagrant_provision.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/dev/vagrant_provision.sh b/bin/dev/vagrant_provision.sh index 3992550ee..d82ed2823 100755 --- a/bin/dev/vagrant_provision.sh +++ b/bin/dev/vagrant_provision.sh @@ -51,7 +51,7 @@ service apache2 restart #Install php echo ">>> Installing PHP7" -apt-get install -qq php libapache2-mod-php php-cli php-mysql php-curl php-gd php-mbstring php-xml imagemagick php-imagick php-zip +apt-get install -qq php libapache2-mod-php php-cli php-mysql php-curl php-gd php-mbstring php-xml imagemagick php-imagick php-zip php-gmp systemctl restart apache2 echo ">>> Installing PHP8" @@ -59,7 +59,7 @@ apt-get install -qq -y lsb-release ca-certificates apt-transport-https software- echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/sury-php.list wget -qO - https://packages.sury.org/php/apt.gpg | sudo apt-key add - apt update -apt-get install -qq php8.0 php8.0-cli php8.0-mysql php8.0-curl php8.0-gd php8.0-mbstring php8.0-xml php8.0-imagick php8.0-zip +apt-get install -qq php8.0 php8.0-cli php8.0-mysql php8.0-curl php8.0-gd php8.0-mbstring php8.0-xml php8.0-imagick php8.0-zip php8.0-gmp systemctl restart apache2 #Install mysql From 8e1af9277a48f74f66b97271657c082154f38450 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 15 Oct 2022 13:00:52 +0000 Subject: [PATCH 05/27] Improve quite generation --- src/Content/Item.php | 10 ++++++--- src/Content/Text/BBCode.php | 18 ++++++++++++++- src/Model/Item.php | 7 +++--- src/Protocol/ActivityPub/Transmitter.php | 28 +++++++++++++++++++----- 4 files changed, 51 insertions(+), 12 deletions(-) diff --git a/src/Content/Item.php b/src/Content/Item.php index 6cbcb6369..1838d4ac4 100644 --- a/src/Content/Item.php +++ b/src/Content/Item.php @@ -574,9 +574,10 @@ class Item * * @param string $url * @param integer $uid + * @param bool $add_media * @return string */ - public function createSharedPostByUrl(string $url, int $uid = 0): string + public function createSharedPostByUrl(string $url, int $uid = 0, bool $add_media = false): string { if (!empty($uid)) { $id = ModelItem::searchByLink($url, $uid); @@ -599,7 +600,7 @@ class Item return ''; } - return $this->createSharedBlockByArray($shared_item); + return $this->createSharedBlockByArray($shared_item, $add_media); } /** @@ -652,9 +653,10 @@ class Item * Add a share block for the given item array * * @param array $item + * @param bool $add_media * @return string */ - public function createSharedBlockByArray(array $item): string + public function createSharedBlockByArray(array $item, bool $add_media = false): string { if ($item['network'] == Protocol::FEED) { return PageInfo::getFooterFromUrl($item['plink']); @@ -662,6 +664,8 @@ class Item $item['guid'] = ''; $item['uri'] = ''; $item['body'] = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']); + } elseif ($add_media) { + $item['body'] = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']); } $shared_content = BBCode::getShareOpeningTag($item['author-name'], $item['author-link'], $item['author-avatar'], $item['plink'], $item['created'], $item['guid'], $item['uri']); diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index 59b2e77a4..d03161df9 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -1085,6 +1085,22 @@ class BBCode ); } + /** + * Remove the share block + * + * @param string $body + * @return string + */ + public static function removeSharedData(string $body): string + { + return BBCode::convertShare( + $body, + function (array $attributes) { + return ''; + } + ); + } + /** * This function converts a [share] block to text according to a provided callback function whose signature is: * @@ -1134,7 +1150,7 @@ class BBCode ); DI::profiler()->stopRecording(); - return $return; + return trim($return); } /** diff --git a/src/Model/Item.php b/src/Model/Item.php index ceb8fcc88..439c1b990 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -1123,7 +1123,7 @@ class Item if (!empty($quote_id) && Post::exists(['uri-id' => $quote_id, 'network' => Protocol::FEDERATED])) { $item['quote-uri-id'] = $quote_id; - $item['raw-body'] = BBCode::replaceSharedData($item['raw-body']); + $item['raw-body'] = BBCode::removeSharedData($item['raw-body']); } if (!DBA::exists('contact', ['id' => $item['author-id'], 'network' => Protocol::DFRN])) { @@ -3612,9 +3612,10 @@ class Item * Improve the data in shared posts * * @param array $item + * @param bool $add_media * @return string body */ - public static function improveSharedDataInBody(array $item): string + public static function improveSharedDataInBody(array $item, bool $add_media = false): string { $shared = BBCode::fetchShareAttributes($item['body']); if (empty($shared['guid']) && empty($shared['message_id'])) { @@ -3624,7 +3625,7 @@ class Item $link = $shared['link'] ?: $shared['message_id']; if (empty($shared_content)) { - $shared_content = DI::contentItem()->createSharedPostByUrl($link, $item['uid'] ?? 0); + $shared_content = DI::contentItem()->createSharedPostByUrl($link, $item['uid'] ?? 0, $add_media); } if (empty($shared_content)) { diff --git a/src/Protocol/ActivityPub/Transmitter.php b/src/Protocol/ActivityPub/Transmitter.php index de9a3535f..c37fefb42 100644 --- a/src/Protocol/ActivityPub/Transmitter.php +++ b/src/Protocol/ActivityPub/Transmitter.php @@ -40,6 +40,7 @@ use Friendica\Model\User; use Friendica\Network\HTTPException; use Friendica\Protocol\Activity; use Friendica\Protocol\ActivityPub; +use Friendica\Protocol\Diaspora; use Friendica\Protocol\Relay; use Friendica\Util\DateTimeFormat; use Friendica\Util\HTTPSignature; @@ -1621,6 +1622,8 @@ class Transmitter $permission_block = self::createPermissionBlockForItem($item, false); + $real_quote = false; + $body = $item['body']; if ($type == 'Note') { @@ -1662,9 +1665,22 @@ class Transmitter $body = BBCode::setMentionsToNicknames($body); - if (!empty($item['quote-uri'])) { - $body = BBCode::replaceSharedData($body); + if (!empty($item['quote-uri']) && Post::exists(['uri-id' => $item['quote-uri-id'], 'network' => [Protocol::ACTIVITYPUB, Protocol::DFRN]])) { + $real_quote = true; + if (Diaspora::isReshare($body, false)) { + $body = BBCode::replaceSharedData($body); + } elseif (strpos($body, $item['quote-uri']) === false) { + $body .= "\n♲ " . $item['quote-uri']; + } $data['quoteUrl'] = $item['quote-uri']; + } elseif (!empty($item['quote-uri']) && !Diaspora::isReshare($body, false)) { + $fields = ['uri-id', 'uri', 'body', 'title', 'author-name', 'author-link', 'author-avatar', 'guid', 'created', 'plink', 'network']; + $shared_item = Post::selectFirst($fields, ['uri-id' => $item['quote-uri-id']]); + if (!empty($shared_item['uri-id'])) { + $shared_item['body'] = Post\Media::addAttachmentsToBody($shared_item['uri-id'], $shared_item['body']); + $body .= "\n" . DI::contentItem()->createSharedBlockByArray($shared_item); + $item['body'] = Item::improveSharedDataInBody($item, true); + } } $data['content'] = BBCode::convertForUriId($item['uri-id'], $body, BBCode::ACTIVITYPUB); @@ -1677,9 +1693,11 @@ class Transmitter if (!empty($language)) { $richbody = BBCode::setMentionsToNicknames($item['body'] ?? ''); - $shared = BBCode::fetchShareAttributes($richbody); - if (!empty($shared['link']) && !empty($shared['guid']) && !empty($shared['comment'])) { - $richbody = BBCode::replaceSharedData($richbody); + if ($real_quote) { + $shared = BBCode::fetchShareAttributes($richbody); + if (!empty($shared['link']) && !empty($shared['guid']) && !empty($shared['comment'])) { + $richbody = BBCode::replaceSharedData($richbody); + } } $richbody = BBCode::removeAttachment($richbody); From 49ed627aedb39f0d627d919daf5470c884bdba81 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 15 Oct 2022 17:31:57 +0200 Subject: [PATCH 06/27] change IP of Vagrant VM --- Vagrantfile | 2 +- bin/dev/vagrant_provision.sh | 2 +- mods/local.config.vagrant.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 4684d9f09..168735123 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,5 +1,5 @@ -server_ip = "192.168.22.10" +server_ip = "192.168.56.10" server_memory = "2048" # MB server_timezone = "UTC" diff --git a/bin/dev/vagrant_provision.sh b/bin/dev/vagrant_provision.sh index d82ed2823..40d08cedb 100755 --- a/bin/dev/vagrant_provision.sh +++ b/bin/dev/vagrant_provision.sh @@ -45,7 +45,7 @@ apt-get install -qq apache2 a2enmod rewrite actions ssl cp /vagrant/bin/dev/vagrant_vhost.sh /usr/local/bin/vhost chmod guo+x /usr/local/bin/vhost -vhost -s 192.168.22.10.xip.io -d /var/www -p /etc/ssl/xip.io -c xip.io -a friendica.local +vhost -s 192.168.56.10.xip.io -d /var/www -p /etc/ssl/xip.io -c xip.io -a friendica.local a2dissite 000-default service apache2 restart diff --git a/mods/local.config.vagrant.php b/mods/local.config.vagrant.php index 98e9a42e7..da873116d 100644 --- a/mods/local.config.vagrant.php +++ b/mods/local.config.vagrant.php @@ -29,7 +29,7 @@ return [ // **************************************************************** 'config' => [ - 'hostname' => 'friendica.local', + 'hostname' => '192.168.56.10', 'admin_email' => 'admin@friendica.local', 'sitename' => 'Friendica Social Network', 'register_policy' => \Friendica\Module\Register::OPEN, From 9383d7849b9a3518dd7aa1476e43539387bf54f9 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 15 Oct 2022 17:33:47 +0200 Subject: [PATCH 07/27] adopt IP change in the Vagrant docs --- doc/Vagrant.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/Vagrant.md b/doc/Vagrant.md index 3751b7bc0..ea098e3fb 100644 --- a/doc/Vagrant.md +++ b/doc/Vagrant.md @@ -10,7 +10,7 @@ Getting started No need to setup up a webserver, database etc. before actually starting. Vagrant creates a virtual machine for you that you can just run inside VirtualBox and start to work directly on Friendica. -It brings an Debian Bullseye with PHP 7.4 and MariaDB 10.5.11. +It brings an Debian Bullseye with PHP 8.0 and MariaDB 10.5.11. What you need to do: @@ -24,7 +24,7 @@ This will start the virtual machine. Be patient: When it runs for the first time, it downloads a Debian Server image and installs Friendica. 4. Run `vagrant ssh` to log into the virtual machine to log in to the VM in case you need to debug something on the server. 5. Open you test installation in a browser. -Go to friendica.local (or 192.168.22.10). +Go to friendica.local (or 192.168.56.10). friendica.local is using a self-signed TLS certificate, so you will need to add an exception to trust the certificate the first time you are visiting the page. The mysql database is called "friendica", the mysql user and password both are "friendica". 6. Work on Friendica's code in your git clone on your machine (not in the VM). @@ -66,4 +66,4 @@ On the next Vagrant up, the version problem should be fixed. If `friendica.local` is not resolved, you may need to add an entry to the `/etc/hosts` file (or similar configuration depending on the OS you are using). -For further documentation of vagrant, please see [the vagrant*docs*](https://docs.vagrantup.com/v2/). \ No newline at end of file +For further documentation of vagrant, please see [the vagrant*docs*](https://docs.vagrantup.com/v2/). From a192e099abb66f003cfa487fc0d52921a7a99180 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 16 Oct 2022 10:14:18 +0200 Subject: [PATCH 08/27] [docs] note the preference of MariaDB over other MySQL implementation in the install docs --- doc/Install.md | 2 +- doc/de/Install.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/Install.md b/doc/Install.md index b109113ef..d0c3576ac 100644 --- a/doc/Install.md +++ b/doc/Install.md @@ -34,7 +34,7 @@ Due to the large variety of operating systems and PHP platforms in existence we * The POSIX module of PHP needs to be activated (e.g. [RHEL, CentOS](http://www.bigsoft.co.uk/blog/index.php/2014/12/08/posix-php-commands-not-working-under-centos-7) have disabled it) * Some form of email server or email gateway such that PHP mail() works. If you cannot set up your own email server, you can use the [phpmailer](https://github.com/friendica/friendica-addons/tree/develop/phpmailer) addon and use a remote SMTP server. -* MySQL 5.6+ or an equivalent alternative for MySQL (MariaDB, Percona Server etc.) +* MySQL with support of InnoDB and Barracuda (we suggest a MariaDB server as all development is done using these, but alternatives like MySQL or Percona Server etc. might work as well) * ability to schedule jobs with cron (Linux/Mac) or Scheduled Tasks (Windows) * installation into a top-level domain or sub-domain (without a directory/path component in the URL) is RECOMMENDED. Directory paths will not be as convenient to use and have not been thoroughly tested. This is REQUIRED if you wish to communicate with the Diaspora network. diff --git a/doc/de/Install.md b/doc/de/Install.md index 03a46f615..94ca08a2b 100644 --- a/doc/de/Install.md +++ b/doc/de/Install.md @@ -31,7 +31,7 @@ Requirements * Das POSIX Modul muss aktiviert sein ([CentOS, RHEL](http://www.bigsoft.co.uk/blog/index.php/2014/12/08/posix-php-commands-not-working-under-centos-7http://www.bigsoft.co.uk/blog/index.php/2014/12/08/posix-php-commands-not-working-under-centos-7) haben dies z.B. deaktiviert) * Einen E-Mail Server, so dass PHP `mail()` funktioniert. Wenn kein eigener E-Mail Server zur Verfügung steht, kann alternativ das [phpmailer](https://github.com/friendica/friendica-addons/tree/develop/phpmailer) Addon mit einem externen SMTP Account verwendet werden. -* Mysql 5.6+ (oder eine äquivalente Alternative: MariaDB, Percona Server etc.) +* Mysql Server mit Unterstützung vom InnoDB und Barracuda (wir empfehlen MariaDB da die Entwicklung mit solchen Server erfolgt, aber Alternativen wie MySQL, Percona Server etc. sollten auch funktionieren) * die Möglichkeit, wiederkehrende Aufgaben mit cron (Linux/Mac) oder "Scheduled Tasks" einzustellen (Windows) [Beachte: andere Optionen sind in Abschnitt 7 dieser Dokumentation zu finden] * Installation in einer Top-Level-Domain oder Subdomain (ohne eine Verzeichnis/Pfad-Komponente in der URL) wird bevorzugt. Verzeichnispfade sind für diesen Zweck nicht so günstig und wurden auch nicht ausführlich getestet. From d826fe0a3bccca8d8fd7fdee567a81994b6bde5a Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 16 Oct 2022 11:24:50 -0400 Subject: [PATCH 09/27] Refactor files related to the Compose page and frio theme settings - Use dependencies instead of most DI calls in Module\Item\Compose - Group translation strings in a subkey of the template variables array - Rewrite array initializations in theme/frio/config --- src/Content/Conversation.php | 2 +- src/Module/Item/Compose.php | 114 ++++++++++++++++++++------------ view/templates/item/compose.tpl | 46 ++++++------- view/theme/frio/config.php | 73 ++++++++++---------- 4 files changed, 134 insertions(+), 101 deletions(-) diff --git a/src/Content/Conversation.php b/src/Content/Conversation.php index 744e9ed18..237d192fd 100644 --- a/src/Content/Conversation.php +++ b/src/Content/Conversation.php @@ -328,7 +328,7 @@ class Conversation $created_at = ''; } - $tpl = Renderer::getMarkupTemplate("jot.tpl"); + $tpl = Renderer::getMarkupTemplate('jot.tpl'); $o .= Renderer::replaceMacros($tpl, [ '$new_post' => $this->l10n->t('New Post'), diff --git a/src/Module/Item/Compose.php b/src/Module/Item/Compose.php index a3ca4296a..895a548e4 100644 --- a/src/Module/Item/Compose.php +++ b/src/Module/Item/Compose.php @@ -22,10 +22,13 @@ namespace Friendica\Module\Item; use DateTime; +use Friendica\App; use Friendica\BaseModule; use Friendica\Content\Feature; use Friendica\Core\ACL; use Friendica\Core\Hook; +use Friendica\Core\L10n; +use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues; use Friendica\Core\Renderer; use Friendica\Core\Theme; use Friendica\Database\DBA; @@ -33,13 +36,40 @@ use Friendica\DI; use Friendica\Model\Contact; use Friendica\Model\Item; use Friendica\Model\User; +use Friendica\Module\Response; use Friendica\Module\Security\Login; +use Friendica\Navigation\SystemMessages; use Friendica\Network\HTTPException\NotImplementedException; +use Friendica\Util\ACLFormatter; use Friendica\Util\Crypto; +use Friendica\Util\Profiler; use Friendica\Util\Temporal; +use Psr\Log\LoggerInterface; class Compose extends BaseModule { + /** @var SystemMessages */ + private $systemMessages; + + /** @var ACLFormatter */ + private $ACLFormatter; + + /** @var App\Page */ + private $page; + + /** @var IManagePersonalConfigValues */ + private $pConfig; + + public function __construct(IManagePersonalConfigValues $pConfig, App\Page $page, ACLFormatter $ACLFormatter, SystemMessages $systemMessages, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + { + parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + + $this->systemMessages = $systemMessages; + $this->ACLFormatter = $ACLFormatter; + $this->page = $page; + $this->pConfig = $pConfig; + } + protected function post(array $request = []) { if (!empty($_REQUEST['body'])) { @@ -47,23 +77,22 @@ class Compose extends BaseModule require_once 'mod/item.php'; item_post(DI::app()); } else { - notice(DI::l10n()->t('Please enter a post body.')); + $this->systemMessages->addNotice($this->l10n->t('Please enter a post body.')); } } protected function content(array $request = []): string { if (!local_user()) { - return Login::form('compose', false); + return Login::form('compose'); } $a = DI::app(); if ($a->getCurrentTheme() !== 'frio') { - throw new NotImplementedException(DI::l10n()->t('This feature is only available with the frio theme.')); + throw new NotImplementedException($this->l10n->t('This feature is only available with the frio theme.')); } - /// @TODO Retrieve parameter from router $posttype = $this->parameters['type'] ?? Item::PT_ARTICLE; if (!in_array($posttype, [Item::PT_ARTICLE, Item::PT_PERSONAL_NOTE])) { switch ($posttype) { @@ -78,16 +107,14 @@ class Compose extends BaseModule $user = User::getById(local_user(), ['allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', 'default-location']); - $aclFormatter = DI::aclFormatter(); - - $contact_allow_list = $aclFormatter->expand($user['allow_cid']); - $group_allow_list = $aclFormatter->expand($user['allow_gid']); - $contact_deny_list = $aclFormatter->expand($user['deny_cid']); - $group_deny_list = $aclFormatter->expand($user['deny_gid']); + $contact_allow_list = $this->ACLFormatter->expand($user['allow_cid']); + $group_allow_list = $this->ACLFormatter->expand($user['allow_gid']); + $contact_deny_list = $this->ACLFormatter->expand($user['deny_cid']); + $group_deny_list = $this->ACLFormatter->expand($user['deny_gid']); switch ($posttype) { case Item::PT_PERSONAL_NOTE: - $compose_title = DI::l10n()->t('Compose new personal note'); + $compose_title = $this->l10n->t('Compose new personal note'); $type = 'note'; $doesFederate = false; $contact_allow_list = [$a->getContactId()]; @@ -96,7 +123,7 @@ class Compose extends BaseModule $group_deny_list = []; break; default: - $compose_title = DI::l10n()->t('Compose new post'); + $compose_title = $this->l10n->t('Compose new post'); $type = 'post'; $doesFederate = true; @@ -129,13 +156,13 @@ class Compose extends BaseModule Hook::callAll('jot_tool', $jotplugins); // Output - DI::page()->registerFooterScript(Theme::getPathForFile('js/ajaxupload.js')); - DI::page()->registerFooterScript(Theme::getPathForFile('js/linkPreview.js')); - DI::page()->registerFooterScript(Theme::getPathForFile('js/compose.js')); + $this->page->registerFooterScript(Theme::getPathForFile('js/ajaxupload.js')); + $this->page->registerFooterScript(Theme::getPathForFile('js/linkPreview.js')); + $this->page->registerFooterScript(Theme::getPathForFile('js/compose.js')); $contact = Contact::getById($a->getContactId()); - if (DI::config()->get(local_user(), 'system', 'set_creation_date')) { + if ($this->pConfig->get(local_user(), 'system', 'set_creation_date')) { $created_at = Temporal::getDateTimeField( new \DateTime(DBA::NULL_DATETIME), new \DateTime('now'), @@ -149,39 +176,42 @@ class Compose extends BaseModule $tpl = Renderer::getMarkupTemplate('item/compose.tpl'); return Renderer::replaceMacros($tpl, [ - '$compose_title'=> $compose_title, - '$visibility_title'=> DI::l10n()->t('Visibility'), + '$l10n' => [ + 'compose_title' => $compose_title, + 'default' => '', + 'visibility_title' => $this->l10n->t('Visibility'), + 'mytitle' => $this->l10n->t('This is you'), + 'submit' => $this->l10n->t('Submit'), + 'edbold' => $this->l10n->t('Bold'), + 'editalic' => $this->l10n->t('Italic'), + 'eduline' => $this->l10n->t('Underline'), + 'edquote' => $this->l10n->t('Quote'), + 'edcode' => $this->l10n->t('Code'), + 'edimg' => $this->l10n->t('Image'), + 'edurl' => $this->l10n->t('Link'), + 'edattach' => $this->l10n->t('Link or Media'), + 'prompttext' => $this->l10n->t('Please enter a image/video/audio/webpage URL:'), + 'preview' => $this->l10n->t('Preview'), + 'location_set' => $this->l10n->t('Set your location'), + 'location_clear' => $this->l10n->t('Clear the location'), + 'location_unavailable' => $this->l10n->t('Location services are unavailable on your device'), + 'location_disabled' => $this->l10n->t('Location services are disabled. Please check the website\'s permissions on your device'), + 'wait' => $this->l10n->t('Please wait'), + 'placeholdertitle' => $this->l10n->t('Set title'), + 'placeholdercategory' => Feature::isEnabled(local_user(),'categories') ? $this->l10n->t('Categories (comma-separated list)') : '', + ], + '$id' => 0, '$posttype' => $posttype, '$type' => $type, '$wall' => $wall, - '$default' => '', - '$mylink' => DI::baseUrl()->remove($contact['url']), - '$mytitle' => DI::l10n()->t('This is you'), - '$myphoto' => DI::baseUrl()->remove($contact['thumb']), - '$submit' => DI::l10n()->t('Submit'), - '$edbold' => DI::l10n()->t('Bold'), - '$editalic' => DI::l10n()->t('Italic'), - '$eduline' => DI::l10n()->t('Underline'), - '$edquote' => DI::l10n()->t('Quote'), - '$edcode' => DI::l10n()->t('Code'), - '$edimg' => DI::l10n()->t('Image'), - '$edurl' => DI::l10n()->t('Link'), - '$edattach' => DI::l10n()->t('Link or Media'), - '$prompttext' => DI::l10n()->t('Please enter a image/video/audio/webpage URL:'), - '$preview' => DI::l10n()->t('Preview'), - '$location_set' => DI::l10n()->t('Set your location'), - '$location_clear' => DI::l10n()->t('Clear the location'), - '$location_unavailable' => DI::l10n()->t('Location services are unavailable on your device'), - '$location_disabled' => DI::l10n()->t('Location services are disabled. Please check the website\'s permissions on your device'), - '$wait' => DI::l10n()->t('Please wait'), - '$placeholdertitle' => DI::l10n()->t('Set title'), - '$placeholdercategory' => (Feature::isEnabled(local_user(),'categories') ? DI::l10n()->t('Categories (comma-separated list)') : ''), + '$mylink' => $this->baseUrl->remove($contact['url']), + '$myphoto' => $this->baseUrl->remove($contact['thumb']), '$scheduled_at' => Temporal::getDateTimeField( new DateTime(), new DateTime('now + 6 months'), null, - DI::l10n()->t('Scheduled at'), + $this->l10n->t('Scheduled at'), 'scheduled_at' ), '$created_at' => $created_at, @@ -197,7 +227,7 @@ class Compose extends BaseModule '$jotplugins' => $jotplugins, '$rand_num' => Crypto::randomDigits(12), - '$acl_selector' => ACL::getFullSelectorHTML(DI::page(), $a->getLoggedInUserId(), $doesFederate, [ + '$acl_selector' => ACL::getFullSelectorHTML($this->page, $a->getLoggedInUserId(), $doesFederate, [ 'allow_cid' => $contact_allow_list, 'allow_gid' => $group_allow_list, 'deny_cid' => $contact_deny_list, diff --git a/view/templates/item/compose.tpl b/view/templates/item/compose.tpl index cbab655d2..a01ea95a0 100644 --- a/view/templates/item/compose.tpl +++ b/view/templates/item/compose.tpl @@ -1,5 +1,5 @@
-

{{$compose_title}}

+

{{$l10n.compose_title}}

{{**}} @@ -8,74 +8,72 @@
- +
- {{if $placeholdercategory}} + {{if $l10n.placeholdercategory}}
- +
{{/if}}

- - - - - - -

- +

{{if $type == 'post'}} - + {{/if}} - + - {{if $preview}} - - {{/if}} - + +

{{if $type == 'post'}} -

{{$visibility_title}}

+

{{$l10n.visibility_title}}

{{$acl_selector nofilter}}
diff --git a/view/theme/frio/config.php b/view/theme/frio/config.php index 7445155f9..1ee67db3d 100644 --- a/view/theme/frio/config.php +++ b/view/theme/frio/config.php @@ -43,7 +43,7 @@ function theme_post(App $a) 'background_image', 'bg_image_option', 'login_bg_image', - 'login_bg_color' + 'login_bg_color', ] as $field) { if (isset($_POST['frio_' . $field])) { DI::pConfig()->set(local_user(), 'frio', $field, $_POST['frio_' . $field]); @@ -73,7 +73,7 @@ function theme_admin_post(App $a) 'background_image', 'bg_image_option', 'login_bg_image', - 'login_bg_color' + 'login_bg_color', ] as $field) { if (isset($_POST['frio_' . $field])) { DI::config()->set('frio', $field, $_POST['frio_' . $field]); @@ -84,48 +84,55 @@ function theme_admin_post(App $a) } } -function theme_content(App $a) +function theme_content(): string { if (!local_user()) { - return; + return ''; } - $arr = []; - $node_scheme = DI::config()->get('frio', 'scheme', DI::config()->get('frio', 'scheme')); + $arr = [ + 'scheme' => DI::pConfig()->get(local_user(), 'frio', 'scheme', + DI::pConfig()->get(local_user(), 'frio', 'schema', + DI::config()->get('frio', 'scheme', + DI::config()->get('frio', 'schema') + ) + ) + ), - $arr['scheme'] = DI::pConfig()->get(local_user(), 'frio', 'scheme', DI::pConfig()->get(local_user(), 'frio', 'schema', $node_scheme)); - $arr['scheme_accent'] = DI::pConfig()->get(local_user(), 'frio', 'scheme_accent' , DI::config()->get('frio', 'scheme_accent')); - $arr['share_string'] = ''; - $arr['nav_bg'] = DI::pConfig()->get(local_user(), 'frio', 'nav_bg' , DI::config()->get('frio', 'nav_bg')); - $arr['nav_icon_color'] = DI::pConfig()->get(local_user(), 'frio', 'nav_icon_color' , DI::config()->get('frio', 'nav_icon_color')); - $arr['link_color'] = DI::pConfig()->get(local_user(), 'frio', 'link_color' , DI::config()->get('frio', 'link_color')); - $arr['background_color'] = DI::pConfig()->get(local_user(), 'frio', 'background_color', DI::config()->get('frio', 'background_color')); - $arr['contentbg_transp'] = DI::pConfig()->get(local_user(), 'frio', 'contentbg_transp', DI::config()->get('frio', 'contentbg_transp')); - $arr['background_image'] = DI::pConfig()->get(local_user(), 'frio', 'background_image', DI::config()->get('frio', 'background_image')); - $arr['bg_image_option'] = DI::pConfig()->get(local_user(), 'frio', 'bg_image_option' , DI::config()->get('frio', 'bg_image_option')); + 'share_string' => '', + 'scheme_accent' => DI::pConfig()->get(local_user(), 'frio', 'scheme_accent' , DI::config()->get('frio', 'scheme_accent')), + 'nav_bg' => DI::pConfig()->get(local_user(), 'frio', 'nav_bg' , DI::config()->get('frio', 'nav_bg')), + 'nav_icon_color' => DI::pConfig()->get(local_user(), 'frio', 'nav_icon_color' , DI::config()->get('frio', 'nav_icon_color')), + 'link_color' => DI::pConfig()->get(local_user(), 'frio', 'link_color' , DI::config()->get('frio', 'link_color')), + 'background_color' => DI::pConfig()->get(local_user(), 'frio', 'background_color' , DI::config()->get('frio', 'background_color')), + 'contentbg_transp' => DI::pConfig()->get(local_user(), 'frio', 'contentbg_transp' , DI::config()->get('frio', 'contentbg_transp')), + 'background_image' => DI::pConfig()->get(local_user(), 'frio', 'background_image' , DI::config()->get('frio', 'background_image')), + 'bg_image_option' => DI::pConfig()->get(local_user(), 'frio', 'bg_image_option' , DI::config()->get('frio', 'bg_image_option')), + ]; return frio_form($arr); } -function theme_admin(App $a) +function theme_admin(): string { if (!local_user()) { - return; + return ''; } - $arr = []; - $arr['scheme'] = DI::config()->get('frio', 'scheme', DI::config()->get('frio', 'schema')); - $arr['scheme_accent'] = DI::config()->get('frio', 'scheme_accent'); - $arr['share_string'] = ''; - $arr['nav_bg'] = DI::config()->get('frio', 'nav_bg'); - $arr['nav_icon_color'] = DI::config()->get('frio', 'nav_icon_color'); - $arr['link_color'] = DI::config()->get('frio', 'link_color'); - $arr['background_color'] = DI::config()->get('frio', 'background_color'); - $arr['contentbg_transp'] = DI::config()->get('frio', 'contentbg_transp'); - $arr['background_image'] = DI::config()->get('frio', 'background_image'); - $arr['bg_image_option'] = DI::config()->get('frio', 'bg_image_option'); - $arr['login_bg_image'] = DI::config()->get('frio', 'login_bg_image'); - $arr['login_bg_color'] = DI::config()->get('frio', 'login_bg_color'); + $arr = [ + 'scheme' => DI::config()->get('frio', 'scheme', DI::config()->get('frio', 'schema')), + 'scheme_accent' => DI::config()->get('frio', 'scheme_accent'), + 'share_string' => '', + 'nav_bg' => DI::config()->get('frio', 'nav_bg'), + 'nav_icon_color' => DI::config()->get('frio', 'nav_icon_color'), + 'link_color' => DI::config()->get('frio', 'link_color'), + 'background_color' => DI::config()->get('frio', 'background_color'), + 'contentbg_transp' => DI::config()->get('frio', 'contentbg_transp'), + 'background_image' => DI::config()->get('frio', 'background_image'), + 'bg_image_option' => DI::config()->get('frio', 'bg_image_option'), + 'login_bg_image' => DI::config()->get('frio', 'login_bg_image'), + 'login_bg_color' => DI::config()->get('frio', 'login_bg_color'), + ]; return frio_form($arr); } @@ -183,7 +190,5 @@ function frio_form($arr) $ctx['$login_bg_color'] = ['frio_login_bg_color', DI::l10n()->t('Login page background color'), $arr['login_bg_color'], DI::l10n()->t('Leave background image and color empty for theme defaults'), false]; } - $o = Renderer::replaceMacros($t, $ctx); - - return $o; + return Renderer::replaceMacros($t, $ctx); } From e556dc3c31101d880d9bc7a1188bb107fe57a246 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 16 Oct 2022 11:49:27 -0400 Subject: [PATCH 10/27] Add new frio.always_open_compose setting - This setting allows the New Post button to always open the Compose page instead of the modal by default --- src/Content/Conversation.php | 3 ++- src/Module/Item/Compose.php | 10 +++++++++- view/templates/item/compose.tpl | 3 +++ view/theme/frio/config.php | 6 ++++++ view/theme/frio/js/theme.js | 10 ++++++---- view/theme/frio/templates/jot.tpl | 2 +- view/theme/frio/templates/theme_settings.tpl | 2 ++ 7 files changed, 29 insertions(+), 7 deletions(-) diff --git a/src/Content/Conversation.php b/src/Content/Conversation.php index 237d192fd..84f75cff3 100644 --- a/src/Content/Conversation.php +++ b/src/Content/Conversation.php @@ -393,7 +393,8 @@ class Conversation '$message' => $this->l10n->t('Message'), '$browser' => $this->l10n->t('Browser'), - '$compose_link_title' => $this->l10n->t('Open Compose page'), + '$compose_link_title' => $this->l10n->t('Open Compose page'), + '$always_open_compose' => $this->pConfig->get(local_user(), 'frio', 'always_open_compose', false), ]); diff --git a/src/Module/Item/Compose.php b/src/Module/Item/Compose.php index 895a548e4..bd531d484 100644 --- a/src/Module/Item/Compose.php +++ b/src/Module/Item/Compose.php @@ -26,6 +26,7 @@ use Friendica\App; use Friendica\BaseModule; use Friendica\Content\Feature; use Friendica\Core\ACL; +use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Hook; use Friendica\Core\L10n; use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues; @@ -60,7 +61,10 @@ class Compose extends BaseModule /** @var IManagePersonalConfigValues */ private $pConfig; - public function __construct(IManagePersonalConfigValues $pConfig, App\Page $page, ACLFormatter $ACLFormatter, SystemMessages $systemMessages, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + /** @var IManageConfigValues */ + private $config; + + public function __construct(IManageConfigValues $config, IManagePersonalConfigValues $pConfig, App\Page $page, ACLFormatter $ACLFormatter, SystemMessages $systemMessages, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); @@ -68,6 +72,7 @@ class Compose extends BaseModule $this->ACLFormatter = $ACLFormatter; $this->page = $page; $this->pConfig = $pConfig; + $this->config = $config; } protected function post(array $request = []) @@ -199,6 +204,9 @@ class Compose extends BaseModule 'wait' => $this->l10n->t('Please wait'), 'placeholdertitle' => $this->l10n->t('Set title'), 'placeholdercategory' => Feature::isEnabled(local_user(),'categories') ? $this->l10n->t('Categories (comma-separated list)') : '', + 'always_open_compose' => $this->pConfig->get(local_user(), 'frio', 'always_open_compose', + $this->config->get('frio', 'always_open_compose', false)) ? '' : + $this->l10n->t('You can make this page always open when you use the New Post button in the Theme Customization settings.'), ], '$id' => 0, diff --git a/view/templates/item/compose.tpl b/view/templates/item/compose.tpl index a01ea95a0..5583650e0 100644 --- a/view/templates/item/compose.tpl +++ b/view/templates/item/compose.tpl @@ -1,5 +1,8 @@

{{$l10n.compose_title}}

+ {{if $l10n.always_open_compose}} +

{{$l10n.always_open_compose nofilter}}

+ {{/if}}
{{**}} diff --git a/view/theme/frio/config.php b/view/theme/frio/config.php index 1ee67db3d..2dcf00204 100644 --- a/view/theme/frio/config.php +++ b/view/theme/frio/config.php @@ -44,6 +44,7 @@ function theme_post(App $a) 'bg_image_option', 'login_bg_image', 'login_bg_color', + 'always_open_compose', ] as $field) { if (isset($_POST['frio_' . $field])) { DI::pConfig()->set(local_user(), 'frio', $field, $_POST['frio_' . $field]); @@ -74,6 +75,7 @@ function theme_admin_post(App $a) 'bg_image_option', 'login_bg_image', 'login_bg_color', + 'always_open_compose', ] as $field) { if (isset($_POST['frio_' . $field])) { DI::config()->set('frio', $field, $_POST['frio_' . $field]); @@ -108,6 +110,7 @@ function theme_content(): string 'contentbg_transp' => DI::pConfig()->get(local_user(), 'frio', 'contentbg_transp' , DI::config()->get('frio', 'contentbg_transp')), 'background_image' => DI::pConfig()->get(local_user(), 'frio', 'background_image' , DI::config()->get('frio', 'background_image')), 'bg_image_option' => DI::pConfig()->get(local_user(), 'frio', 'bg_image_option' , DI::config()->get('frio', 'bg_image_option')), + 'always_open_compose' => DI::pConfig()->get(local_user(), 'frio', 'always_open_compose', DI::config()->get('frio', 'always_open_compose', false)), ]; return frio_form($arr); @@ -132,6 +135,7 @@ function theme_admin(): string 'bg_image_option' => DI::config()->get('frio', 'bg_image_option'), 'login_bg_image' => DI::config()->get('frio', 'login_bg_image'), 'login_bg_color' => DI::config()->get('frio', 'login_bg_color'), + 'always_open_compose' => DI::config()->get('frio', 'always_open_compose', false), ]; return frio_form($arr); @@ -180,6 +184,8 @@ function frio_form($arr) '$background_image' => array_key_exists('background_image', $disable) ? '' : ['frio_background_image', DI::l10n()->t('Set the background image'), $arr['background_image'], $background_image_help, false], '$bg_image_options_title' => DI::l10n()->t('Background image style'), '$bg_image_options' => Image::get_options($arr), + + '$always_open_compose' => ['frio_always_open_compose', DI::l10n()->t('Always open Compose page'), $arr['always_open_compose'], DI::l10n()->t('The New Post button always open the Compose page instead of the modal form. When this is disabled, the Compose page can be accessed with a middle click on the link or from the modal.')], ]; if (array_key_exists('login_bg_image', $arr) && !array_key_exists('login_bg_image', $disable)) { diff --git a/view/theme/frio/js/theme.js b/view/theme/frio/js/theme.js index edd7282f7..60aa88ba5 100644 --- a/view/theme/frio/js/theme.js +++ b/view/theme/frio/js/theme.js @@ -87,10 +87,12 @@ $(document).ready(function () { if ($("#jot-popup").is(":hidden")) { $jotButton.hide(); } - $jotButton.on("click", function (e) { - e.preventDefault(); - jotShow(); - }); + if ($jotButton.hasClass('modal-open')) { + $jotButton.on("click", function (e) { + e.preventDefault(); + jotShow(); + }); + } } let $body = $("body"); diff --git a/view/theme/frio/templates/jot.tpl b/view/theme/frio/templates/jot.tpl index 0f878d4c5..c38e8531c 100644 --- a/view/theme/frio/templates/jot.tpl +++ b/view/theme/frio/templates/jot.tpl @@ -1,5 +1,5 @@ {{* The button to open the jot - in This theme we move the button with js to the second nav bar *}} - +
diff --git a/view/theme/frio/templates/theme_settings.tpl b/view/theme/frio/templates/theme_settings.tpl index 7dfc49719..3c3c9cc2e 100644 --- a/view/theme/frio/templates/theme_settings.tpl +++ b/view/theme/frio/templates/theme_settings.tpl @@ -209,6 +209,8 @@ }); +{{include file="field_checkbox.tpl" field=$always_open_compose}} +
From bcc1350f1d905ff162deb26605a02dbc640928aa Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 16 Oct 2022 13:21:43 -0400 Subject: [PATCH 11/27] Updated main translation file after adding strings --- view/lang/C/messages.po | 205 ++++++++++++++++++++++------------------ 1 file changed, 111 insertions(+), 94 deletions(-) diff --git a/view/lang/C/messages.po b/view/lang/C/messages.po index 1552d9cf3..eed528689 100644 --- a/view/lang/C/messages.po +++ b/view/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 2022.12-dev\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-14 22:46+0000\n" +"POT-Creation-Date: 2022-10-16 12:38-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -212,7 +212,7 @@ msgid "audio link" msgstr "" #: mod/editpost.php:103 src/Content/Conversation.php:352 -#: src/Module/Item/Compose.php:173 +#: src/Module/Item/Compose.php:200 msgid "Set your location" msgstr "" @@ -230,7 +230,7 @@ msgstr "" #: mod/editpost.php:107 mod/message.php:200 mod/message.php:358 #: mod/photos.php:1489 mod/wallmessage.php:142 src/Content/Conversation.php:368 -#: src/Content/Conversation.php:713 src/Module/Item/Compose.php:177 +#: src/Content/Conversation.php:714 src/Module/Item/Compose.php:204 #: src/Object/Post.php:538 msgid "Please wait" msgstr "" @@ -248,12 +248,12 @@ msgid "Public post" msgstr "" #: mod/editpost.php:120 src/Content/Conversation.php:357 -#: src/Module/Item/Compose.php:178 +#: src/Module/Item/Compose.php:205 msgid "Set title" msgstr "" #: mod/editpost.php:122 src/Content/Conversation.php:359 -#: src/Module/Item/Compose.php:179 +#: src/Module/Item/Compose.php:206 msgid "Categories (comma-separated list)" msgstr "" @@ -263,7 +263,7 @@ msgstr "" #: mod/editpost.php:128 mod/events.php:513 mod/photos.php:1337 #: mod/photos.php:1393 mod/photos.php:1467 src/Content/Conversation.php:383 -#: src/Module/Item/Compose.php:172 src/Object/Post.php:1003 +#: src/Module/Item/Compose.php:199 src/Object/Post.php:1003 msgid "Preview" msgstr "" @@ -276,37 +276,37 @@ msgid "Cancel" msgstr "" #: mod/editpost.php:134 src/Content/Conversation.php:343 -#: src/Module/Item/Compose.php:163 src/Object/Post.php:994 +#: src/Module/Item/Compose.php:190 src/Object/Post.php:994 msgid "Bold" msgstr "" #: mod/editpost.php:135 src/Content/Conversation.php:344 -#: src/Module/Item/Compose.php:164 src/Object/Post.php:995 +#: src/Module/Item/Compose.php:191 src/Object/Post.php:995 msgid "Italic" msgstr "" #: mod/editpost.php:136 src/Content/Conversation.php:345 -#: src/Module/Item/Compose.php:165 src/Object/Post.php:996 +#: src/Module/Item/Compose.php:192 src/Object/Post.php:996 msgid "Underline" msgstr "" #: mod/editpost.php:137 src/Content/Conversation.php:346 -#: src/Module/Item/Compose.php:166 src/Object/Post.php:997 +#: src/Module/Item/Compose.php:193 src/Object/Post.php:997 msgid "Quote" msgstr "" #: mod/editpost.php:138 src/Content/Conversation.php:347 -#: src/Module/Item/Compose.php:167 src/Object/Post.php:998 +#: src/Module/Item/Compose.php:194 src/Object/Post.php:998 msgid "Code" msgstr "" #: mod/editpost.php:139 src/Content/Conversation.php:349 -#: src/Module/Item/Compose.php:169 src/Object/Post.php:1000 +#: src/Module/Item/Compose.php:196 src/Object/Post.php:1000 msgid "Link" msgstr "" #: mod/editpost.php:140 src/Content/Conversation.php:350 -#: src/Module/Item/Compose.php:170 src/Object/Post.php:1001 +#: src/Module/Item/Compose.php:197 src/Object/Post.php:1001 msgid "Link or Media" msgstr "" @@ -415,9 +415,9 @@ msgstr "" #: src/Module/Delegation.php:148 src/Module/FriendSuggest.php:144 #: src/Module/Install.php:252 src/Module/Install.php:294 #: src/Module/Install.php:331 src/Module/Invite.php:178 -#: src/Module/Item/Compose.php:162 src/Module/Profile/Profile.php:247 +#: src/Module/Item/Compose.php:189 src/Module/Profile/Profile.php:247 #: src/Module/Settings/Profile/Index.php:222 src/Object/Post.php:992 -#: view/theme/duepuntozero/config.php:69 view/theme/frio/config.php:160 +#: view/theme/duepuntozero/config.php:69 view/theme/frio/config.php:171 #: view/theme/quattro/config.php:71 view/theme/vier/config.php:119 msgid "Submit" msgstr "" @@ -1070,7 +1070,7 @@ msgid "Rotate CCW (left)" msgstr "" #: mod/photos.php:1333 mod/photos.php:1389 mod/photos.php:1463 -#: src/Module/Contact.php:547 src/Module/Item/Compose.php:160 +#: src/Module/Contact.php:547 src/Module/Item/Compose.php:188 #: src/Object/Post.php:989 msgid "This is you" msgstr "" @@ -1080,11 +1080,11 @@ msgstr "" msgid "Comment" msgstr "" -#: mod/photos.php:1424 src/Content/Conversation.php:629 src/Object/Post.php:256 +#: mod/photos.php:1424 src/Content/Conversation.php:630 src/Object/Post.php:256 msgid "Select" msgstr "" -#: mod/photos.php:1425 mod/settings.php:350 src/Content/Conversation.php:630 +#: mod/photos.php:1425 mod/settings.php:350 src/Content/Conversation.php:631 #: src/Module/Admin/Users/Active.php:139 src/Module/Admin/Users/Blocked.php:140 #: src/Module/Admin/Users/Index.php:153 msgid "Delete" @@ -1947,7 +1947,7 @@ msgid "%s attends maybe." msgstr "" #: src/Content/Conversation.php:222 src/Content/Conversation.php:260 -#: src/Content/Conversation.php:873 +#: src/Content/Conversation.php:874 #, php-format msgid "%s reshared this." msgstr "" @@ -2020,7 +2020,7 @@ msgstr "" msgid "Visible to everybody" msgstr "" -#: src/Content/Conversation.php:308 src/Module/Item/Compose.php:171 +#: src/Content/Conversation.php:308 src/Module/Item/Compose.php:198 #: src/Object/Post.php:1002 msgid "Please enter a image/video/audio/webpage URL:" msgstr "" @@ -2041,7 +2041,7 @@ msgstr "" msgid "Delete item(s)?" msgstr "" -#: src/Content/Conversation.php:324 src/Module/Item/Compose.php:143 +#: src/Content/Conversation.php:324 src/Module/Item/Compose.php:175 msgid "Created at" msgstr "" @@ -2053,7 +2053,7 @@ msgstr "" msgid "Share" msgstr "" -#: src/Content/Conversation.php:348 src/Module/Item/Compose.php:168 +#: src/Content/Conversation.php:348 src/Module/Item/Compose.php:195 #: src/Object/Post.php:999 msgid "Image" msgstr "" @@ -2062,117 +2062,117 @@ msgstr "" msgid "Video" msgstr "" -#: src/Content/Conversation.php:364 src/Module/Item/Compose.php:184 +#: src/Content/Conversation.php:364 src/Module/Item/Compose.php:222 msgid "Scheduled at" msgstr "" -#: src/Content/Conversation.php:657 src/Object/Post.php:244 +#: src/Content/Conversation.php:658 src/Object/Post.php:244 msgid "Pinned item" msgstr "" -#: src/Content/Conversation.php:673 src/Object/Post.php:486 +#: src/Content/Conversation.php:674 src/Object/Post.php:486 #: src/Object/Post.php:487 #, php-format msgid "View %s's profile @ %s" msgstr "" -#: src/Content/Conversation.php:686 src/Object/Post.php:474 +#: src/Content/Conversation.php:687 src/Object/Post.php:474 msgid "Categories:" msgstr "" -#: src/Content/Conversation.php:687 src/Object/Post.php:475 +#: src/Content/Conversation.php:688 src/Object/Post.php:475 msgid "Filed under:" msgstr "" -#: src/Content/Conversation.php:695 src/Object/Post.php:500 +#: src/Content/Conversation.php:696 src/Object/Post.php:500 #, php-format msgid "%s from %s" msgstr "" -#: src/Content/Conversation.php:711 +#: src/Content/Conversation.php:712 msgid "View in context" msgstr "" -#: src/Content/Conversation.php:776 +#: src/Content/Conversation.php:777 msgid "remove" msgstr "" -#: src/Content/Conversation.php:780 +#: src/Content/Conversation.php:781 msgid "Delete Selected Items" msgstr "" -#: src/Content/Conversation.php:845 src/Content/Conversation.php:848 -#: src/Content/Conversation.php:851 src/Content/Conversation.php:854 +#: src/Content/Conversation.php:846 src/Content/Conversation.php:849 +#: src/Content/Conversation.php:852 src/Content/Conversation.php:855 #, php-format msgid "You had been addressed (%s)." msgstr "" -#: src/Content/Conversation.php:857 +#: src/Content/Conversation.php:858 #, php-format msgid "You are following %s." msgstr "" -#: src/Content/Conversation.php:860 +#: src/Content/Conversation.php:861 msgid "You subscribed to one or more tags in this post." msgstr "" -#: src/Content/Conversation.php:875 +#: src/Content/Conversation.php:876 msgid "Reshared" msgstr "" -#: src/Content/Conversation.php:875 +#: src/Content/Conversation.php:876 #, php-format msgid "Reshared by %s <%s>" msgstr "" -#: src/Content/Conversation.php:878 +#: src/Content/Conversation.php:879 #, php-format msgid "%s is participating in this thread." msgstr "" -#: src/Content/Conversation.php:881 +#: src/Content/Conversation.php:882 msgid "Stored for general reasons" msgstr "" -#: src/Content/Conversation.php:884 +#: src/Content/Conversation.php:885 msgid "Global post" msgstr "" -#: src/Content/Conversation.php:887 +#: src/Content/Conversation.php:888 msgid "Sent via an relay server" msgstr "" -#: src/Content/Conversation.php:887 +#: src/Content/Conversation.php:888 #, php-format msgid "Sent via the relay server %s <%s>" msgstr "" -#: src/Content/Conversation.php:890 +#: src/Content/Conversation.php:891 msgid "Fetched" msgstr "" -#: src/Content/Conversation.php:890 +#: src/Content/Conversation.php:891 #, php-format msgid "Fetched because of %s <%s>" msgstr "" -#: src/Content/Conversation.php:893 +#: src/Content/Conversation.php:894 msgid "Stored because of a child post to complete this thread." msgstr "" -#: src/Content/Conversation.php:896 +#: src/Content/Conversation.php:897 msgid "Local delivery" msgstr "" -#: src/Content/Conversation.php:899 +#: src/Content/Conversation.php:900 msgid "Stored because of your activity (like, comment, star, ...)" msgstr "" -#: src/Content/Conversation.php:902 +#: src/Content/Conversation.php:903 msgid "Distributed" msgstr "" -#: src/Content/Conversation.php:905 +#: src/Content/Conversation.php:906 msgid "Pushed to us" msgstr "" @@ -2628,39 +2628,39 @@ msgstr "" msgid "last" msgstr "" -#: src/Content/Text/BBCode.php:1002 src/Content/Text/BBCode.php:1867 -#: src/Content/Text/BBCode.php:1868 +#: src/Content/Text/BBCode.php:1002 src/Content/Text/BBCode.php:1883 +#: src/Content/Text/BBCode.php:1884 msgid "Image/photo" msgstr "" -#: src/Content/Text/BBCode.php:1222 +#: src/Content/Text/BBCode.php:1238 #, php-format msgid "" "%2$s %3$s" msgstr "" -#: src/Content/Text/BBCode.php:1247 src/Model/Item.php:3429 +#: src/Content/Text/BBCode.php:1263 src/Model/Item.php:3429 #: src/Model/Item.php:3435 src/Model/Item.php:3436 msgid "Link to source" msgstr "" -#: src/Content/Text/BBCode.php:1785 src/Content/Text/HTML.php:940 +#: src/Content/Text/BBCode.php:1801 src/Content/Text/HTML.php:940 msgid "Click to open/close" msgstr "" -#: src/Content/Text/BBCode.php:1816 +#: src/Content/Text/BBCode.php:1832 msgid "$1 wrote:" msgstr "" -#: src/Content/Text/BBCode.php:1872 src/Content/Text/BBCode.php:1873 +#: src/Content/Text/BBCode.php:1888 src/Content/Text/BBCode.php:1889 msgid "Encrypted content" msgstr "" -#: src/Content/Text/BBCode.php:2093 +#: src/Content/Text/BBCode.php:2109 msgid "Invalid source protocol" msgstr "" -#: src/Content/Text/BBCode.php:2108 +#: src/Content/Text/BBCode.php:2124 msgid "Invalid link protocol" msgstr "" @@ -8094,40 +8094,46 @@ msgid "" "important, please visit http://friendi.ca" msgstr "" -#: src/Module/Item/Compose.php:50 +#: src/Module/Item/Compose.php:85 msgid "Please enter a post body." msgstr "" -#: src/Module/Item/Compose.php:63 +#: src/Module/Item/Compose.php:98 msgid "This feature is only available with the frio theme." msgstr "" -#: src/Module/Item/Compose.php:90 +#: src/Module/Item/Compose.php:122 msgid "Compose new personal note" msgstr "" -#: src/Module/Item/Compose.php:99 +#: src/Module/Item/Compose.php:131 msgid "Compose new post" msgstr "" -#: src/Module/Item/Compose.php:153 +#: src/Module/Item/Compose.php:187 msgid "Visibility" msgstr "" -#: src/Module/Item/Compose.php:174 +#: src/Module/Item/Compose.php:201 msgid "Clear the location" msgstr "" -#: src/Module/Item/Compose.php:175 +#: src/Module/Item/Compose.php:202 msgid "Location services are unavailable on your device" msgstr "" -#: src/Module/Item/Compose.php:176 +#: src/Module/Item/Compose.php:203 msgid "" "Location services are disabled. Please check the website's permissions on " "your device" msgstr "" +#: src/Module/Item/Compose.php:209 +msgid "" +"You can make this page always open when you use the New Post button in the " +"Theme Customization settings." +msgstr "" + #: src/Module/Item/Follow.php:52 msgid "Unable to follow this item." msgstr "" @@ -9456,7 +9462,7 @@ msgid "Content Settings" msgstr "" #: src/Module/Settings/Display.php:205 view/theme/duepuntozero/config.php:70 -#: view/theme/frio/config.php:161 view/theme/quattro/config.php:72 +#: view/theme/frio/config.php:172 view/theme/quattro/config.php:72 #: view/theme/vier/config.php:120 msgid "Theme settings" msgstr "" @@ -11119,113 +11125,124 @@ msgstr "" msgid "Variations" msgstr "" -#: view/theme/frio/config.php:142 +#: view/theme/frio/config.php:153 msgid "Light (Accented)" msgstr "" -#: view/theme/frio/config.php:143 +#: view/theme/frio/config.php:154 msgid "Dark (Accented)" msgstr "" -#: view/theme/frio/config.php:144 +#: view/theme/frio/config.php:155 msgid "Black (Accented)" msgstr "" -#: view/theme/frio/config.php:156 +#: view/theme/frio/config.php:167 msgid "Note" msgstr "" -#: view/theme/frio/config.php:156 +#: view/theme/frio/config.php:167 msgid "Check image permissions if all users are allowed to see the image" msgstr "" -#: view/theme/frio/config.php:162 +#: view/theme/frio/config.php:173 msgid "Custom" msgstr "" -#: view/theme/frio/config.php:163 +#: view/theme/frio/config.php:174 msgid "Legacy" msgstr "" -#: view/theme/frio/config.php:164 +#: view/theme/frio/config.php:175 msgid "Accented" msgstr "" -#: view/theme/frio/config.php:165 +#: view/theme/frio/config.php:176 msgid "Select color scheme" msgstr "" -#: view/theme/frio/config.php:166 +#: view/theme/frio/config.php:177 msgid "Select scheme accent" msgstr "" -#: view/theme/frio/config.php:166 +#: view/theme/frio/config.php:177 msgid "Blue" msgstr "" -#: view/theme/frio/config.php:166 +#: view/theme/frio/config.php:177 msgid "Red" msgstr "" -#: view/theme/frio/config.php:166 +#: view/theme/frio/config.php:177 msgid "Purple" msgstr "" -#: view/theme/frio/config.php:166 +#: view/theme/frio/config.php:177 msgid "Green" msgstr "" -#: view/theme/frio/config.php:166 +#: view/theme/frio/config.php:177 msgid "Pink" msgstr "" -#: view/theme/frio/config.php:167 +#: view/theme/frio/config.php:178 msgid "Copy or paste schemestring" msgstr "" -#: view/theme/frio/config.php:167 +#: view/theme/frio/config.php:178 msgid "" "You can copy this string to share your theme with others. Pasting here " "applies the schemestring" msgstr "" -#: view/theme/frio/config.php:168 +#: view/theme/frio/config.php:179 msgid "Navigation bar background color" msgstr "" -#: view/theme/frio/config.php:169 +#: view/theme/frio/config.php:180 msgid "Navigation bar icon color " msgstr "" -#: view/theme/frio/config.php:170 +#: view/theme/frio/config.php:181 msgid "Link color" msgstr "" -#: view/theme/frio/config.php:171 +#: view/theme/frio/config.php:182 msgid "Set the background color" msgstr "" -#: view/theme/frio/config.php:172 +#: view/theme/frio/config.php:183 msgid "Content background opacity" msgstr "" -#: view/theme/frio/config.php:173 +#: view/theme/frio/config.php:184 msgid "Set the background image" msgstr "" -#: view/theme/frio/config.php:174 +#: view/theme/frio/config.php:185 msgid "Background image style" msgstr "" -#: view/theme/frio/config.php:179 +#: view/theme/frio/config.php:188 +msgid "Always open Compose page" +msgstr "" + +#: view/theme/frio/config.php:188 +msgid "" +"The New Post button always open the Compose page " +"instead of the modal form. When this is disabled, the Compose page can be " +"accessed with a middle click on the link or from the modal." +msgstr "" + +#: view/theme/frio/config.php:192 msgid "Login page background image" msgstr "" -#: view/theme/frio/config.php:183 +#: view/theme/frio/config.php:196 msgid "Login page background color" msgstr "" -#: view/theme/frio/config.php:183 +#: view/theme/frio/config.php:196 msgid "Leave background image and color empty for theme defaults" msgstr "" From f8f0dfa91ab226fe1f94abe8cf86f2c5ceeeec12 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 16 Oct 2022 21:37:05 +0000 Subject: [PATCH 12/27] Detect linked posts and add them as quote --- src/Content/Item.php | 12 +++-- src/Model/Item.php | 43 ++++++++++++--- src/Model/Post/Media.php | 66 ++++++++++++++++++++++++ src/Protocol/ActivityPub/Processor.php | 4 +- src/Protocol/ActivityPub/Transmitter.php | 9 +--- static/dbstructure.config.php | 4 +- 6 files changed, 115 insertions(+), 23 deletions(-) diff --git a/src/Content/Item.php b/src/Content/Item.php index 1838d4ac4..bfa107325 100644 --- a/src/Content/Item.php +++ b/src/Content/Item.php @@ -608,9 +608,10 @@ class Item * * @param integer $UriId * @param integer $uid + * @param bool $add_media * @return string */ - public function createSharedPostByUriId(int $UriId, int $uid = 0): string + public function createSharedPostByUriId(int $UriId, int $uid = 0, bool $add_media = false): string { $fields = ['uri-id', 'uri', 'body', 'title', 'author-name', 'author-link', 'author-avatar', 'guid', 'created', 'plink', 'network']; $shared_item = Post::selectFirst($fields, ['uri-id' => $UriId, 'uid' => [$uid, 0], 'private' => [ModelItem::PUBLIC, ModelItem::UNLISTED]]); @@ -619,7 +620,7 @@ class Item return ''; } - return $this->createSharedBlockByArray($shared_item); + return $this->createSharedBlockByArray($shared_item, $add_media); } /** @@ -627,9 +628,10 @@ class Item * * @param string $guid * @param integer $uid + * @param bool $add_media * @return string */ - public function createSharedPostByGuid(string $guid, int $uid = 0, string $host = ''): string + public function createSharedPostByGuid(string $guid, int $uid = 0, string $host = '', bool $add_media = false): string { $fields = ['uri-id', 'uri', 'body', 'title', 'author-name', 'author-link', 'author-avatar', 'guid', 'created', 'plink', 'network']; $shared_item = Post::selectFirst($fields, ['guid' => $guid, 'uid' => [$uid, 0], 'private' => [ModelItem::PUBLIC, ModelItem::UNLISTED]]); @@ -646,7 +648,7 @@ class Item return ''; } - return $this->createSharedBlockByArray($shared_item); + return $this->createSharedBlockByArray($shared_item, $add_media); } /** @@ -678,7 +680,7 @@ class Item // If it is a reshared post then reformat it to avoid display problems with two share elements if (Diaspora::isReshare($item['body'], false)) { - if (!empty($shared['guid']) && ($encaspulated_share = self::createSharedPostByGuid($shared['guid']))) { + if (!empty($shared['guid']) && ($encaspulated_share = self::createSharedPostByGuid($shared['guid'], 0, '', $add_media))) { $item['body'] = preg_replace("/\[share.*?\](.*)\[\/share\]/ism", $encaspulated_share, $item['body']); } diff --git a/src/Model/Item.php b/src/Model/Item.php index 439c1b990..3270d170b 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -2946,17 +2946,44 @@ class Item $body = $item['body'] ?? ''; $shared = BBCode::fetchShareAttributes($body); if (!empty($shared['guid'])) { - $shared_item = Post::selectFirst(['uri-id', 'plink', 'has-media'], ['guid' => $shared['guid']]); - $shared_uri_id = $shared_item['uri-id'] ?? 0; - $shared_links = [strtolower($shared_item['plink'] ?? '')]; - $shared_attachments = Post\Media::splitAttachments($shared_uri_id, $shared['guid'], [], $shared_item['has-media'] ?? false); + $shared_item = Post::selectFirst(['uri-id', 'guid', 'plink', 'has-media'], ['guid' => $shared['guid'], 'uid' => [$item['uid'], 0]]); + } + + $fields = ['uri-id', 'uri', 'body', 'title', 'author-name', 'author-link', 'author-avatar', 'guid', 'created', 'plink', 'network', 'has-media']; + + $shared_uri_id = 0; + $shared_links = []; + + if (empty($shared_item['uri-id']) && !empty($item['quote-uri-id'])) { + $shared_item = Post::selectFirst($fields, ['uri-id' => $item['quote-uri-id']]); + $quote_uri_id = $item['quote-uri-id'] ?? 0; + $shared_links[] = strtolower($item['quote-uri']); + } elseif (empty($shared_item['uri-id']) && empty($item['quote-uri-id'])) { + $media = Post\Media::getByURIId($item['uri-id'], [Post\Media::ACTIVITY]); + if (!empty($media)) { + $shared_item = Post::selectFirst($fields, ['plink' => $media[0]['url'], 'uid' => [$item['uid'], 0]]); + + if (empty($shared_item['uri-id'])) { + $shared_item = Post::selectFirst($fields, ['uri' => $media[0]['url'], 'uid' => [$item['uid'], 0]]); + $shared_links[] = strtolower($media[0]['url']); + } + + $quote_uri_id = $shared_item['uri-id'] ?? 0; + } + } + + if (!empty($quote_uri_id)) { + $item['body'] .= "\n" . DI::contentItem()->createSharedBlockByArray($shared_item); + } + + if (!empty($shared_item['uri-id'])) { + $shared_uri_id = $shared_item['uri-id']; + $shared_links[] = strtolower($shared_item['plink']); + $shared_attachments = Post\Media::splitAttachments($shared_uri_id, $shared_item['guid'], [], $shared_item['has-media']); $shared_links = array_merge($shared_links, array_column($shared_attachments['visual'], 'url')); $shared_links = array_merge($shared_links, array_column($shared_attachments['link'], 'url')); $shared_links = array_merge($shared_links, array_column($shared_attachments['additional'], 'url')); $item['body'] = self::replaceVisualAttachments($shared_attachments, $item['body']); - } else { - $shared_uri_id = 0; - $shared_links = []; } $attachments = Post\Media::splitAttachments($item['uri-id'], $item['guid'] ?? '', $shared_links, $item['has-media'] ?? false); @@ -3278,7 +3305,7 @@ class Item } DI::profiler()->stopRecording(); - if (isset($data['url']) && !in_array($data['url'], $ignore_links)) { + if (isset($data['url']) && !in_array(strtolower($data['url']), $ignore_links)) { if (!empty($data['description']) || !empty($data['image']) || !empty($data['preview'])) { $parts = parse_url($data['url']); if (!empty($parts['scheme']) && !empty($parts['host'])) { diff --git a/src/Model/Post/Media.php b/src/Model/Post/Media.php index ce00b205c..6d0707743 100644 --- a/src/Model/Post/Media.php +++ b/src/Model/Post/Media.php @@ -23,10 +23,12 @@ namespace Friendica\Model\Post; use Friendica\Content\Text\BBCode; use Friendica\Core\Logger; +use Friendica\Core\Protocol; use Friendica\Core\System; use Friendica\Database\Database; use Friendica\Database\DBA; use Friendica\DI; +use Friendica\Model\Contact; use Friendica\Model\Item; use Friendica\Model\Photo; use Friendica\Model\Post; @@ -56,6 +58,7 @@ class Media const HTML = 17; const XML = 18; const PLAIN = 19; + const ACTIVITY = 20; const DOCUMENT = 128; /** @@ -215,6 +218,10 @@ class Media $media = self::addType($media); } + if (in_array($media['type'], [self::TEXT, self::APPLICATION, self::HTML, self::XML, self::PLAIN])) { + $media = self::addActivity($media); + } + if ($media['type'] == self::HTML) { $data = ParseUrl::getSiteinfoCached($media['url'], false); $media['preview'] = $data['images'][0]['src'] ?? null; @@ -232,6 +239,65 @@ class Media return $media; } + /** + * Adds the activity type if the media entry is linked to an activity + * + * @param array $media + * @return array + */ + private static function addActivity(array $media): array + { + $id = Item::fetchByLink($media['url']); + if (empty($id)) { + return $media; + } + + $item = Post::selectFirst([], ['id' => $id, 'network' => Protocol::FEDERATED]); + if (empty($item['id'])) { + Logger::debug('Not a federated activity', ['id' => $id, 'uri-id' => $media['uri-id'], 'url' => $media['url']]); + return $media; + } + + if (!empty($item['plink']) && Strings::compareLink($item['plink'], $media['url']) && + parse_url($item['plink'], PHP_URL_HOST) != parse_url($item['uri'], PHP_URL_HOST)) { + Logger::debug('Not a link to an activity', ['uri-id' => $media['uri-id'], 'url' => $media['url'], 'plink' => $item['plink'], 'uri' => $item['uri']]); + return $media; + } + + if (in_array($item['network'], [Protocol::ACTIVITYPUB, Protocol::DFRN])) { + $media['mimetype'] = 'application/activity+json'; + } elseif ($item['network'] == Protocol::DIASPORA) { + $media['mimetype'] = 'application/xml'; + } else { + $media['mimetype'] = ''; + } + + $contact = Contact::getById($item['author-id'], ['avatar', 'gsid']); + if (!empty($contact['gsid'])) { + $gserver = DBA::selectFirst('gserver', ['url', 'site_name'], ['id' => $contact['gsid']]); + } + + $media['type'] = self::ACTIVITY; + $media['media-uri-id'] = $item['uri-id']; + $media['height'] = null; + $media['width'] = null; + $media['size'] = null; + $media['preview'] = null; + $media['preview-height'] = null; + $media['preview-width'] = null; + $media['description'] = $item['body']; + $media['name'] = $item['title']; + $media['author-url'] = $item['author-link']; + $media['author-name'] = $item['author-name']; + $media['author-image'] = $contact['avatar'] ?? $item['author-avatar']; + $media['publisher-url'] = $gserver['url'] ?? null; + $media['publisher-name'] = $gserver['site_name'] ?? null; + $media['publisher-image'] = null; + + Logger::debug('Activity detected', ['uri-id' => $media['uri-id'], 'url' => $media['url'], 'plink' => $item['plink'], 'uri' => $item['uri']]); + return $media; + } + /** * Fetch media data from local resources * @param array $media diff --git a/src/Protocol/ActivityPub/Processor.php b/src/Protocol/ActivityPub/Processor.php index 5183a82c3..04ea02f80 100644 --- a/src/Protocol/ActivityPub/Processor.php +++ b/src/Protocol/ActivityPub/Processor.php @@ -170,7 +170,7 @@ class Processor } /** - * Stire attachment data + * Store attachment data * * @param array $activity * @param array $item @@ -187,7 +187,7 @@ class Processor } /** - * Store attachment data + * Store question data * * @param array $activity * @param array $item diff --git a/src/Protocol/ActivityPub/Transmitter.php b/src/Protocol/ActivityPub/Transmitter.php index c37fefb42..8b9571e55 100644 --- a/src/Protocol/ActivityPub/Transmitter.php +++ b/src/Protocol/ActivityPub/Transmitter.php @@ -1674,13 +1674,8 @@ class Transmitter } $data['quoteUrl'] = $item['quote-uri']; } elseif (!empty($item['quote-uri']) && !Diaspora::isReshare($body, false)) { - $fields = ['uri-id', 'uri', 'body', 'title', 'author-name', 'author-link', 'author-avatar', 'guid', 'created', 'plink', 'network']; - $shared_item = Post::selectFirst($fields, ['uri-id' => $item['quote-uri-id']]); - if (!empty($shared_item['uri-id'])) { - $shared_item['body'] = Post\Media::addAttachmentsToBody($shared_item['uri-id'], $shared_item['body']); - $body .= "\n" . DI::contentItem()->createSharedBlockByArray($shared_item); - $item['body'] = Item::improveSharedDataInBody($item, true); - } + $body .= "\n" . DI::contentItem()->createSharedPostByUriId($item['quote-uri-id'], $item['uid'], true); + $item['body'] = Item::improveSharedDataInBody($item, true); } $data['content'] = BBCode::convertForUriId($item['uri-id'], $body, BBCode::ACTIVITYPUB); diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index 5da1c1771..262d7d307 100644 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -55,7 +55,7 @@ use Friendica\Database\DBA; if (!defined('DB_UPDATE_VERSION')) { - define('DB_UPDATE_VERSION', 1485); + define('DB_UPDATE_VERSION', 1486); } return [ @@ -1321,6 +1321,7 @@ return [ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"], "uri-id" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the item uri"], "url" => ["type" => "varbinary(1024)", "not null" => "1", "comment" => "Media URL"], + "media-uri-id" => ["type" => "int unsigned", "foreign" => ["item-uri" => "id"], "comment" => "Id of the item-uri table entry that contains the activities uri-id"], "type" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => "Media type"], "mimetype" => ["type" => "varchar(60)", "comment" => ""], "height" => ["type" => "smallint unsigned", "comment" => "Height of the media"], @@ -1342,6 +1343,7 @@ return [ "PRIMARY" => ["id"], "uri-id-url" => ["UNIQUE", "uri-id", "url(512)"], "uri-id-id" => ["uri-id", "id"], + "media-uri-id" => ["media-uri-id"], ] ], "post-question" => [ From b4661b35fdf431cfc5d71d554692cc61d9e80219 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 16 Oct 2022 21:43:48 +0000 Subject: [PATCH 13/27] Improved database.sql --- database.sql | 7 +++-- doc/database/db_post-media.md | 55 ++++++++++++++++++----------------- 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/database.sql b/database.sql index c1b64fbed..ab8c300a8 100644 --- a/database.sql +++ b/database.sql @@ -1,6 +1,6 @@ -- ------------------------------------------ -- Friendica 2022.12-dev (Giant Rhubarb) --- DB_UPDATE_VERSION 1485 +-- DB_UPDATE_VERSION 1486 -- ------------------------------------------ @@ -1292,6 +1292,7 @@ CREATE TABLE IF NOT EXISTS `post-media` ( `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', `uri-id` int unsigned NOT NULL COMMENT 'Id of the item-uri table entry that contains the item uri', `url` varbinary(1024) NOT NULL COMMENT 'Media URL', + `media-uri-id` int unsigned COMMENT 'Id of the item-uri table entry that contains the activities uri-id', `type` tinyint unsigned NOT NULL DEFAULT 0 COMMENT 'Media type', `mimetype` varchar(60) COMMENT '', `height` smallint unsigned COMMENT 'Height of the media', @@ -1311,7 +1312,9 @@ CREATE TABLE IF NOT EXISTS `post-media` ( PRIMARY KEY(`id`), UNIQUE INDEX `uri-id-url` (`uri-id`,`url`(512)), INDEX `uri-id-id` (`uri-id`,`id`), - FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE + INDEX `media-uri-id` (`media-uri-id`), + FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, + FOREIGN KEY (`media-uri-id`) REFERENCES `item-uri` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE ) DEFAULT COLLATE utf8mb4_general_ci COMMENT='Attached media'; -- diff --git a/doc/database/db_post-media.md b/doc/database/db_post-media.md index 59c87cd36..d6e3a703c 100644 --- a/doc/database/db_post-media.md +++ b/doc/database/db_post-media.md @@ -6,36 +6,38 @@ Attached media Fields ------ -| Field | Description | Type | Null | Key | Default | Extra | -| --------------- | --------------------------------------------------------- | ----------------- | ---- | --- | ------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | | NULL | | -| url | Media URL | varbinary(1024) | NO | | NULL | | -| type | Media type | tinyint unsigned | NO | | 0 | | -| mimetype | | varchar(60) | YES | | NULL | | -| height | Height of the media | smallint unsigned | YES | | NULL | | -| width | Width of the media | smallint unsigned | YES | | NULL | | -| size | Media size | bigint unsigned | YES | | NULL | | -| preview | Preview URL | varbinary(512) | YES | | NULL | | -| preview-height | Height of the preview picture | smallint unsigned | YES | | NULL | | -| preview-width | Width of the preview picture | smallint unsigned | YES | | NULL | | -| description | | text | YES | | NULL | | -| name | Name of the media | varchar(255) | YES | | NULL | | -| author-url | URL of the author of the media | varbinary(383) | YES | | NULL | | -| author-name | Name of the author of the media | varchar(255) | YES | | NULL | | -| author-image | Image of the author of the media | varbinary(383) | YES | | NULL | | -| publisher-url | URL of the publisher of the media | varbinary(383) | YES | | NULL | | -| publisher-name | Name of the publisher of the media | varchar(255) | YES | | NULL | | -| publisher-image | Image of the publisher of the media | varbinary(383) | YES | | NULL | | +| Field | Description | Type | Null | Key | Default | Extra | +| --------------- | ------------------------------------------------------------------ | ----------------- | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| uri-id | Id of the item-uri table entry that contains the item uri | int unsigned | NO | | NULL | | +| url | Media URL | varbinary(1024) | NO | | NULL | | +| media-uri-id | Id of the item-uri table entry that contains the activities uri-id | int unsigned | YES | | NULL | | +| type | Media type | tinyint unsigned | NO | | 0 | | +| mimetype | | varchar(60) | YES | | NULL | | +| height | Height of the media | smallint unsigned | YES | | NULL | | +| width | Width of the media | smallint unsigned | YES | | NULL | | +| size | Media size | bigint unsigned | YES | | NULL | | +| preview | Preview URL | varbinary(512) | YES | | NULL | | +| preview-height | Height of the preview picture | smallint unsigned | YES | | NULL | | +| preview-width | Width of the preview picture | smallint unsigned | YES | | NULL | | +| description | | text | YES | | NULL | | +| name | Name of the media | varchar(255) | YES | | NULL | | +| author-url | URL of the author of the media | varbinary(383) | YES | | NULL | | +| author-name | Name of the author of the media | varchar(255) | YES | | NULL | | +| author-image | Image of the author of the media | varbinary(383) | YES | | NULL | | +| publisher-url | URL of the publisher of the media | varbinary(383) | YES | | NULL | | +| publisher-name | Name of the publisher of the media | varchar(255) | YES | | NULL | | +| publisher-image | Image of the publisher of the media | varbinary(383) | YES | | NULL | | Indexes ------------ -| Name | Fields | -| ---------- | ------------------------ | -| PRIMARY | id | -| uri-id-url | UNIQUE, uri-id, url(512) | -| uri-id-id | uri-id, id | +| Name | Fields | +| ------------ | ------------------------ | +| PRIMARY | id | +| uri-id-url | UNIQUE, uri-id, url(512) | +| uri-id-id | uri-id, id | +| media-uri-id | media-uri-id | Foreign Keys ------------ @@ -43,5 +45,6 @@ Foreign Keys | Field | Target Table | Target Field | |-------|--------------|--------------| | uri-id | [item-uri](help/database/db_item-uri) | id | +| media-uri-id | [item-uri](help/database/db_item-uri) | id | Return to [database documentation](help/database) From 018858934b0423efb7dd07e660f621f1e8eb75cd Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 17 Oct 2022 05:49:55 +0000 Subject: [PATCH 14/27] The priority is now a class constant --- boot.php | 15 ------- mod/events.php | 2 +- mod/item.php | 3 +- mod/tagger.php | 2 +- src/Console/Relocate.php | 2 +- src/Core/Search.php | 2 +- src/Core/Update.php | 2 +- src/Core/UserImport.php | 2 +- src/Core/Worker.php | 50 +++++++++++++--------- src/Core/Worker/Cron.php | 24 +++++------ src/Model/Contact.php | 32 +++++++------- src/Model/FContact.php | 2 +- src/Model/GServer.php | 6 +-- src/Model/Item.php | 12 +++--- src/Model/Mail.php | 2 +- src/Model/Post/Delayed.php | 2 +- src/Model/Profile.php | 4 +- src/Model/PushSubscriber.php | 6 +-- src/Model/Subscription.php | 2 +- src/Model/User.php | 8 ++-- src/Module/Admin/Blocklist/Contact.php | 2 +- src/Module/Admin/Blocklist/Server/Add.php | 2 +- src/Module/Admin/Site.php | 4 +- src/Module/Api/Friendica/Events/Create.php | 2 +- src/Module/Api/Mastodon/Statuses.php | 3 +- src/Module/Contact.php | 4 +- src/Module/FriendSuggest.php | 2 +- src/Module/Photo.php | 2 +- src/Module/Register.php | 2 +- src/Module/Settings/Account.php | 4 +- src/Protocol/ActivityPub/Processor.php | 6 +-- src/Protocol/ActivityPub/Receiver.php | 2 +- src/Protocol/Diaspora.php | 2 +- src/Protocol/Feed.php | 3 +- src/Worker/CheckDeletedContacts.php | 2 +- src/Worker/Cron.php | 38 ++++++++-------- src/Worker/Directory.php | 2 +- src/Worker/ExpirePosts.php | 4 +- src/Worker/MoveStorage.php | 2 +- src/Worker/Notifier.php | 10 ++--- src/Worker/PollContacts.php | 6 +-- src/Worker/RemoveUser.php | 3 +- src/Worker/UpdateContacts.php | 2 +- src/Worker/UpdateGServers.php | 4 +- static/defaults.config.php | 2 +- update.php | 4 +- 46 files changed, 148 insertions(+), 151 deletions(-) diff --git a/boot.php b/boot.php index 8e7958de3..b90c1fb2e 100644 --- a/boot.php +++ b/boot.php @@ -71,21 +71,6 @@ define('GRAVITY_COMMENT', 6); define('GRAVITY_UNKNOWN', 9); /* @}*/ -/** - * @name Priority - * - * Process priority for the worker - * @{ - */ -define('PRIORITY_UNDEFINED', 0); -define('PRIORITY_CRITICAL', 10); -define('PRIORITY_HIGH', 20); -define('PRIORITY_MEDIUM', 30); -define('PRIORITY_LOW', 40); -define('PRIORITY_NEGLIGIBLE', 50); -define('PRIORITIES', [PRIORITY_CRITICAL, PRIORITY_HIGH, PRIORITY_MEDIUM, PRIORITY_LOW, PRIORITY_NEGLIGIBLE]); -/* @}*/ - // Normally this constant is defined - but not if "pcntl" isn't installed if (!defined('SIGTERM')) { define('SIGTERM', 15); diff --git a/mod/events.php b/mod/events.php index 082cdf55d..eead66c01 100644 --- a/mod/events.php +++ b/mod/events.php @@ -205,7 +205,7 @@ function events_post(App $a) } if (!$cid && $uri_id) { - Worker::add(PRIORITY_HIGH, "Notifier", Delivery::POST, (int)$uri_id, (int)$uid); + Worker::add(Worker::PRIORITY_HIGH, "Notifier", Delivery::POST, (int)$uri_id, (int)$uid); } DI::baseUrl()->redirect('events'); diff --git a/mod/item.php b/mod/item.php index f3f0fd40d..8f4494ca7 100644 --- a/mod/item.php +++ b/mod/item.php @@ -36,6 +36,7 @@ use Friendica\Core\Logger; use Friendica\Core\Protocol; use Friendica\Core\Session; use Friendica\Core\System; +use Friendica\Core\Worker; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Attach; @@ -635,7 +636,7 @@ function item_post(App $a) { unset($datarray['self']); unset($datarray['api_source']); - Post\Delayed::add($datarray['uri'], $datarray, PRIORITY_HIGH, Post\Delayed::PREPARED_NO_HOOK, $scheduled_at); + Post\Delayed::add($datarray['uri'], $datarray, Worker::PRIORITY_HIGH, Post\Delayed::PREPARED_NO_HOOK, $scheduled_at); item_post_return(DI::baseUrl(), $api_source, $return_path); } } diff --git a/mod/tagger.php b/mod/tagger.php index e0d95ce66..45b743166 100644 --- a/mod/tagger.php +++ b/mod/tagger.php @@ -166,6 +166,6 @@ EOT; $post = Post::selectFirst(['uri-id', 'uid'], ['id' => $post_id]); - Worker::add(PRIORITY_HIGH, "Notifier", Delivery::POST, $post['uri-id'], $post['uid']); + Worker::add(Worker::PRIORITY_HIGH, "Notifier", Delivery::POST, $post['uri-id'], $post['uid']); System::exit(); } diff --git a/src/Console/Relocate.php b/src/Console/Relocate.php index c1db6ef53..729bee392 100644 --- a/src/Console/Relocate.php +++ b/src/Console/Relocate.php @@ -197,7 +197,7 @@ HELP; $this->out('Schedule relocation messages to remote Friendica and Diaspora hosts'); $users = $this->database->selectToArray('user', ['uid'], ['account_removed' => false, 'account_expired' => false]); foreach ($users as $user) { - Worker::add(PRIORITY_HIGH, 'Notifier', Delivery::RELOCATION, $user['uid']); + Worker::add(Worker::PRIORITY_HIGH, 'Notifier', Delivery::RELOCATION, $user['uid']); } return 0; diff --git a/src/Core/Search.php b/src/Core/Search.php index 5ae1dd7ac..cf3821afc 100644 --- a/src/Core/Search.php +++ b/src/Core/Search.php @@ -192,7 +192,7 @@ class Search } // Add found profiles from the global directory to the local directory - Worker::add(PRIORITY_LOW, 'SearchDirectory', $search); + Worker::add(Worker::PRIORITY_LOW, 'SearchDirectory', $search); return $resultList; } diff --git a/src/Core/Update.php b/src/Core/Update.php index ddb9effd7..ad5b31760 100644 --- a/src/Core/Update.php +++ b/src/Core/Update.php @@ -92,7 +92,7 @@ class Update */ self::run($basePath); } else { - Worker::add(PRIORITY_CRITICAL, 'DBUpdate'); + Worker::add(Worker::PRIORITY_CRITICAL, 'DBUpdate'); } } } diff --git a/src/Core/UserImport.php b/src/Core/UserImport.php index 339ce0b65..f8485fc29 100644 --- a/src/Core/UserImport.php +++ b/src/Core/UserImport.php @@ -322,7 +322,7 @@ class UserImport } // send relocate messages - Worker::add(PRIORITY_HIGH, 'Notifier', Delivery::RELOCATION, $newuid); + Worker::add(Worker::PRIORITY_HIGH, 'Notifier', Delivery::RELOCATION, $newuid); info(DI::l10n()->t("Done. You can now login with your username and password")); DI::baseUrl()->redirect('login'); diff --git a/src/Core/Worker.php b/src/Core/Worker.php index a57792ce7..9ec2f8f04 100644 --- a/src/Core/Worker.php +++ b/src/Core/Worker.php @@ -31,12 +31,20 @@ use Friendica\Util\DateTimeFormat; */ class Worker { - const PRIORITY_UNDEFINED = PRIORITY_UNDEFINED; - const PRIORITY_CRITICAL = PRIORITY_CRITICAL; - const PRIORITY_HIGH = PRIORITY_HIGH; - const PRIORITY_MEDIUM = PRIORITY_MEDIUM; - const PRIORITY_LOW = PRIORITY_LOW; - const PRIORITY_NEGLIGIBLE = PRIORITY_NEGLIGIBLE; + /** + * @name Priority + * + * Process priority for the worker + * @{ + */ + const PRIORITY_UNDEFINED = 0; + const PRIORITY_CRITICAL = 10; + const PRIORITY_HIGH = 20; + const PRIORITY_MEDIUM = 30; + const PRIORITY_LOW = 40; + const PRIORITY_NEGLIGIBLE = 50; + const PRIORITIES = [self::PRIORITY_CRITICAL, self::PRIORITY_HIGH, self::PRIORITY_MEDIUM, self::PRIORITY_LOW, self::PRIORITY_NEGLIGIBLE]; + /* @}*/ const STATE_STARTUP = 1; // Worker is in startup. This takes most time. const STATE_LONG_LOOP = 2; // Worker is processing the whole - long - loop. @@ -807,7 +815,7 @@ class Worker $top_priority = self::highestPriority(); $high_running = self::processWithPriorityActive($top_priority); - if (!$high_running && ($top_priority > PRIORITY_UNDEFINED) && ($top_priority < PRIORITY_NEGLIGIBLE)) { + if (!$high_running && ($top_priority > self::PRIORITY_UNDEFINED) && ($top_priority < self::PRIORITY_NEGLIGIBLE)) { Logger::info('Jobs with a higher priority are waiting but none is executed. Open a fastlane.', ['priority' => $top_priority]); $queues = $active + 1; } @@ -939,7 +947,7 @@ class Worker private static function nextPriority() { $waiting = []; - $priorities = [PRIORITY_CRITICAL, PRIORITY_HIGH, PRIORITY_MEDIUM, PRIORITY_LOW, PRIORITY_NEGLIGIBLE]; + $priorities = [self::PRIORITY_CRITICAL, self::PRIORITY_HIGH, self::PRIORITY_MEDIUM, self::PRIORITY_LOW, self::PRIORITY_NEGLIGIBLE]; foreach ($priorities as $priority) { $stamp = (float)microtime(true); if (DBA::exists('workerqueue', ["`priority` = ? AND `pid` = 0 AND NOT `done` AND `next_try` < ?", $priority, DateTimeFormat::utcNow()])) { @@ -948,8 +956,8 @@ class Worker self::$db_duration += (microtime(true) - $stamp); } - if (!empty($waiting[PRIORITY_CRITICAL])) { - return PRIORITY_CRITICAL; + if (!empty($waiting[self::PRIORITY_CRITICAL])) { + return self::PRIORITY_CRITICAL; } $running = []; @@ -1206,8 +1214,8 @@ class Worker * @param (integer|array) priority or parameter array, strings are deprecated and are ignored * * next args are passed as $cmd command line - * or: Worker::add(PRIORITY_HIGH, 'Notifier', Delivery::DELETION, $drop_id); - * or: Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), 'Delivery', $post_id); + * or: Worker::add(Worker::PRIORITY_HIGH, 'Notifier', Delivery::DELETION, $drop_id); + * or: Worker::add(array('priority' => Worker::PRIORITY_HIGH, 'dont_fork' => true), 'Delivery', $post_id); * * @return int '0' if worker queue entry already existed or there had been an error, otherwise the ID of the worker task * @throws \Friendica\Network\HTTPException\InternalServerErrorException @@ -1230,7 +1238,7 @@ class Worker return 1; } - $priority = PRIORITY_MEDIUM; + $priority = self::PRIORITY_MEDIUM; // Don't fork from frontend tasks by default $dont_fork = DI::config()->get('system', 'worker_dont_fork', false) || !DI::mode()->isBackend(); $created = DateTimeFormat::utcNow(); @@ -1266,9 +1274,9 @@ class Worker $found = DBA::exists('workerqueue', ['command' => $command, 'parameter' => $parameters, 'done' => false]); $added = 0; - if (!is_int($priority) || !in_array($priority, PRIORITIES)) { + if (!is_int($priority) || !in_array($priority, self::PRIORITIES)) { Logger::warning('Invalid priority', ['priority' => $priority, 'command' => $command, 'callstack' => System::callstack(20)]); - $priority = PRIORITY_MEDIUM; + $priority = self::PRIORITY_MEDIUM; } // Quit if there was a database error - a precaution for the update process to 3.5.3 @@ -1383,12 +1391,12 @@ class Worker $delay = (($new_retrial + 2) ** 4) + (rand(1, 30) * ($new_retrial)); $next = DateTimeFormat::utc('now + ' . $delay . ' seconds'); - if (($priority < PRIORITY_MEDIUM) && ($new_retrial > 3)) { - $priority = PRIORITY_MEDIUM; - } elseif (($priority < PRIORITY_LOW) && ($new_retrial > 6)) { - $priority = PRIORITY_LOW; - } elseif (($priority < PRIORITY_NEGLIGIBLE) && ($new_retrial > 8)) { - $priority = PRIORITY_NEGLIGIBLE; + if (($priority < self::PRIORITY_MEDIUM) && ($new_retrial > 3)) { + $priority = self::PRIORITY_MEDIUM; + } elseif (($priority < self::PRIORITY_LOW) && ($new_retrial > 6)) { + $priority = self::PRIORITY_LOW; + } elseif (($priority < self::PRIORITY_NEGLIGIBLE) && ($new_retrial > 8)) { + $priority = self::PRIORITY_NEGLIGIBLE; } Logger::info('Deferred task', ['id' => $id, 'retrial' => $new_retrial, 'created' => $queue['created'], 'next_execution' => $next, 'old_prio' => $queue['priority'], 'new_prio' => $priority]); diff --git a/src/Core/Worker/Cron.php b/src/Core/Worker/Cron.php index 0f2c4b41e..11631e02b 100644 --- a/src/Core/Worker/Cron.php +++ b/src/Core/Worker/Cron.php @@ -47,10 +47,10 @@ class Cron Logger::info('Add cron entries'); // Check for spooled items - Worker::add(['priority' => PRIORITY_HIGH, 'force_priority' => true], 'SpoolPost'); + Worker::add(['priority' => Worker::PRIORITY_HIGH, 'force_priority' => true], 'SpoolPost'); // Run the cron job that calls all other jobs - Worker::add(['priority' => PRIORITY_MEDIUM, 'force_priority' => true], 'Cron'); + Worker::add(['priority' => Worker::PRIORITY_MEDIUM, 'force_priority' => true], 'Cron'); // Cleaning dead processes self::killStaleWorkers(); @@ -112,12 +112,12 @@ class Cron // To avoid a blocking situation we reschedule the process at the beginning of the queue. // Additionally we are lowering the priority. (But not PRIORITY_CRITICAL) $new_priority = $entry['priority']; - if ($entry['priority'] == PRIORITY_HIGH) { - $new_priority = PRIORITY_MEDIUM; - } elseif ($entry['priority'] == PRIORITY_MEDIUM) { - $new_priority = PRIORITY_LOW; - } elseif ($entry['priority'] != PRIORITY_CRITICAL) { - $new_priority = PRIORITY_NEGLIGIBLE; + if ($entry['priority'] == Worker::PRIORITY_HIGH) { + $new_priority = Worker::PRIORITY_MEDIUM; + } elseif ($entry['priority'] == Worker::PRIORITY_MEDIUM) { + $new_priority = Worker::PRIORITY_LOW; + } elseif ($entry['priority'] != Worker::PRIORITY_CRITICAL) { + $new_priority = Worker::PRIORITY_NEGLIGIBLE; } DBA::update('workerqueue', ['executed' => DBA::NULL_DATETIME, 'created' => DateTimeFormat::utcNow(), 'priority' => $new_priority, 'pid' => 0], ['id' => $entry["id"]] ); @@ -166,13 +166,13 @@ class Cron Logger::info('Directly deliver inbox', ['inbox' => $delivery['inbox'], 'result' => $result['success']]); continue; } elseif ($delivery['failed'] < 3) { - $priority = PRIORITY_HIGH; + $priority = Worker::PRIORITY_HIGH; } elseif ($delivery['failed'] < 6) { - $priority = PRIORITY_MEDIUM; + $priority = Worker::PRIORITY_MEDIUM; } elseif ($delivery['failed'] < 8) { - $priority = PRIORITY_LOW; + $priority = Worker::PRIORITY_LOW; } else { - $priority = PRIORITY_NEGLIGIBLE; + $priority = Worker::PRIORITY_NEGLIGIBLE; } if ($delivery['failed'] >= DI::config()->get('system', 'worker_defer_limit')) { diff --git a/src/Model/Contact.php b/src/Model/Contact.php index ceaf635df..434c2b1f6 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -319,7 +319,7 @@ class Contact // Update the contact in the background if needed if (Probe::isProbable($contact['network']) && ($contact['next-update'] < DateTimeFormat::utcNow())) { - Worker::add(['priority' => PRIORITY_LOW, 'dont_fork' => true], 'UpdateContact', $contact['id']); + Worker::add(['priority' => Worker::PRIORITY_LOW, 'dont_fork' => true], 'UpdateContact', $contact['id']); } // Remove the internal fields @@ -884,7 +884,7 @@ class Contact } // Delete it in the background - Worker::add(PRIORITY_MEDIUM, 'Contact\Remove', $id); + Worker::add(Worker::PRIORITY_MEDIUM, 'Contact\Remove', $id); } /** @@ -908,7 +908,7 @@ class Contact if (in_array($contact['rel'], [self::SHARING, self::FRIEND])) { $cdata = self::getPublicAndUserContactID($contact['id'], $contact['uid']); if (!empty($cdata['public'])) { - Worker::add(PRIORITY_HIGH, 'Contact\Unfollow', $cdata['public'], $contact['uid']); + Worker::add(Worker::PRIORITY_HIGH, 'Contact\Unfollow', $cdata['public'], $contact['uid']); } } @@ -938,7 +938,7 @@ class Contact if (in_array($contact['rel'], [self::FOLLOWER, self::FRIEND])) { $cdata = self::getPublicAndUserContactID($contact['id'], $contact['uid']); if (!empty($cdata['public'])) { - Worker::add(PRIORITY_HIGH, 'Contact\RevokeFollow', $cdata['public'], $contact['uid']); + Worker::add(Worker::PRIORITY_HIGH, 'Contact\RevokeFollow', $cdata['public'], $contact['uid']); } } @@ -966,11 +966,11 @@ class Contact $cdata = self::getPublicAndUserContactID($contact['id'], $contact['uid']); if (in_array($contact['rel'], [self::SHARING, self::FRIEND]) && !empty($cdata['public'])) { - Worker::add(PRIORITY_HIGH, 'Contact\Unfollow', $cdata['public'], $contact['uid']); + Worker::add(Worker::PRIORITY_HIGH, 'Contact\Unfollow', $cdata['public'], $contact['uid']); } if (in_array($contact['rel'], [self::FOLLOWER, self::FRIEND]) && !empty($cdata['public'])) { - Worker::add(PRIORITY_HIGH, 'Contact\RevokeFollow', $cdata['public'], $contact['uid']); + Worker::add(Worker::PRIORITY_HIGH, 'Contact\RevokeFollow', $cdata['public'], $contact['uid']); } self::remove($contact['id']); @@ -1248,7 +1248,7 @@ class Contact $contact_id = $contact['id']; if (Probe::isProbable($contact['network']) && ($contact['next-update'] < DateTimeFormat::utcNow())) { - Worker::add(['priority' => PRIORITY_LOW, 'dont_fork' => true], 'UpdateContact', $contact['id']); + Worker::add(['priority' => Worker::PRIORITY_LOW, 'dont_fork' => true], 'UpdateContact', $contact['id']); } if (empty($update) && (!empty($contact['uri-id']) || is_bool($update))) { @@ -2365,7 +2365,7 @@ class Contact return; } Logger::warning('account-user exists for a different contact id', ['account_user' => $account_user, 'id' => $id, 'uid' => $uid, 'uri-id' => $uri_id, 'url' => $url]); - Worker::add(PRIORITY_HIGH, 'MergeContact', $account_user['id'], $id, $uid); + Worker::add(Worker::PRIORITY_HIGH, 'MergeContact', $account_user['id'], $id, $uid); } elseif (DBA::insert('account-user', ['id' => $id, 'uri-id' => $uri_id, 'uid' => $uid], Database::INSERT_IGNORE)) { Logger::notice('account-user was added', ['id' => $id, 'uid' => $uid, 'uri-id' => $uri_id, 'url' => $url]); } else { @@ -2406,7 +2406,7 @@ class Contact continue; } - Worker::add(PRIORITY_HIGH, 'MergeContact', $first, $duplicate['id'], $uid); + Worker::add(Worker::PRIORITY_HIGH, 'MergeContact', $first, $duplicate['id'], $uid); } DBA::close($duplicates); Logger::info('Duplicates handled', ['uid' => $uid, 'nurl' => $nurl, 'callstack' => System::callstack(20)]); @@ -2608,7 +2608,7 @@ class Contact if ($ret['network'] == Protocol::ACTIVITYPUB) { $apcontact = APContact::getByURL($ret['url'], false); if (!empty($apcontact['featured'])) { - Worker::add(PRIORITY_LOW, 'FetchFeaturedPosts', $ret['url']); + Worker::add(Worker::PRIORITY_LOW, 'FetchFeaturedPosts', $ret['url']); } } @@ -2649,7 +2649,7 @@ class Contact self::updateContact($id, $uid, $uriid, $contact['url'], ['failed' => false, 'local-data' => $has_local_data, 'last-update' => $updated, 'next-update' => $success_next_update, 'success_update' => $updated]); if (Contact\Relation::isDiscoverable($ret['url'])) { - Worker::add(PRIORITY_LOW, 'ContactDiscovery', $ret['url']); + Worker::add(Worker::PRIORITY_LOW, 'ContactDiscovery', $ret['url']); } // Update the public contact @@ -2693,7 +2693,7 @@ class Contact self::updateContact($id, $uid, $ret['uri-id'], $ret['url'], $ret); if (Contact\Relation::isDiscoverable($ret['url'])) { - Worker::add(PRIORITY_LOW, 'ContactDiscovery', $ret['url']); + Worker::add(Worker::PRIORITY_LOW, 'ContactDiscovery', $ret['url']); } return true; @@ -2949,13 +2949,13 @@ class Contact // pull feed and consume it, which should subscribe to the hub. if ($contact['network'] == Protocol::OSTATUS) { - Worker::add(PRIORITY_HIGH, 'OnePoll', $contact_id, 'force'); + Worker::add(Worker::PRIORITY_HIGH, 'OnePoll', $contact_id, 'force'); } if ($probed) { self::updateFromProbeArray($contact_id, $ret); } else { - Worker::add(PRIORITY_HIGH, 'UpdateContact', $contact_id); + Worker::add(Worker::PRIORITY_HIGH, 'UpdateContact', $contact_id); } $result['success'] = Protocol::follow($uid, $contact, $protocol); @@ -3407,10 +3407,10 @@ class Contact } $contact = self::getByURL($url, false, ['id', 'network', 'next-update']); if (empty($contact['id']) && Network::isValidHttpUrl($url)) { - Worker::add(PRIORITY_LOW, 'AddContact', 0, $url); + Worker::add(Worker::PRIORITY_LOW, 'AddContact', 0, $url); ++$added; } elseif (!empty($contact['network']) && Probe::isProbable($contact['network']) && ($contact['next-update'] < DateTimeFormat::utcNow())) { - Worker::add(['priority' => PRIORITY_LOW, 'dont_fork' => true], 'UpdateContact', $contact['id']); + Worker::add(['priority' => Worker::PRIORITY_LOW, 'dont_fork' => true], 'UpdateContact', $contact['id']); ++$updated; } else { ++$unchanged; diff --git a/src/Model/FContact.php b/src/Model/FContact.php index ae6c9cb31..fa21906bc 100644 --- a/src/Model/FContact.php +++ b/src/Model/FContact.php @@ -58,7 +58,7 @@ class FContact $update = empty($person['guid']) || empty($person['uri-id']) || ($person['created'] <= DBA::NULL_DATETIME); if (GServer::getNextUpdateDate(true, $person['created'], $person['updated'], false) < DateTimeFormat::utcNow()) { Logger::debug('Start background update', ['handle' => $handle]); - Worker::add(['priority' => PRIORITY_LOW, 'dont_fork' => true], 'UpdateFContact', $handle); + Worker::add(['priority' => Worker::PRIORITY_LOW, 'dont_fork' => true], 'UpdateFContact', $handle); } } } elseif (is_null($update)) { diff --git a/src/Model/GServer.php b/src/Model/GServer.php index ac8a84327..7e4b055d1 100644 --- a/src/Model/GServer.php +++ b/src/Model/GServer.php @@ -102,7 +102,7 @@ class GServer return; } - Worker::add(PRIORITY_LOW, 'UpdateGServer', $url, $only_nodeinfo); + Worker::add(Worker::PRIORITY_LOW, 'UpdateGServer', $url, $only_nodeinfo); } /** @@ -2108,10 +2108,10 @@ class GServer while ($gserver = DBA::fetch($gservers)) { Logger::info('Update peer list', ['server' => $gserver['url'], 'id' => $gserver['id']]); - Worker::add(PRIORITY_LOW, 'UpdateServerPeers', $gserver['url']); + Worker::add(Worker::PRIORITY_LOW, 'UpdateServerPeers', $gserver['url']); Logger::info('Update directory', ['server' => $gserver['url'], 'id' => $gserver['id']]); - Worker::add(PRIORITY_LOW, 'UpdateServerDirectory', $gserver); + Worker::add(Worker::PRIORITY_LOW, 'UpdateServerDirectory', $gserver); $fields = ['last_poco_query' => DateTimeFormat::utcNow()]; self::update($fields, ['nurl' => $gserver['nurl']]); diff --git a/src/Model/Item.php b/src/Model/Item.php index 3270d170b..130a1c463 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -232,7 +232,7 @@ class Item foreach ($notify_items as $notify_item) { $post = Post::selectFirst(['uri-id', 'uid'], ['id' => $notify_item]); - Worker::add(PRIORITY_HIGH, 'Notifier', Delivery::POST, (int)$post['uri-id'], (int)$post['uid']); + Worker::add(Worker::PRIORITY_HIGH, 'Notifier', Delivery::POST, (int)$post['uri-id'], (int)$post['uid']); } return $rows; @@ -246,7 +246,7 @@ class Item * @return void * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ - public static function markForDeletion(array $condition, int $priority = PRIORITY_HIGH) + public static function markForDeletion(array $condition, int $priority = Worker::PRIORITY_HIGH) { $items = Post::select(['id'], $condition); while ($item = Post::fetch($items)) { @@ -277,7 +277,7 @@ class Item } if ($item['uid'] == $uid) { - self::markForDeletionById($item['id'], PRIORITY_HIGH); + self::markForDeletionById($item['id'], Worker::PRIORITY_HIGH); } elseif ($item['uid'] != 0) { Logger::warning('Wrong ownership. Not deleting item', ['id' => $item['id']]); } @@ -293,7 +293,7 @@ class Item * @return boolean success * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ - public static function markForDeletionById(int $item_id, int $priority = PRIORITY_HIGH): bool + public static function markForDeletionById(int $item_id, int $priority = Worker::PRIORITY_HIGH): bool { Logger::info('Mark item for deletion by id', ['id' => $item_id, 'callstack' => System::callstack()]); // locate item to be deleted @@ -816,7 +816,7 @@ class Item { $orig_item = $item; - $priority = PRIORITY_HIGH; + $priority = Worker::PRIORITY_HIGH; // If it is a posting where users should get notifications, then define it as wall posting if ($notify) { @@ -826,7 +826,7 @@ class Item $item['protocol'] = Conversation::PARCEL_DIRECT; $item['direction'] = Conversation::PUSH; - if (is_int($notify) && in_array($notify, PRIORITIES)) { + if (is_int($notify) && in_array($notify, Worker::PRIORITIES)) { $priority = $notify; } } else { diff --git a/src/Model/Mail.php b/src/Model/Mail.php index e494119cb..cdcd2258c 100644 --- a/src/Model/Mail.php +++ b/src/Model/Mail.php @@ -239,7 +239,7 @@ class Mail } if ($post_id) { - Worker::add(PRIORITY_HIGH, "Notifier", Delivery::MAIL, $post_id); + Worker::add(Worker::PRIORITY_HIGH, "Notifier", Delivery::MAIL, $post_id); return intval($post_id); } else { return -3; diff --git a/src/Model/Post/Delayed.php b/src/Model/Post/Delayed.php index 1f15f26b9..3f96af698 100644 --- a/src/Model/Post/Delayed.php +++ b/src/Model/Post/Delayed.php @@ -80,7 +80,7 @@ class Delayed Logger::notice('Adding post for delayed publishing', ['uid' => $item['uid'], 'delayed' => $delayed, 'uri' => $uri]); - $wid = Worker::add(['priority' => PRIORITY_HIGH, 'delayed' => $delayed], 'DelayedPublish', $item, $notify, $taglist, $attachments, $preparation_mode, $uri); + $wid = Worker::add(['priority' => Worker::PRIORITY_HIGH, 'delayed' => $delayed], 'DelayedPublish', $item, $notify, $taglist, $attachments, $preparation_mode, $uri); if (!$wid) { return 0; } diff --git a/src/Model/Profile.php b/src/Model/Profile.php index 094df729e..f6d189a10 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -153,11 +153,11 @@ class Profile if ($owner['net-publish'] || $force) { // Update global directory in background if (Search::getGlobalDirectory()) { - Worker::add(PRIORITY_LOW, 'Directory', $owner['url']); + Worker::add(Worker::PRIORITY_LOW, 'Directory', $owner['url']); } } - Worker::add(PRIORITY_LOW, 'ProfileUpdate', $uid); + Worker::add(Worker::PRIORITY_LOW, 'ProfileUpdate', $uid); } /** diff --git a/src/Model/PushSubscriber.php b/src/Model/PushSubscriber.php index 8aa67eee5..5b6c8813a 100644 --- a/src/Model/PushSubscriber.php +++ b/src/Model/PushSubscriber.php @@ -37,7 +37,7 @@ class PushSubscriber * @return void * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ - public static function publishFeed(int $uid, int $default_priority = PRIORITY_HIGH) + public static function publishFeed(int $uid, int $default_priority = Worker::PRIORITY_HIGH) { $condition = ['push' => 0, 'uid' => $uid]; DBA::update('push_subscriber', ['push' => 1, 'next_try' => DBA::NULL_DATETIME], $condition); @@ -52,7 +52,7 @@ class PushSubscriber * @return void * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ - public static function requeue(int $default_priority = PRIORITY_HIGH) + public static function requeue(int $default_priority = Worker::PRIORITY_HIGH) { // We'll push to each subscriber that has push > 0, // i.e. there has been an update (set in notifier.php). @@ -61,7 +61,7 @@ class PushSubscriber while ($subscriber = DBA::fetch($subscribers)) { // We always handle retries with low priority if ($subscriber['push'] > 1) { - $priority = PRIORITY_LOW; + $priority = Worker::PRIORITY_LOW; } else { $priority = $default_priority; } diff --git a/src/Model/Subscription.php b/src/Model/Subscription.php index 26617f941..2796b37a0 100644 --- a/src/Model/Subscription.php +++ b/src/Model/Subscription.php @@ -152,7 +152,7 @@ class Subscription $subscriptions = DBA::select('subscription', [], ['uid' => $notification->uid, $type => true]); while ($subscription = DBA::fetch($subscriptions)) { Logger::info('Push notification', ['id' => $subscription['id'], 'uid' => $subscription['uid'], 'type' => $type]); - Worker::add(PRIORITY_HIGH, 'PushSubscription', $subscription['id'], $notification->id); + Worker::add(Worker::PRIORITY_HIGH, 'PushSubscription', $subscription['id'], $notification->id); } DBA::close($subscriptions); } diff --git a/src/Model/User.php b/src/Model/User.php index 574830603..5bd84466f 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -1317,7 +1317,7 @@ class User if (DBA::isResult($profile) && $profile['net-publish'] && Search::getGlobalDirectory()) { $url = DI::baseUrl() . '/profile/' . $user['nickname']; - Worker::add(PRIORITY_LOW, "Directory", $url); + Worker::add(Worker::PRIORITY_LOW, "Directory", $url); } $l10n = DI::l10n()->withLang($register['language']); @@ -1567,14 +1567,14 @@ class User // The user and related data will be deleted in Friendica\Worker\ExpireAndRemoveUsers DBA::update('user', ['account_removed' => true, 'account_expires_on' => DateTimeFormat::utc('now + 7 day')], ['uid' => $uid]); - Worker::add(PRIORITY_HIGH, 'Notifier', Delivery::REMOVAL, $uid); + Worker::add(Worker::PRIORITY_HIGH, 'Notifier', Delivery::REMOVAL, $uid); // Send an update to the directory $self = DBA::selectFirst('contact', ['url'], ['uid' => $uid, 'self' => true]); - Worker::add(PRIORITY_LOW, 'Directory', $self['url']); + Worker::add(Worker::PRIORITY_LOW, 'Directory', $self['url']); // Remove the user relevant data - Worker::add(PRIORITY_NEGLIGIBLE, 'RemoveUser', $uid); + Worker::add(Worker::PRIORITY_NEGLIGIBLE, 'RemoveUser', $uid); return true; } diff --git a/src/Module/Admin/Blocklist/Contact.php b/src/Module/Admin/Blocklist/Contact.php index ac1406c7f..35a8a151d 100644 --- a/src/Module/Admin/Blocklist/Contact.php +++ b/src/Module/Admin/Blocklist/Contact.php @@ -59,7 +59,7 @@ class Contact extends BaseAdmin if ($block_purge) { foreach (Model\Contact::selectToArray(['id'], ['nurl' => $contact['nurl']]) as $contact) { - Worker::add(PRIORITY_LOW, 'Contact\RemoveContent', $contact['id']); + Worker::add(Worker::PRIORITY_LOW, 'Contact\RemoveContent', $contact['id']); } } diff --git a/src/Module/Admin/Blocklist/Server/Add.php b/src/Module/Admin/Blocklist/Server/Add.php index a4aaa4b65..f060bcd06 100644 --- a/src/Module/Admin/Blocklist/Server/Add.php +++ b/src/Module/Admin/Blocklist/Server/Add.php @@ -82,7 +82,7 @@ class Add extends BaseAdmin if (!empty($request['purge'])) { $gservers = GServer::listByDomainPattern($pattern); foreach (Contact::selectToArray(['id'], ['gsid' => array_column($gservers, 'id')]) as $contact) { - Worker::add(PRIORITY_LOW, 'Contact\RemoveContent', $contact['id']); + Worker::add(Worker::PRIORITY_LOW, 'Contact\RemoveContent', $contact['id']); } $this->sysmsg->addInfo($this->l10n->tt('%s server scheduled to be purged.', '%s servers scheduled to be purged.', count($gservers))); diff --git a/src/Module/Admin/Site.php b/src/Module/Admin/Site.php index fbebfcb3f..37d8ed040 100644 --- a/src/Module/Admin/Site.php +++ b/src/Module/Admin/Site.php @@ -53,7 +53,7 @@ class Site extends BaseAdmin $a = DI::app(); if (!empty($_POST['republish_directory'])) { - Worker::add(PRIORITY_LOW, 'Directory'); + Worker::add(Worker::PRIORITY_LOW, 'Directory'); return; } @@ -150,7 +150,7 @@ class Site extends BaseAdmin // Has the directory url changed? If yes, then resubmit the existing profiles there if ($global_directory != DI::config()->get('system', 'directory') && ($global_directory != '')) { DI::config()->set('system', 'directory', $global_directory); - Worker::add(PRIORITY_LOW, 'Directory'); + Worker::add(Worker::PRIORITY_LOW, 'Directory'); } if (DI::baseUrl()->getUrlPath() != "") { diff --git a/src/Module/Api/Friendica/Events/Create.php b/src/Module/Api/Friendica/Events/Create.php index 8a8f13b50..8c6ec8f63 100644 --- a/src/Module/Api/Friendica/Events/Create.php +++ b/src/Module/Api/Friendica/Events/Create.php @@ -104,7 +104,7 @@ class Create extends BaseApi $item = ['network' => Protocol::DFRN, 'protocol' => Conversation::PARCEL_DIRECT, 'direction' => Conversation::PUSH]; $item = Event::getItemArrayForId($event_id, $item); if (Item::insert($item)) { - Worker::add(PRIORITY_HIGH, "Notifier", Delivery::POST, (int)$item['uri-id'], $uid); + Worker::add(Worker::PRIORITY_HIGH, "Notifier", Delivery::POST, (int)$item['uri-id'], $uid); } } diff --git a/src/Module/Api/Mastodon/Statuses.php b/src/Module/Api/Mastodon/Statuses.php index 4a8c98697..8cc3e3ddf 100644 --- a/src/Module/Api/Mastodon/Statuses.php +++ b/src/Module/Api/Mastodon/Statuses.php @@ -25,6 +25,7 @@ use Friendica\App\Router; use Friendica\Content\Text\Markdown; use Friendica\Core\Protocol; use Friendica\Core\System; +use Friendica\Core\Worker; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Contact; @@ -204,7 +205,7 @@ class Statuses extends BaseApi if (!empty($request['scheduled_at'])) { $item['guid'] = Item::guid($item, true); $item['uri'] = Item::newURI($item['guid']); - $id = Post\Delayed::add($item['uri'], $item, PRIORITY_HIGH, Post\Delayed::PREPARED, $request['scheduled_at']); + $id = Post\Delayed::add($item['uri'], $item, Worker::PRIORITY_HIGH, Post\Delayed::PREPARED, $request['scheduled_at']); if (empty($id)) { DI::mstdnError()->InternalError(); } diff --git a/src/Module/Contact.php b/src/Module/Contact.php index 9c073b3ef..4f565a871 100644 --- a/src/Module/Contact.php +++ b/src/Module/Contact.php @@ -126,9 +126,9 @@ class Contact extends BaseModule } // pull feed and consume it, which should subscribe to the hub. - Worker::add(PRIORITY_HIGH, 'OnePoll', $contact_id, 'force'); + Worker::add(Worker::PRIORITY_HIGH, 'OnePoll', $contact_id, 'force'); } else { - Worker::add(PRIORITY_HIGH, 'UpdateContact', $contact_id); + Worker::add(Worker::PRIORITY_HIGH, 'UpdateContact', $contact_id); } } diff --git a/src/Module/FriendSuggest.php b/src/Module/FriendSuggest.php index 3cebd72ce..d8a42d8de 100644 --- a/src/Module/FriendSuggest.php +++ b/src/Module/FriendSuggest.php @@ -94,7 +94,7 @@ class FriendSuggest extends BaseModule $note )); - Worker::add(PRIORITY_HIGH, 'Notifier', Delivery::SUGGESTION, $suggest->id); + Worker::add(Worker::PRIORITY_HIGH, 'Notifier', Delivery::SUGGESTION, $suggest->id); info($this->t('Friend suggestion sent.')); } diff --git a/src/Module/Photo.php b/src/Module/Photo.php index 076dc8107..5fdabd33c 100644 --- a/src/Module/Photo.php +++ b/src/Module/Photo.php @@ -338,7 +338,7 @@ class Photo extends BaseModule } if ($update) { Logger::info('Invalid file, contact update initiated', ['cid' => $id, 'url' => $contact['url'], 'avatar' => $url]); - Worker::add(PRIORITY_LOW, 'UpdateContact', $id); + Worker::add(Worker::PRIORITY_LOW, 'UpdateContact', $id); } else { Logger::info('Invalid file', ['cid' => $id, 'url' => $contact['url'], 'avatar' => $url]); } diff --git a/src/Module/Register.php b/src/Module/Register.php index 9c09baef8..95cea1458 100644 --- a/src/Module/Register.php +++ b/src/Module/Register.php @@ -302,7 +302,7 @@ class Register extends BaseModule if ($netpublish && intval(DI::config()->get('config', 'register_policy')) !== self::APPROVE) { $url = $base_url . '/profile/' . $user['nickname']; - Worker::add(PRIORITY_LOW, 'Directory', $url); + Worker::add(Worker::PRIORITY_LOW, 'Directory', $url); } if ($additional_account) { diff --git a/src/Module/Settings/Account.php b/src/Module/Settings/Account.php index 373f1614d..62ad08a4c 100644 --- a/src/Module/Settings/Account.php +++ b/src/Module/Settings/Account.php @@ -375,7 +375,7 @@ class Account extends BaseSettings // "http" or "@" to be present in the string. // All other fields from the row will be ignored if ((strpos($csvRow[0], '@') !== false) || Network::isValidHttpUrl($csvRow[0])) { - Worker::add(PRIORITY_MEDIUM, 'AddContact', local_user(), $csvRow[0]); + Worker::add(Worker::PRIORITY_MEDIUM, 'AddContact', local_user(), $csvRow[0]); } else { Logger::notice('Invalid account', ['url' => $csvRow[0]]); } @@ -394,7 +394,7 @@ class Account extends BaseSettings } if (!empty($request['relocate-submit'])) { - Worker::add(PRIORITY_HIGH, 'Notifier', Delivery::RELOCATION, local_user()); + Worker::add(Worker::PRIORITY_HIGH, 'Notifier', Delivery::RELOCATION, local_user()); info(DI::l10n()->t("Relocate message has been send to your contacts")); DI::baseUrl()->redirect($redirectUrl); } diff --git a/src/Protocol/ActivityPub/Processor.php b/src/Protocol/ActivityPub/Processor.php index 04ea02f80..bb4d61b5a 100644 --- a/src/Protocol/ActivityPub/Processor.php +++ b/src/Protocol/ActivityPub/Processor.php @@ -552,7 +552,7 @@ class Processor Logger::notice('Fetching is done by worker.', ['parent' => $activity['reply-to-id'], 'recursion-depth' => $recursion_depth]); Fetch::add($activity['reply-to-id']); $activity['recursion-depth'] = 0; - $wid = Worker::add(PRIORITY_HIGH, 'FetchMissingActivity', $activity['reply-to-id'], $activity, '', Receiver::COMPLETION_AUTO); + $wid = Worker::add(Worker::PRIORITY_HIGH, 'FetchMissingActivity', $activity['reply-to-id'], $activity, '', Receiver::COMPLETION_AUTO); Fetch::setWorkerId($activity['reply-to-id'], $wid); } else { Logger::debug('Activity will already be fetched via a worker.', ['url' => $activity['reply-to-id']]); @@ -1665,9 +1665,9 @@ class Processor } if (DI::config()->get('system', 'bulk_delivery')) { Post\Delivery::add($post['uri-id'], $uid, $inbox, $post['created'], Delivery::POST, [$cid]); - Worker::add(PRIORITY_HIGH, 'APDelivery', '', 0, $inbox, 0); + Worker::add(Worker::PRIORITY_HIGH, 'APDelivery', '', 0, $inbox, 0); } else { - Worker::add(PRIORITY_HIGH, 'APDelivery', Delivery::POST, $post['id'], $inbox, $uid, [$cid], $post['uri-id']); + Worker::add(Worker::PRIORITY_HIGH, 'APDelivery', Delivery::POST, $post['id'], $inbox, $uid, [$cid], $post['uri-id']); } } } diff --git a/src/Protocol/ActivityPub/Receiver.php b/src/Protocol/ActivityPub/Receiver.php index 30348c7ad..1ecfaf6aa 100644 --- a/src/Protocol/ActivityPub/Receiver.php +++ b/src/Protocol/ActivityPub/Receiver.php @@ -652,7 +652,7 @@ class Receiver // We delay by 5 seconds to allow to accumulate all receivers $delayed = date(DateTimeFormat::MYSQL, time() + 5); Logger::debug('Initiate processing', ['id' => $object_data['entry-id'], 'uri' => $object_data['object_id']]); - $wid = Worker::add(['priority' => PRIORITY_HIGH, 'delayed' => $delayed], 'ProcessQueue', $object_data['entry-id']); + $wid = Worker::add(['priority' => Worker::PRIORITY_HIGH, 'delayed' => $delayed], 'ProcessQueue', $object_data['entry-id']); Queue::setWorkerId($object_data['entry-id'], $wid); } else { Logger::debug('Other queue entries need to be processed first.', ['id' => $object_data['entry-id']]); diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index 66ace1d3d..a2c17f478 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -2020,7 +2020,7 @@ class Diaspora } Logger::info('Deliver participation', ['item' => $comment['id'], 'contact' => $author_contact['cid']]); - if (Worker::add(PRIORITY_HIGH, 'Delivery', Delivery::POST, $comment['uri-id'], $author_contact['cid'], $datarray['uid'])) { + if (Worker::add(Worker::PRIORITY_HIGH, 'Delivery', Delivery::POST, $comment['uri-id'], $author_contact['cid'], $datarray['uid'])) { Post\DeliveryData::incrementQueueCount($comment['uri-id'], 1); } } diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index 7ff86c1db..f1521ac2d 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -30,6 +30,7 @@ use Friendica\Content\Text\HTML; use Friendica\Core\Cache\Enum\Duration; use Friendica\Core\Logger; use Friendica\Core\Protocol; +use Friendica\Core\Worker; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Contact; @@ -630,7 +631,7 @@ class Feed unset($item['parent-uri']); // Set the delivery priority for "remote self" to "medium" - $notify = PRIORITY_MEDIUM; + $notify = Worker::PRIORITY_MEDIUM; } $condition = ['uid' => $item['uid'], 'uri' => $item['uri']]; diff --git a/src/Worker/CheckDeletedContacts.php b/src/Worker/CheckDeletedContacts.php index 4d1c3b637..f612cd2ee 100644 --- a/src/Worker/CheckDeletedContacts.php +++ b/src/Worker/CheckDeletedContacts.php @@ -34,7 +34,7 @@ class CheckDeletedContacts { $contacts = DBA::select('contact', ['id'], ['deleted' => true]); while ($contact = DBA::fetch($contacts)) { - Worker::add(PRIORITY_MEDIUM, 'Contact\Remove', $contact['id']); + Worker::add(Worker::PRIORITY_MEDIUM, 'Contact\Remove', $contact['id']); } DBA::close($contacts); } diff --git a/src/Worker/Cron.php b/src/Worker/Cron.php index 12ea6e60a..21d2f8a20 100644 --- a/src/Worker/Cron.php +++ b/src/Worker/Cron.php @@ -62,25 +62,25 @@ class Cron } // Fork the cron jobs in separate parts to avoid problems when one of them is crashing - Hook::fork(PRIORITY_MEDIUM, 'cron'); + Hook::fork(Worker::PRIORITY_MEDIUM, 'cron'); // Poll contacts - Worker::add(PRIORITY_MEDIUM, 'PollContacts'); + Worker::add(Worker::PRIORITY_MEDIUM, 'PollContacts'); // Update contact information - Worker::add(PRIORITY_LOW, 'UpdateContacts'); + Worker::add(Worker::PRIORITY_LOW, 'UpdateContacts'); // Update server information - Worker::add(PRIORITY_LOW, 'UpdateGServers'); + Worker::add(Worker::PRIORITY_LOW, 'UpdateGServers'); // run the process to update server directories in the background - Worker::add(PRIORITY_LOW, 'UpdateServerDirectories'); + Worker::add(Worker::PRIORITY_LOW, 'UpdateServerDirectories'); // Expire and remove user entries - Worker::add(PRIORITY_MEDIUM, 'ExpireAndRemoveUsers'); + Worker::add(Worker::PRIORITY_MEDIUM, 'ExpireAndRemoveUsers'); // Call possible post update functions - Worker::add(PRIORITY_LOW, 'PostUpdate'); + Worker::add(Worker::PRIORITY_LOW, 'PostUpdate'); // Hourly cron calls if (DI::config()->get('system', 'last_cron_hourly', 0) + 3600 < time()) { @@ -97,11 +97,11 @@ class Cron // Search for new contacts in the directory if (DI::config()->get('system', 'synchronize_directory')) { - Worker::add(PRIORITY_LOW, 'PullDirectory'); + Worker::add(Worker::PRIORITY_LOW, 'PullDirectory'); } // Clear cache entries - Worker::add(PRIORITY_LOW, 'ClearCache'); + Worker::add(Worker::PRIORITY_LOW, 'ClearCache'); DI::config()->set('system', 'last_cron_hourly', time()); } @@ -109,27 +109,27 @@ class Cron // Daily maintenance cron calls if (Worker::isInMaintenanceWindow(true)) { - Worker::add(PRIORITY_LOW, 'UpdateContactBirthdays'); + Worker::add(Worker::PRIORITY_LOW, 'UpdateContactBirthdays'); - Worker::add(PRIORITY_LOW, 'UpdatePhotoAlbums'); + Worker::add(Worker::PRIORITY_LOW, 'UpdatePhotoAlbums'); - Worker::add(PRIORITY_LOW, 'ExpirePosts'); + Worker::add(Worker::PRIORITY_LOW, 'ExpirePosts'); - Worker::add(PRIORITY_LOW, 'ExpireActivities'); + Worker::add(Worker::PRIORITY_LOW, 'ExpireActivities'); - Worker::add(PRIORITY_LOW, 'RemoveUnusedTags'); + Worker::add(Worker::PRIORITY_LOW, 'RemoveUnusedTags'); - Worker::add(PRIORITY_LOW, 'RemoveUnusedContacts'); + Worker::add(Worker::PRIORITY_LOW, 'RemoveUnusedContacts'); - Worker::add(PRIORITY_LOW, 'RemoveUnusedAvatars'); + Worker::add(Worker::PRIORITY_LOW, 'RemoveUnusedAvatars'); // check upstream version? - Worker::add(PRIORITY_LOW, 'CheckVersion'); + Worker::add(Worker::PRIORITY_LOW, 'CheckVersion'); - Worker::add(PRIORITY_LOW, 'CheckDeletedContacts'); + Worker::add(Worker::PRIORITY_LOW, 'CheckDeletedContacts'); if (DI::config()->get('system', 'optimize_tables')) { - Worker::add(PRIORITY_LOW, 'OptimizeTables'); + Worker::add(Worker::PRIORITY_LOW, 'OptimizeTables'); } // Resubscribe to relay servers diff --git a/src/Worker/Directory.php b/src/Worker/Directory.php index bb8041a22..f0ee2ab5d 100644 --- a/src/Worker/Directory.php +++ b/src/Worker/Directory.php @@ -64,7 +64,7 @@ class Directory private static function updateAll() { $users = DBA::select('owner-view', ['url'], ['net-publish' => true, 'account_expired' => false, 'verified' => true]); while ($user = DBA::fetch($users)) { - Worker::add(PRIORITY_LOW, 'Directory', $user['url']); + Worker::add(Worker::PRIORITY_LOW, 'Directory', $user['url']); } DBA::close($users); } diff --git a/src/Worker/ExpirePosts.php b/src/Worker/ExpirePosts.php index bbdfaa42c..ffb40e697 100644 --- a/src/Worker/ExpirePosts.php +++ b/src/Worker/ExpirePosts.php @@ -53,10 +53,10 @@ class ExpirePosts } // Set the expiry for origin posta - Worker::add(PRIORITY_LOW, 'Expire'); + Worker::add(Worker::PRIORITY_LOW, 'Expire'); // update nodeinfo data after everything is cleaned up - Worker::add(PRIORITY_LOW, 'NodeInfo'); + Worker::add(Worker::PRIORITY_LOW, 'NodeInfo'); } /** diff --git a/src/Worker/MoveStorage.php b/src/Worker/MoveStorage.php index 4b24caf5b..30f42e40c 100644 --- a/src/Worker/MoveStorage.php +++ b/src/Worker/MoveStorage.php @@ -37,7 +37,7 @@ class MoveStorage $moved = DI::storageManager()->move($current); if ($moved) { - Worker::add(PRIORITY_LOW, 'MoveStorage'); + Worker::add(Worker::PRIORITY_LOW, 'MoveStorage'); } } } diff --git a/src/Worker/Notifier.php b/src/Worker/Notifier.php index 7d3d3d6b7..45dc4de30 100644 --- a/src/Worker/Notifier.php +++ b/src/Worker/Notifier.php @@ -86,7 +86,7 @@ class Notifier foreach ($inboxes as $inbox => $receivers) { $ap_contacts = array_merge($ap_contacts, $receivers); Logger::info('Delivery via ActivityPub', ['cmd' => $cmd, 'target' => $target_id, 'inbox' => $inbox]); - Worker::add(['priority' => PRIORITY_HIGH, 'created' => $a->getQueueValue('created'), 'dont_fork' => true], + Worker::add(['priority' => Worker::PRIORITY_HIGH, 'created' => $a->getQueueValue('created'), 'dont_fork' => true], 'APDelivery', $cmd, $target_id, $inbox, $uid, $receivers, $post_uriid); } } elseif ($cmd == Delivery::SUGGESTION) { @@ -568,7 +568,7 @@ class Notifier // Situation is that sometimes Friendica servers receive Friendica posts over the Diaspora protocol first. // The conversion in Markdown reduces the formatting, so these posts should arrive after the Friendica posts. // This is only important for high and medium priority tasks and not for Low priority jobs like deletions. - if (($contact['network'] == Protocol::DIASPORA) && in_array($a->getQueueValue('priority'), [PRIORITY_HIGH, PRIORITY_MEDIUM])) { + if (($contact['network'] == Protocol::DIASPORA) && in_array($a->getQueueValue('priority'), [Worker::PRIORITY_HIGH, Worker::PRIORITY_MEDIUM])) { $deliver_options = ['priority' => $a->getQueueValue('priority'), 'dont_fork' => true]; } else { $deliver_options = ['priority' => $a->getQueueValue('priority'), 'created' => $a->getQueueValue('created'), 'dont_fork' => true]; @@ -698,7 +698,7 @@ class Notifier $inboxes = ActivityPub\Transmitter::fetchTargetInboxesforUser($self_user_id); foreach ($inboxes as $inbox => $receivers) { Logger::info('Account removal via ActivityPub', ['uid' => $self_user_id, 'inbox' => $inbox]); - Worker::add(['priority' => PRIORITY_NEGLIGIBLE, 'created' => $created, 'dont_fork' => true], + Worker::add(['priority' => Worker::PRIORITY_NEGLIGIBLE, 'created' => $created, 'dont_fork' => true], 'APDelivery', Delivery::REMOVAL, 0, $inbox, $self_user_id, $receivers); Worker::coolDown(); } @@ -817,7 +817,7 @@ class Notifier if (DI::config()->get('system', 'bulk_delivery')) { $delivery_queue_count++; Post\Delivery::add($target_item['uri-id'], $uid, $inbox, $target_item['created'], $cmd, $receivers); - Worker::add(PRIORITY_HIGH, 'APDelivery', '', 0, $inbox, 0); + Worker::add(Worker::PRIORITY_HIGH, 'APDelivery', '', 0, $inbox, 0); } else { if (Worker::add(['priority' => $priority, 'created' => $created, 'dont_fork' => true], 'APDelivery', $cmd, $target_item['id'], $inbox, $uid, $receivers, $target_item['uri-id'])) { @@ -834,7 +834,7 @@ class Notifier if (DI::config()->get('system', 'bulk_delivery')) { $delivery_queue_count++; Post\Delivery::add($target_item['uri-id'], $uid, $inbox, $target_item['created'], $cmd, []); - Worker::add(PRIORITY_MEDIUM, 'APDelivery', '', 0, $inbox, 0); + Worker::add(Worker::PRIORITY_MEDIUM, 'APDelivery', '', 0, $inbox, 0); } else { if (Worker::add(['priority' => $priority, 'dont_fork' => true], 'APDelivery', $cmd, $target_item['id'], $inbox, $uid, [], $target_item['uri-id'])) { $delivery_queue_count++; diff --git a/src/Worker/PollContacts.php b/src/Worker/PollContacts.php index b4312ef0c..454b5a9ae 100644 --- a/src/Worker/PollContacts.php +++ b/src/Worker/PollContacts.php @@ -71,11 +71,11 @@ class PollContacts } if ((($contact['network'] == Protocol::FEED) && ($contact['priority'] <= 3)) || ($contact['network'] == Protocol::MAIL)) { - $priority = PRIORITY_MEDIUM; + $priority = Worker::PRIORITY_MEDIUM; } elseif ($contact['archive']) { - $priority = PRIORITY_NEGLIGIBLE; + $priority = Worker::PRIORITY_NEGLIGIBLE; } else { - $priority = PRIORITY_LOW; + $priority = Worker::PRIORITY_LOW; } Logger::notice("Polling " . $contact["network"] . " " . $contact["id"] . " " . $contact['priority'] . " " . $contact["nick"] . " " . $contact["name"]); diff --git a/src/Worker/RemoveUser.php b/src/Worker/RemoveUser.php index 6a2d54422..72ead5264 100644 --- a/src/Worker/RemoveUser.php +++ b/src/Worker/RemoveUser.php @@ -21,6 +21,7 @@ namespace Friendica\Worker; +use Friendica\Core\Worker; use Friendica\Database\DBA; use Friendica\Model\Item; use Friendica\Model\Post; @@ -48,7 +49,7 @@ class RemoveUser { do { $items = Post::select(['id'], $condition, ['limit' => 100]); while ($item = Post::fetch($items)) { - Item::markForDeletionById($item['id'], PRIORITY_NEGLIGIBLE); + Item::markForDeletionById($item['id'], Worker::PRIORITY_NEGLIGIBLE); } DBA::close($items); } while (Post::exists($condition)); diff --git a/src/Worker/UpdateContacts.php b/src/Worker/UpdateContacts.php index 7e352a27c..ed4a9932f 100644 --- a/src/Worker/UpdateContacts.php +++ b/src/Worker/UpdateContacts.php @@ -59,7 +59,7 @@ class UpdateContacts $contacts = DBA::select('contact', ['id'], $condition, ['order' => ['next-update'], 'limit' => $limit]); $count = 0; while ($contact = DBA::fetch($contacts)) { - if (Worker::add(['priority' => PRIORITY_LOW, 'dont_fork' => true], "UpdateContact", $contact['id'])) { + if (Worker::add(['priority' => Worker::PRIORITY_LOW, 'dont_fork' => true], "UpdateContact", $contact['id'])) { ++$count; } Worker::coolDown(); diff --git a/src/Worker/UpdateGServers.php b/src/Worker/UpdateGServers.php index 108482eae..25a2db16e 100644 --- a/src/Worker/UpdateGServers.php +++ b/src/Worker/UpdateGServers.php @@ -63,12 +63,12 @@ class UpdateGServers // There are duplicated "url" but not "nurl". So we check both addresses instead of just overwriting them, // since that would mean loosing data. if (!empty($gserver['url'])) { - if (Worker::add(PRIORITY_LOW, 'UpdateGServer', $gserver['url'])) { + if (Worker::add(Worker::PRIORITY_LOW, 'UpdateGServer', $gserver['url'])) { $count++; } } if (!empty($gserver['nurl']) && ($gserver['nurl'] != Strings::normaliseLink($gserver['url']))) { - if (Worker::add(PRIORITY_LOW, 'UpdateGServer', $gserver['nurl'])) { + if (Worker::add(Worker::PRIORITY_LOW, 'UpdateGServer', $gserver['nurl'])) { $count++; } } diff --git a/static/defaults.config.php b/static/defaults.config.php index f20b333dd..647fb73b1 100644 --- a/static/defaults.config.php +++ b/static/defaults.config.php @@ -284,7 +284,7 @@ return [ // expire-notify-priority (integer) // Priority for the expirary notification - 'expire-notify-priority' => PRIORITY_LOW, + 'expire-notify-priority' => Friendica\Core\Worker::PRIORITY_LOW, // fetch_by_worker (Boolean) // Fetch missing posts via a background process diff --git a/update.php b/update.php index fab51993c..9f348efe6 100644 --- a/update.php +++ b/update.php @@ -131,7 +131,7 @@ function update_1309() continue; } - $deliver_options = ['priority' => PRIORITY_MEDIUM, 'dont_fork' => true]; + $deliver_options = ['priority' => Worker::PRIORITY_MEDIUM, 'dont_fork' => true]; Worker::add($deliver_options, 'Delivery', Delivery::POST, $item['id'], $entry['cid']); Logger::info('Added delivery worker', ['item' => $item['id'], 'contact' => $entry['cid']]); DBA::delete('queue', ['id' => $entry['id']]); @@ -152,7 +152,7 @@ function update_1318() DBA::update('profile', ['marital' => 'In a relation'], ['marital' => 'Unavailable']); DBA::update('profile', ['marital' => 'Single'], ['marital' => 'Available']); - Worker::add(PRIORITY_LOW, 'ProfileUpdate'); + Worker::add(Worker::PRIORITY_LOW, 'ProfileUpdate'); return Update::SUCCESS; } From a994b76ebc85e06d755374eac47dea24c13a6caf Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Mon, 17 Oct 2022 08:27:48 +0200 Subject: [PATCH 15/27] DE translation update --- view/lang/de/messages.po | 1281 ++++++++++++++++++-------------------- view/lang/de/strings.php | 103 ++- 2 files changed, 680 insertions(+), 704 deletions(-) diff --git a/view/lang/de/messages.po b/view/lang/de/messages.po index 3e8281fc3..c36cab7a6 100644 --- a/view/lang/de/messages.po +++ b/view/lang/de/messages.po @@ -49,7 +49,7 @@ msgid "" msgstr "" "Project-Id-Version: friendica\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-08-08 12:31-0400\n" +"POT-Creation-Date: 2022-10-16 12:38-0400\n" "PO-Revision-Date: 2011-05-05 10:19+0000\n" "Last-Translator: Tobias Diekershoff , 2016-2022\n" "Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n" @@ -86,8 +86,8 @@ msgstr "Der Zugriff zu diesem Profil wurde eingeschränkt." #: mod/cal.php:243 mod/events.php:374 src/Content/Nav.php:196 #: src/Content/Nav.php:260 src/Module/BaseProfile.php:84 -#: src/Module/BaseProfile.php:95 view/theme/frio/theme.php:234 -#: view/theme/frio/theme.php:238 +#: src/Module/BaseProfile.php:95 view/theme/frio/theme.php:240 +#: view/theme/frio/theme.php:244 msgid "Events" msgstr "Veranstaltungen" @@ -108,17 +108,17 @@ msgid "today" msgstr "Heute" #: mod/cal.php:250 mod/events.php:384 src/Model/Event.php:461 -#: src/Util/Temporal.php:334 +#: src/Util/Temporal.php:338 msgid "month" msgstr "Monat" #: mod/cal.php:251 mod/events.php:385 src/Model/Event.php:462 -#: src/Util/Temporal.php:335 +#: src/Util/Temporal.php:339 msgid "week" msgstr "Woche" #: mod/cal.php:252 mod/events.php:386 src/Model/Event.php:463 -#: src/Util/Temporal.php:336 +#: src/Util/Temporal.php:340 msgid "day" msgstr "Tag" @@ -160,7 +160,7 @@ msgid "The feed for this item is unavailable." msgstr "Der Feed für diesen Beitrag ist nicht verfügbar." #: mod/editpost.php:38 mod/events.php:217 mod/follow.php:56 mod/follow.php:130 -#: mod/item.php:181 mod/item.php:186 mod/item.php:870 mod/message.php:69 +#: mod/item.php:181 mod/item.php:186 mod/item.php:865 mod/message.php:69 #: mod/message.php:111 mod/notes.php:44 mod/ostatus_subscribe.php:33 #: mod/photos.php:160 mod/photos.php:891 mod/repair_ostatus.php:31 #: mod/settings.php:40 mod/settings.php:50 mod/settings.php:156 @@ -179,8 +179,8 @@ msgstr "Der Feed für diesen Beitrag ist nicht verfügbar." #: src/Module/Profile/Schedule.php:39 src/Module/Profile/Schedule.php:56 #: src/Module/Register.php:77 src/Module/Register.php:90 #: src/Module/Register.php:206 src/Module/Register.php:245 -#: src/Module/Search/Directory.php:37 src/Module/Settings/Account.php:49 -#: src/Module/Settings/Account.php:409 src/Module/Settings/Delegation.php:42 +#: src/Module/Search/Directory.php:37 src/Module/Settings/Account.php:50 +#: src/Module/Settings/Account.php:410 src/Module/Settings/Delegation.php:42 #: src/Module/Settings/Delegation.php:70 src/Module/Settings/Display.php:42 #: src/Module/Settings/Display.php:120 #: src/Module/Settings/Profile/Photo/Crop.php:166 @@ -206,7 +206,7 @@ msgid "Save" msgstr "Speichern" #: mod/editpost.php:92 mod/photos.php:1338 src/Content/Conversation.php:338 -#: src/Module/Contact/Poke.php:176 src/Object/Post.php:993 +#: src/Object/Post.php:993 msgid "Loading..." msgstr "lädt..." @@ -253,7 +253,7 @@ msgid "audio link" msgstr "Audio-Link" #: mod/editpost.php:103 src/Content/Conversation.php:352 -#: src/Module/Item/Compose.php:173 +#: src/Module/Item/Compose.php:200 msgid "Set your location" msgstr "Deinen Standort festlegen" @@ -271,8 +271,8 @@ msgstr "Ort löschen" #: mod/editpost.php:107 mod/message.php:200 mod/message.php:358 #: mod/photos.php:1489 mod/wallmessage.php:142 -#: src/Content/Conversation.php:368 src/Content/Conversation.php:713 -#: src/Module/Item/Compose.php:177 src/Object/Post.php:538 +#: src/Content/Conversation.php:368 src/Content/Conversation.php:714 +#: src/Module/Item/Compose.php:204 src/Object/Post.php:538 msgid "Please wait" msgstr "Bitte warten" @@ -289,12 +289,12 @@ msgid "Public post" msgstr "Öffentlicher Beitrag" #: mod/editpost.php:120 src/Content/Conversation.php:357 -#: src/Module/Item/Compose.php:178 +#: src/Module/Item/Compose.php:205 msgid "Set title" msgstr "Titel setzen" #: mod/editpost.php:122 src/Content/Conversation.php:359 -#: src/Module/Item/Compose.php:179 +#: src/Module/Item/Compose.php:206 msgid "Categories (comma-separated list)" msgstr "Kategorien (kommasepariert)" @@ -304,11 +304,11 @@ msgstr "Z.B.: bob@example.com, mary@example.com" #: mod/editpost.php:128 mod/events.php:513 mod/photos.php:1337 #: mod/photos.php:1393 mod/photos.php:1467 src/Content/Conversation.php:383 -#: src/Module/Item/Compose.php:172 src/Object/Post.php:1003 +#: src/Module/Item/Compose.php:199 src/Object/Post.php:1003 msgid "Preview" msgstr "Vorschau" -#: mod/editpost.php:130 mod/fbrowser.php:118 mod/fbrowser.php:145 +#: mod/editpost.php:130 mod/fbrowser.php:119 mod/fbrowser.php:146 #: mod/follow.php:144 mod/photos.php:1004 mod/photos.php:1105 mod/tagrm.php:35 #: mod/tagrm.php:127 mod/unfollow.php:97 src/Content/Conversation.php:386 #: src/Module/Contact/Revoke.php:108 src/Module/RemoteFollow.php:127 @@ -317,37 +317,37 @@ msgid "Cancel" msgstr "Abbrechen" #: mod/editpost.php:134 src/Content/Conversation.php:343 -#: src/Module/Item/Compose.php:163 src/Object/Post.php:994 +#: src/Module/Item/Compose.php:190 src/Object/Post.php:994 msgid "Bold" msgstr "Fett" #: mod/editpost.php:135 src/Content/Conversation.php:344 -#: src/Module/Item/Compose.php:164 src/Object/Post.php:995 +#: src/Module/Item/Compose.php:191 src/Object/Post.php:995 msgid "Italic" msgstr "Kursiv" #: mod/editpost.php:136 src/Content/Conversation.php:345 -#: src/Module/Item/Compose.php:165 src/Object/Post.php:996 +#: src/Module/Item/Compose.php:192 src/Object/Post.php:996 msgid "Underline" msgstr "Unterstrichen" #: mod/editpost.php:137 src/Content/Conversation.php:346 -#: src/Module/Item/Compose.php:166 src/Object/Post.php:997 +#: src/Module/Item/Compose.php:193 src/Object/Post.php:997 msgid "Quote" msgstr "Zitat" #: mod/editpost.php:138 src/Content/Conversation.php:347 -#: src/Module/Item/Compose.php:167 src/Object/Post.php:998 +#: src/Module/Item/Compose.php:194 src/Object/Post.php:998 msgid "Code" msgstr "Code" #: mod/editpost.php:139 src/Content/Conversation.php:349 -#: src/Module/Item/Compose.php:169 src/Object/Post.php:1000 +#: src/Module/Item/Compose.php:196 src/Object/Post.php:1000 msgid "Link" msgstr "Link" #: mod/editpost.php:140 src/Content/Conversation.php:350 -#: src/Module/Item/Compose.php:170 src/Object/Post.php:1001 +#: src/Module/Item/Compose.php:197 src/Object/Post.php:1001 msgid "Link or Media" msgstr "Link oder Mediendatei" @@ -449,16 +449,16 @@ msgstr "Veranstaltung teilen" #: mod/photos.php:921 mod/photos.php:1025 mod/photos.php:1295 #: mod/photos.php:1336 mod/photos.php:1392 mod/photos.php:1466 #: src/Module/Admin/Item/Source.php:60 src/Module/Contact/Advanced.php:132 -#: src/Module/Contact/Poke.php:177 src/Module/Contact/Profile.php:327 +#: src/Module/Contact/Profile.php:327 #: src/Module/Debug/ActivityPubConversion.php:140 #: src/Module/Debug/Babel.php:313 src/Module/Debug/Localtime.php:64 #: src/Module/Debug/Probe.php:54 src/Module/Debug/WebFinger.php:51 #: src/Module/Delegation.php:148 src/Module/FriendSuggest.php:144 #: src/Module/Install.php:252 src/Module/Install.php:294 #: src/Module/Install.php:331 src/Module/Invite.php:178 -#: src/Module/Item/Compose.php:162 src/Module/Profile/Profile.php:247 +#: src/Module/Item/Compose.php:189 src/Module/Profile/Profile.php:247 #: src/Module/Settings/Profile/Index.php:222 src/Object/Post.php:992 -#: view/theme/duepuntozero/config.php:69 view/theme/frio/config.php:160 +#: view/theme/duepuntozero/config.php:69 view/theme/frio/config.php:171 #: view/theme/quattro/config.php:71 view/theme/vier/config.php:119 msgid "Submit" msgstr "Senden" @@ -467,7 +467,7 @@ msgstr "Senden" msgid "Basic" msgstr "Allgemein" -#: mod/events.php:517 src/Module/Admin/Site.php:441 src/Module/Contact.php:474 +#: mod/events.php:517 src/Module/Admin/Site.php:441 src/Module/Contact.php:477 #: src/Module/Profile/Profile.php:249 msgid "Advanced" msgstr "Erweitert" @@ -477,16 +477,16 @@ msgid "Failed to remove event" msgstr "Entfernen der Veranstaltung fehlgeschlagen" #: mod/fbrowser.php:61 src/Content/Nav.php:194 src/Module/BaseProfile.php:64 -#: view/theme/frio/theme.php:232 +#: view/theme/frio/theme.php:238 msgid "Photos" msgstr "Bilder" -#: mod/fbrowser.php:120 mod/fbrowser.php:147 +#: mod/fbrowser.php:121 mod/fbrowser.php:148 #: src/Module/Settings/Profile/Photo/Index.php:129 msgid "Upload" msgstr "Hochladen" -#: mod/fbrowser.php:142 +#: mod/fbrowser.php:143 msgid "Files" msgstr "Dateien" @@ -510,8 +510,8 @@ msgstr "Diaspora-Unterstützung ist nicht aktiviert. Der Kontakt kann nicht zuge msgid "OStatus support is disabled. Contact can't be added." msgstr "OStatus-Unterstützung ist nicht aktiviert. Der Kontakt kann nicht zugefügt werden." -#: mod/follow.php:138 src/Content/Item.php:459 src/Content/Widget.php:80 -#: src/Model/Contact.php:1114 src/Model/Contact.php:1126 +#: mod/follow.php:138 src/Content/Item.php:400 src/Content/Widget.php:80 +#: src/Model/Contact.php:1169 src/Model/Contact.php:1180 #: view/theme/vier/theme.php:181 msgid "Connect/Follow" msgstr "Verbinden/Folgen" @@ -548,7 +548,7 @@ msgid "Add a personal note:" msgstr "Eine persönliche Notiz beifügen:" #: mod/follow.php:163 mod/unfollow.php:109 src/Module/BaseProfile.php:59 -#: src/Module/Contact.php:444 +#: src/Module/Contact.php:447 msgid "Status Messages and Posts" msgstr "Statusnachrichten und Beiträge" @@ -564,19 +564,19 @@ msgstr "Konnte den Originalbeitrag nicht finden." msgid "Empty post discarded." msgstr "Leerer Beitrag wurde verworfen." -#: mod/item.php:682 +#: mod/item.php:677 msgid "Post updated." msgstr "Beitrag aktualisiert." -#: mod/item.php:692 mod/item.php:697 +#: mod/item.php:687 mod/item.php:692 msgid "Item wasn't stored." msgstr "Eintrag wurde nicht gespeichert" -#: mod/item.php:708 +#: mod/item.php:703 msgid "Item couldn't be fetched." msgstr "Eintrag konnte nicht geholt werden." -#: mod/item.php:848 src/Module/Admin/Themes/Details.php:39 +#: mod/item.php:843 src/Module/Admin/Themes/Details.php:39 #: src/Module/Admin/Themes/Index.php:59 src/Module/Debug/ItemBody.php:42 #: src/Module/Debug/ItemBody.php:57 msgid "Item not found." @@ -754,7 +754,7 @@ msgstr "Konnte Nachrichten nicht abrufen." msgid "Discard" msgstr "Verwerfen" -#: mod/message.php:133 src/Content/Nav.php:285 view/theme/frio/theme.php:239 +#: mod/message.php:133 src/Content/Nav.php:285 view/theme/frio/theme.php:245 msgid "Messages" msgstr "Nachrichten" @@ -1108,7 +1108,7 @@ msgid "Rotate CCW (left)" msgstr "Drehen EUS (links)" #: mod/photos.php:1333 mod/photos.php:1389 mod/photos.php:1463 -#: src/Module/Contact.php:544 src/Module/Item/Compose.php:160 +#: src/Module/Contact.php:547 src/Module/Item/Compose.php:188 #: src/Object/Post.php:989 msgid "This is you" msgstr "Das bist du" @@ -1118,12 +1118,12 @@ msgstr "Das bist du" msgid "Comment" msgstr "Kommentar" -#: mod/photos.php:1424 src/Content/Conversation.php:629 +#: mod/photos.php:1424 src/Content/Conversation.php:630 #: src/Object/Post.php:256 msgid "Select" msgstr "Auswählen" -#: mod/photos.php:1425 mod/settings.php:350 src/Content/Conversation.php:630 +#: mod/photos.php:1425 mod/settings.php:350 src/Content/Conversation.php:631 #: src/Module/Admin/Users/Active.php:139 #: src/Module/Admin/Users/Blocked.php:140 src/Module/Admin/Users/Index.php:153 msgid "Delete" @@ -1170,7 +1170,7 @@ msgstr "Ungültige Anfrage." msgid "Contact not found." msgstr "Kontakt nicht gefunden." -#: mod/removeme.php:65 src/Navigation/Notifications/Repository/Notify.php:483 +#: mod/removeme.php:65 src/Navigation/Notifications/Repository/Notify.php:467 msgid "[Friendica System Notify]" msgstr "[Friendica-Systembenachrichtigung]" @@ -1247,8 +1247,8 @@ msgstr "Autorisierung entziehen" #: mod/settings.php:352 src/Module/Admin/Addons/Index.php:69 #: src/Module/Admin/Features.php:87 src/Module/Admin/Logs/Settings.php:81 #: src/Module/Admin/Site.php:436 src/Module/Admin/Themes/Index.php:113 -#: src/Module/Admin/Tos.php:83 src/Module/Settings/Account.php:562 -#: src/Module/Settings/Delegation.php:170 src/Module/Settings/Display.php:193 +#: src/Module/Admin/Tos.php:83 src/Module/Settings/Account.php:563 +#: src/Module/Settings/Delegation.php:170 src/Module/Settings/Display.php:201 msgid "Save Settings" msgstr "Einstellungen speichern" @@ -1452,15 +1452,15 @@ msgstr "Keine Vorschläge verfügbar. Falls der Server frisch aufgesetzt wurde, msgid "Friend Suggestions" msgstr "Kontaktvorschläge" -#: mod/tagger.php:78 src/Content/Item.php:354 src/Model/Item.php:2769 +#: mod/tagger.php:78 src/Content/Item.php:300 src/Model/Item.php:2855 msgid "photo" msgstr "Foto" -#: mod/tagger.php:78 src/Content/Item.php:348 src/Content/Item.php:358 +#: mod/tagger.php:78 src/Content/Item.php:294 src/Content/Item.php:304 msgid "status" msgstr "Status" -#: mod/tagger.php:111 src/Content/Item.php:368 +#: mod/tagger.php:111 src/Content/Item.php:314 #, php-format msgid "%1$s tagged %2$s's %3$s with %4$s" msgstr "%1$s hat %2$ss %3$s mit %4$s getaggt" @@ -1598,17 +1598,17 @@ msgstr "Es wurde kein Konfigurationswert für das systemweite Theme gesetzt." msgid "Apologies but the website is unavailable at the moment." msgstr "Entschuldigung, aber die Webseite ist derzeit nicht erreichbar." -#: src/App/Page.php:276 +#: src/App/Page.php:281 msgid "Delete this item?" msgstr "Diesen Beitrag löschen?" -#: src/App/Page.php:277 +#: src/App/Page.php:282 msgid "" "Block this author? They won't be able to follow you nor see your public " "posts, and you won't be able to see their posts and their notifications." msgstr "Soll dieser Autor geblockt werden? Sie werden nicht in der Lage sein, dir zu folgen oder deine öffentlichen Beiträge zu sehen. Außerdem wirst du nicht in der Lage sein ihre Beiträge und Benachrichtigungen zu lesen." -#: src/App/Page.php:347 +#: src/App/Page.php:352 msgid "toggle mobile" msgstr "mobile Ansicht umschalten" @@ -1636,18 +1636,18 @@ msgid "All contacts" msgstr "Alle Kontakte" #: src/BaseModule.php:424 src/Content/Widget.php:235 src/Core/ACL.php:194 -#: src/Module/Contact.php:367 src/Module/PermissionTooltip.php:122 +#: src/Module/Contact.php:370 src/Module/PermissionTooltip.php:122 #: src/Module/PermissionTooltip.php:144 msgid "Followers" msgstr "Folgende" #: src/BaseModule.php:429 src/Content/Widget.php:236 -#: src/Module/Contact.php:368 +#: src/Module/Contact.php:371 msgid "Following" msgstr "Gefolgte" #: src/BaseModule.php:434 src/Content/Widget.php:237 -#: src/Module/Contact.php:369 +#: src/Module/Contact.php:372 msgid "Mutual friends" msgstr "Beidseitige Freundschaft" @@ -1687,63 +1687,63 @@ msgstr "Für die URL (%s) konnte kein Kontakt gefunden werden" msgid "The contact has been blocked from the node" msgstr "Der Kontakt wurde von diesem Knoten geblockt" -#: src/Console/MergeContacts.php:74 +#: src/Console/MergeContacts.php:75 #, php-format msgid "%d %s, %d duplicates." msgstr "%d %s, Duplikat %d." -#: src/Console/MergeContacts.php:77 +#: src/Console/MergeContacts.php:78 #, php-format msgid "uri-id is empty for contact %s." msgstr "URI-ID ist leer für den Kontakt %s." -#: src/Console/MergeContacts.php:90 +#: src/Console/MergeContacts.php:91 #, php-format msgid "No valid first contact found for uri-id %d." msgstr "Kein gültiger erster Kontakt für die url-id %d gefunden." -#: src/Console/MergeContacts.php:101 +#: src/Console/MergeContacts.php:102 #, php-format msgid "Wrong duplicate found for uri-id %d in %d (url: %s != %s)." msgstr "Falsches Dublikat für die URI-ID %d in %d gefunden (URI: %s != %s)." -#: src/Console/MergeContacts.php:105 +#: src/Console/MergeContacts.php:106 #, php-format msgid "Wrong duplicate found for uri-id %d in %d (nurl: %s != %s)." msgstr "Falsches Dublikat für die URI-ID %d in %d (nurl: %s != %s)." -#: src/Console/MergeContacts.php:141 +#: src/Console/MergeContacts.php:142 #, php-format msgid "Deletion of id %d failed" msgstr "Löschung der ID %d fehlgeschlagen" -#: src/Console/MergeContacts.php:143 +#: src/Console/MergeContacts.php:144 #, php-format msgid "Deletion of id %d was successful" msgstr "Löschug der ID %d war erfolgreich" -#: src/Console/MergeContacts.php:149 +#: src/Console/MergeContacts.php:150 #, php-format msgid "Updating \"%s\" in \"%s\" from %d to %d" msgstr "Aktualisieren \"%s\" nach \"%s\" von %d nach %d" -#: src/Console/MergeContacts.php:151 +#: src/Console/MergeContacts.php:152 msgid " - found" msgstr "- gefunden" -#: src/Console/MergeContacts.php:158 +#: src/Console/MergeContacts.php:159 msgid " - failed" msgstr "- fehlgeschlagen" -#: src/Console/MergeContacts.php:160 +#: src/Console/MergeContacts.php:161 msgid " - success" msgstr "- Erfolg" -#: src/Console/MergeContacts.php:164 +#: src/Console/MergeContacts.php:165 msgid " - deleted" msgstr "- gelöscht" -#: src/Console/MergeContacts.php:167 +#: src/Console/MergeContacts.php:168 msgid " - done" msgstr "- erledigt" @@ -1806,12 +1806,12 @@ msgid "Enter new password: " msgstr "Neues Passwort eingeben:" #: src/Console/User.php:210 src/Module/Security/PasswordTooLong.php:65 -#: src/Module/Settings/Account.php:74 +#: src/Module/Settings/Account.php:75 msgid "Password update failed. Please try again." msgstr "Aktualisierung des Passworts gescheitert, bitte versuche es noch einmal." #: src/Console/User.php:213 src/Module/Security/PasswordTooLong.php:68 -#: src/Module/Settings/Account.php:77 +#: src/Module/Settings/Account.php:78 msgid "Password changed." msgstr "Passwort geändert." @@ -1990,7 +1990,7 @@ msgid "%s attends maybe." msgstr "%s nimmt eventuell teil." #: src/Content/Conversation.php:222 src/Content/Conversation.php:260 -#: src/Content/Conversation.php:873 +#: src/Content/Conversation.php:874 #, php-format msgid "%s reshared this." msgstr "%s hat dies geteilt" @@ -2063,7 +2063,7 @@ msgstr "%2$d Personen haben dies geteilt" msgid "Visible to everybody" msgstr "Für jedermann sichtbar" -#: src/Content/Conversation.php:308 src/Module/Item/Compose.php:171 +#: src/Content/Conversation.php:308 src/Module/Item/Compose.php:198 #: src/Object/Post.php:1002 msgid "Please enter a image/video/audio/webpage URL:" msgstr "Bitte gib eine Bild/Video/Audio/Webseiten-URL ein:" @@ -2084,7 +2084,7 @@ msgstr "Wo hältst du dich jetzt gerade auf?" msgid "Delete item(s)?" msgstr "Einträge löschen?" -#: src/Content/Conversation.php:324 src/Module/Item/Compose.php:143 +#: src/Content/Conversation.php:324 src/Module/Item/Compose.php:175 msgid "Created at" msgstr "Erstellt am" @@ -2096,7 +2096,7 @@ msgstr "Neuer Beitrag" msgid "Share" msgstr "Teilen" -#: src/Content/Conversation.php:348 src/Module/Item/Compose.php:168 +#: src/Content/Conversation.php:348 src/Module/Item/Compose.php:195 #: src/Object/Post.php:999 msgid "Image" msgstr "Bild" @@ -2105,119 +2105,119 @@ msgstr "Bild" msgid "Video" msgstr "Video" -#: src/Content/Conversation.php:364 src/Module/Item/Compose.php:184 +#: src/Content/Conversation.php:364 src/Module/Item/Compose.php:222 msgid "Scheduled at" msgstr "Geplant für" -#: src/Content/Conversation.php:657 src/Object/Post.php:244 +#: src/Content/Conversation.php:658 src/Object/Post.php:244 msgid "Pinned item" msgstr "Angehefteter Beitrag" -#: src/Content/Conversation.php:673 src/Object/Post.php:486 +#: src/Content/Conversation.php:674 src/Object/Post.php:486 #: src/Object/Post.php:487 #, php-format msgid "View %s's profile @ %s" msgstr "Das Profil von %s auf %s betrachten." -#: src/Content/Conversation.php:686 src/Object/Post.php:474 +#: src/Content/Conversation.php:687 src/Object/Post.php:474 msgid "Categories:" msgstr "Kategorien:" -#: src/Content/Conversation.php:687 src/Object/Post.php:475 +#: src/Content/Conversation.php:688 src/Object/Post.php:475 msgid "Filed under:" msgstr "Abgelegt unter:" -#: src/Content/Conversation.php:695 src/Object/Post.php:500 +#: src/Content/Conversation.php:696 src/Object/Post.php:500 #, php-format msgid "%s from %s" msgstr "%s von %s" -#: src/Content/Conversation.php:711 +#: src/Content/Conversation.php:712 msgid "View in context" msgstr "Im Zusammenhang betrachten" -#: src/Content/Conversation.php:776 +#: src/Content/Conversation.php:777 msgid "remove" msgstr "löschen" -#: src/Content/Conversation.php:780 +#: src/Content/Conversation.php:781 msgid "Delete Selected Items" msgstr "Lösche die markierten Beiträge" -#: src/Content/Conversation.php:845 src/Content/Conversation.php:848 -#: src/Content/Conversation.php:851 src/Content/Conversation.php:854 +#: src/Content/Conversation.php:846 src/Content/Conversation.php:849 +#: src/Content/Conversation.php:852 src/Content/Conversation.php:855 #, php-format msgid "You had been addressed (%s)." msgstr "Du wurdest angeschrieben (%s)." -#: src/Content/Conversation.php:857 +#: src/Content/Conversation.php:858 #, php-format msgid "You are following %s." msgstr "Du folgst %s." -#: src/Content/Conversation.php:860 +#: src/Content/Conversation.php:861 msgid "You subscribed to one or more tags in this post." msgstr "Du folgst einem oder mehreren Hashtags dieses Beitrags." -#: src/Content/Conversation.php:875 +#: src/Content/Conversation.php:876 msgid "Reshared" msgstr "Geteilt" -#: src/Content/Conversation.php:875 +#: src/Content/Conversation.php:876 #, php-format msgid "Reshared by %s <%s>" msgstr "Geteilt von %s <%s>" -#: src/Content/Conversation.php:878 +#: src/Content/Conversation.php:879 #, php-format msgid "%s is participating in this thread." msgstr "%s ist an der Unterhaltung beteiligt." -#: src/Content/Conversation.php:881 +#: src/Content/Conversation.php:882 msgid "Stored for general reasons" -msgstr "" +msgstr "Aus allgemeinen Gründen aufbewahrt" -#: src/Content/Conversation.php:884 +#: src/Content/Conversation.php:885 msgid "Global post" msgstr "Globaler Beitrag" -#: src/Content/Conversation.php:887 +#: src/Content/Conversation.php:888 msgid "Sent via an relay server" msgstr "Über einen Relay-Server gesendet" -#: src/Content/Conversation.php:887 +#: src/Content/Conversation.php:888 #, php-format msgid "Sent via the relay server %s <%s>" msgstr "Über den Relay-Server %s <%s> gesendet" -#: src/Content/Conversation.php:890 +#: src/Content/Conversation.php:891 msgid "Fetched" msgstr "Abgerufen" -#: src/Content/Conversation.php:890 +#: src/Content/Conversation.php:891 #, php-format msgid "Fetched because of %s <%s>" msgstr "Wegen %s <%s> abgerufen" -#: src/Content/Conversation.php:893 +#: src/Content/Conversation.php:894 msgid "Stored because of a child post to complete this thread." -msgstr "" +msgstr "Gespeichert wegen eines untergeordneten Beitrags zur Vervollständigung dieses Themas." -#: src/Content/Conversation.php:896 +#: src/Content/Conversation.php:897 msgid "Local delivery" msgstr "Lokale Zustellung" -#: src/Content/Conversation.php:899 +#: src/Content/Conversation.php:900 msgid "Stored because of your activity (like, comment, star, ...)" -msgstr "" +msgstr "Gespeichert aufgrund Ihrer Aktivität (Like, Kommentar, Stern, ...)" -#: src/Content/Conversation.php:902 +#: src/Content/Conversation.php:903 msgid "Distributed" -msgstr "" +msgstr "Verteilt" -#: src/Content/Conversation.php:905 +#: src/Content/Conversation.php:906 msgid "Pushed to us" -msgstr "" +msgstr "Zu uns gepusht" #: src/Content/Feature.php:96 msgid "General Features" @@ -2335,56 +2335,51 @@ msgstr "weniger anzeigen" msgid "show more" msgstr "mehr anzeigen" -#: src/Content/Item.php:306 -#, php-format -msgid "%1$s poked %2$s" -msgstr "%1$s stupste %2$s" - -#: src/Content/Item.php:345 src/Model/Item.php:2767 +#: src/Content/Item.php:291 src/Model/Item.php:2853 msgid "event" msgstr "Veranstaltung" -#: src/Content/Item.php:438 view/theme/frio/theme.php:260 +#: src/Content/Item.php:383 view/theme/frio/theme.php:266 msgid "Follow Thread" msgstr "Folge der Unterhaltung" -#: src/Content/Item.php:439 src/Model/Contact.php:1119 +#: src/Content/Item.php:384 src/Model/Contact.php:1174 msgid "View Status" msgstr "Status anschauen" -#: src/Content/Item.php:440 src/Content/Item.php:462 -#: src/Model/Contact.php:1053 src/Model/Contact.php:1111 -#: src/Model/Contact.php:1120 src/Module/Directory.php:158 +#: src/Content/Item.php:385 src/Content/Item.php:403 +#: src/Model/Contact.php:1112 src/Model/Contact.php:1166 +#: src/Model/Contact.php:1175 src/Module/Directory.php:158 #: src/Module/Settings/Profile/Index.php:225 msgid "View Profile" msgstr "Profil anschauen" -#: src/Content/Item.php:441 src/Model/Contact.php:1121 +#: src/Content/Item.php:386 src/Model/Contact.php:1176 msgid "View Photos" msgstr "Bilder anschauen" -#: src/Content/Item.php:442 src/Model/Contact.php:1112 -#: src/Model/Contact.php:1122 +#: src/Content/Item.php:387 src/Model/Contact.php:1167 +#: src/Model/Contact.php:1177 msgid "Network Posts" msgstr "Netzwerkbeiträge" -#: src/Content/Item.php:443 src/Model/Contact.php:1113 -#: src/Model/Contact.php:1123 +#: src/Content/Item.php:388 src/Model/Contact.php:1168 +#: src/Model/Contact.php:1178 msgid "View Contact" msgstr "Kontakt anzeigen" -#: src/Content/Item.php:444 src/Model/Contact.php:1124 +#: src/Content/Item.php:389 src/Model/Contact.php:1179 msgid "Send PM" msgstr "Private Nachricht senden" -#: src/Content/Item.php:445 src/Module/Admin/Blocklist/Contact.php:100 +#: src/Content/Item.php:390 src/Module/Admin/Blocklist/Contact.php:100 #: src/Module/Admin/Users/Active.php:140 src/Module/Admin/Users/Index.php:154 -#: src/Module/Contact.php:398 src/Module/Contact/Profile.php:348 +#: src/Module/Contact.php:401 src/Module/Contact/Profile.php:348 #: src/Module/Contact/Profile.php:449 msgid "Block" msgstr "Sperren" -#: src/Content/Item.php:446 src/Module/Contact.php:399 +#: src/Content/Item.php:391 src/Module/Contact.php:402 #: src/Module/Contact/Profile.php:349 src/Module/Contact/Profile.php:457 #: src/Module/Notifications/Introductions.php:132 #: src/Module/Notifications/Introductions.php:204 @@ -2392,14 +2387,10 @@ msgstr "Sperren" msgid "Ignore" msgstr "Ignorieren" -#: src/Content/Item.php:450 src/Object/Post.php:455 +#: src/Content/Item.php:395 src/Object/Post.php:455 msgid "Languages" msgstr "Sprachen" -#: src/Content/Item.php:454 src/Model/Contact.php:1125 -msgid "Poke" -msgstr "Anstupsen" - #: src/Content/Nav.php:90 msgid "Nothing new here" msgstr "Keine Neuigkeiten" @@ -2434,42 +2425,42 @@ msgid "Sign in" msgstr "Anmelden" #: src/Content/Nav.php:192 src/Module/BaseProfile.php:56 -#: src/Module/Contact.php:433 src/Module/Contact/Profile.php:380 -#: src/Module/Settings/TwoFactor/Index.php:120 view/theme/frio/theme.php:230 +#: src/Module/Contact.php:436 src/Module/Contact/Profile.php:380 +#: src/Module/Settings/TwoFactor/Index.php:120 view/theme/frio/theme.php:236 msgid "Status" msgstr "Status" #: src/Content/Nav.php:192 src/Content/Nav.php:275 -#: view/theme/frio/theme.php:230 +#: view/theme/frio/theme.php:236 msgid "Your posts and conversations" msgstr "Deine Beiträge und Unterhaltungen" #: src/Content/Nav.php:193 src/Module/BaseProfile.php:48 -#: src/Module/BaseSettings.php:55 src/Module/Contact.php:457 +#: src/Module/BaseSettings.php:55 src/Module/Contact.php:460 #: src/Module/Contact/Profile.php:382 src/Module/Profile/Profile.php:241 -#: src/Module/Welcome.php:57 view/theme/frio/theme.php:231 +#: src/Module/Welcome.php:57 view/theme/frio/theme.php:237 msgid "Profile" msgstr "Profil" -#: src/Content/Nav.php:193 view/theme/frio/theme.php:231 +#: src/Content/Nav.php:193 view/theme/frio/theme.php:237 msgid "Your profile page" msgstr "Deine Profilseite" -#: src/Content/Nav.php:194 view/theme/frio/theme.php:232 +#: src/Content/Nav.php:194 view/theme/frio/theme.php:238 msgid "Your photos" msgstr "Deine Fotos" #: src/Content/Nav.php:195 src/Module/BaseProfile.php:72 -#: src/Module/BaseProfile.php:75 src/Module/Contact.php:449 -#: view/theme/frio/theme.php:233 +#: src/Module/BaseProfile.php:75 src/Module/Contact.php:452 +#: view/theme/frio/theme.php:239 msgid "Media" msgstr "Medien" -#: src/Content/Nav.php:195 view/theme/frio/theme.php:233 +#: src/Content/Nav.php:195 view/theme/frio/theme.php:239 msgid "Your postings with media" msgstr "Deine Beiträge die Medien beinhalten" -#: src/Content/Nav.php:196 view/theme/frio/theme.php:234 +#: src/Content/Nav.php:196 view/theme/frio/theme.php:240 msgid "Your events" msgstr "Deine Ereignisse" @@ -2534,8 +2525,8 @@ msgstr "Tags" #: src/Content/Nav.php:237 src/Content/Nav.php:296 #: src/Content/Text/HTML.php:899 src/Module/BaseProfile.php:125 -#: src/Module/BaseProfile.php:128 src/Module/Contact.php:370 -#: src/Module/Contact.php:464 view/theme/frio/theme.php:241 +#: src/Module/BaseProfile.php:128 src/Module/Contact.php:373 +#: src/Module/Contact.php:467 view/theme/frio/theme.php:247 msgid "Contacts" msgstr "Kontakte" @@ -2548,7 +2539,7 @@ msgid "Conversations on this and other servers" msgstr "Unterhaltungen auf diesem und anderen Servern" #: src/Content/Nav.php:260 src/Module/BaseProfile.php:87 -#: src/Module/BaseProfile.php:98 view/theme/frio/theme.php:238 +#: src/Module/BaseProfile.php:98 view/theme/frio/theme.php:244 msgid "Events and Calendar" msgstr "Ereignisse und Kalender" @@ -2578,11 +2569,11 @@ msgstr "Nutzungsbedingungen" msgid "Terms of Service of this Friendica instance" msgstr "Die Nutzungsbedingungen dieser Friendica-Instanz" -#: src/Content/Nav.php:273 view/theme/frio/theme.php:237 +#: src/Content/Nav.php:273 view/theme/frio/theme.php:243 msgid "Network" msgstr "Netzwerk" -#: src/Content/Nav.php:273 view/theme/frio/theme.php:237 +#: src/Content/Nav.php:273 view/theme/frio/theme.php:243 msgid "Conversations from your friends" msgstr "Unterhaltungen Deiner Kontakte" @@ -2607,7 +2598,7 @@ msgstr "Alle Benachrichtigungen anzeigen" msgid "Mark all system notifications as seen" msgstr "Markiere alle Systembenachrichtigungen als gelesen" -#: src/Content/Nav.php:285 view/theme/frio/theme.php:239 +#: src/Content/Nav.php:285 view/theme/frio/theme.php:245 msgid "Private mail" msgstr "Private E-Mail" @@ -2629,15 +2620,15 @@ msgstr "Andere Seiten verwalten" #: src/Content/Nav.php:294 src/Module/Admin/Addons/Details.php:114 #: src/Module/Admin/Themes/Details.php:93 src/Module/BaseSettings.php:122 -#: src/Module/Welcome.php:52 view/theme/frio/theme.php:240 +#: src/Module/Welcome.php:52 view/theme/frio/theme.php:246 msgid "Settings" msgstr "Einstellungen" -#: src/Content/Nav.php:294 view/theme/frio/theme.php:240 +#: src/Content/Nav.php:294 view/theme/frio/theme.php:246 msgid "Account settings" msgstr "Kontoeinstellungen" -#: src/Content/Nav.php:296 view/theme/frio/theme.php:241 +#: src/Content/Nav.php:296 view/theme/frio/theme.php:247 msgid "Manage/edit friends and contacts" msgstr "Freunde und Kontakte verwalten/bearbeiten" @@ -2681,38 +2672,38 @@ msgstr "nächste" msgid "last" msgstr "letzte" -#: src/Content/Text/BBCode.php:998 src/Content/Text/BBCode.php:1833 -#: src/Content/Text/BBCode.php:1834 +#: src/Content/Text/BBCode.php:1002 src/Content/Text/BBCode.php:1883 +#: src/Content/Text/BBCode.php:1884 msgid "Image/photo" msgstr "Bild/Foto" -#: src/Content/Text/BBCode.php:1188 +#: src/Content/Text/BBCode.php:1238 #, php-format msgid "%2$s %3$s" msgstr "%2$s%3$s" -#: src/Content/Text/BBCode.php:1213 src/Model/Item.php:3343 -#: src/Model/Item.php:3349 src/Model/Item.php:3350 +#: src/Content/Text/BBCode.php:1263 src/Model/Item.php:3429 +#: src/Model/Item.php:3435 src/Model/Item.php:3436 msgid "Link to source" msgstr "Link zum Originalbeitrag" -#: src/Content/Text/BBCode.php:1751 src/Content/Text/HTML.php:940 +#: src/Content/Text/BBCode.php:1801 src/Content/Text/HTML.php:940 msgid "Click to open/close" msgstr "Zum Öffnen/Schließen klicken" -#: src/Content/Text/BBCode.php:1782 +#: src/Content/Text/BBCode.php:1832 msgid "$1 wrote:" msgstr "$1 hat geschrieben:" -#: src/Content/Text/BBCode.php:1838 src/Content/Text/BBCode.php:1839 +#: src/Content/Text/BBCode.php:1888 src/Content/Text/BBCode.php:1889 msgid "Encrypted content" msgstr "Verschlüsselter Inhalt" -#: src/Content/Text/BBCode.php:2057 +#: src/Content/Text/BBCode.php:2109 msgid "Invalid source protocol" msgstr "Ungültiges Quell-Protokoll" -#: src/Content/Text/BBCode.php:2072 +#: src/Content/Text/BBCode.php:2124 msgid "Invalid link protocol" msgstr "Ungültiges Link-Protokoll" @@ -2764,7 +2755,7 @@ msgstr "Name oder Interessen eingeben" msgid "Examples: Robert Morgenstein, Fishing" msgstr "Beispiel: Robert Morgenstein, Angeln" -#: src/Content/Widget.php:82 src/Module/Contact.php:391 +#: src/Content/Widget.php:82 src/Module/Contact.php:394 #: src/Module/Directory.php:97 view/theme/vier/theme.php:183 msgid "Find" msgstr "Finde" @@ -2791,7 +2782,7 @@ msgid "Local Directory" msgstr "Lokales Verzeichnis" #: src/Content/Widget.php:211 src/Model/Group.php:587 -#: src/Module/Contact.php:354 src/Module/Welcome.php:76 +#: src/Module/Contact.php:357 src/Module/Welcome.php:76 msgid "Groups" msgstr "Gruppen" @@ -2803,7 +2794,7 @@ msgstr "Jeder" msgid "Relationships" msgstr "Beziehungen" -#: src/Content/Widget.php:244 src/Module/Contact.php:306 +#: src/Content/Widget.php:244 src/Module/Contact.php:309 #: src/Module/Group.php:293 msgid "All Contacts" msgstr "Alle Kontakte" @@ -2847,11 +2838,11 @@ msgstr "Personen" msgid "Organisations" msgstr "Organisationen" -#: src/Content/Widget.php:523 src/Model/Contact.php:1547 +#: src/Content/Widget.php:523 src/Model/Contact.php:1605 msgid "News" msgstr "Nachrichten" -#: src/Content/Widget.php:527 src/Module/Settings/Account.php:455 +#: src/Content/Widget.php:527 src/Module/Settings/Account.php:456 msgid "Account Types" msgstr "Kontenarten" @@ -3291,32 +3282,37 @@ msgid "Could not connect to database." msgstr "Verbindung zur Datenbank gescheitert." #: src/Core/L10n.php:403 src/Model/Event.php:428 -#: src/Module/Settings/Display.php:182 +#: src/Module/Settings/Display.php:184 msgid "Monday" msgstr "Montag" #: src/Core/L10n.php:403 src/Model/Event.php:429 +#: src/Module/Settings/Display.php:185 msgid "Tuesday" msgstr "Dienstag" #: src/Core/L10n.php:403 src/Model/Event.php:430 +#: src/Module/Settings/Display.php:186 msgid "Wednesday" msgstr "Mittwoch" #: src/Core/L10n.php:403 src/Model/Event.php:431 +#: src/Module/Settings/Display.php:187 msgid "Thursday" msgstr "Donnerstag" #: src/Core/L10n.php:403 src/Model/Event.php:432 +#: src/Module/Settings/Display.php:188 msgid "Friday" msgstr "Freitag" #: src/Core/L10n.php:403 src/Model/Event.php:433 +#: src/Module/Settings/Display.php:189 msgid "Saturday" msgstr "Samstag" #: src/Core/L10n.php:403 src/Model/Event.php:427 -#: src/Module/Settings/Display.php:182 +#: src/Module/Settings/Display.php:183 msgid "Sunday" msgstr "Sonntag" @@ -3440,57 +3436,9 @@ msgstr "Nov" msgid "Dec" msgstr "Dez" -#: src/Core/L10n.php:445 -msgid "poke" -msgstr "anstupsen" - -#: src/Core/L10n.php:445 -msgid "poked" -msgstr "stupste" - -#: src/Core/L10n.php:446 -msgid "ping" -msgstr "anpingen" - -#: src/Core/L10n.php:446 -msgid "pinged" -msgstr "pingte" - -#: src/Core/L10n.php:447 -msgid "prod" -msgstr "knuffen" - -#: src/Core/L10n.php:447 -msgid "prodded" -msgstr "knuffte" - -#: src/Core/L10n.php:448 -msgid "slap" -msgstr "ohrfeigen" - -#: src/Core/L10n.php:448 -msgid "slapped" -msgstr "ohrfeigte" - -#: src/Core/L10n.php:449 -msgid "finger" -msgstr "befummeln" - -#: src/Core/L10n.php:449 -msgid "fingered" -msgstr "befummelte" - -#: src/Core/L10n.php:450 -msgid "rebuff" -msgstr "eine Abfuhr erteilen" - -#: src/Core/L10n.php:450 -msgid "rebuffed" -msgstr "abfuhrerteilte" - #: src/Core/Renderer.php:89 src/Core/Renderer.php:118 #: src/Core/Renderer.php:145 src/Core/Renderer.php:179 -#: src/Render/FriendicaSmartyEngine.php:57 +#: src/Render/FriendicaSmartyEngine.php:60 msgid "" "Friendica can't display this page at the moment, please contact the " "administrator." @@ -3683,81 +3631,81 @@ msgstr "Interner Serverfehler" msgid "Legacy module file not found: %s" msgstr "Legacy-Moduldatei nicht gefunden: %s" -#: src/Model/Contact.php:1115 src/Model/Contact.php:1127 +#: src/Model/Contact.php:1170 src/Model/Contact.php:1181 msgid "UnFollow" msgstr "Entfolgen" -#: src/Model/Contact.php:1133 src/Module/Admin/Users/Pending.php:107 +#: src/Model/Contact.php:1187 src/Module/Admin/Users/Pending.php:107 #: src/Module/Notifications/Introductions.php:130 #: src/Module/Notifications/Introductions.php:202 msgid "Approve" msgstr "Genehmigen" -#: src/Model/Contact.php:1543 +#: src/Model/Contact.php:1601 msgid "Organisation" msgstr "Organisation" -#: src/Model/Contact.php:1551 +#: src/Model/Contact.php:1609 msgid "Forum" msgstr "Forum" -#: src/Model/Contact.php:2640 +#: src/Model/Contact.php:2795 msgid "Disallowed profile URL." msgstr "Nicht erlaubte Profil-URL." -#: src/Model/Contact.php:2645 src/Module/Friendica.php:81 +#: src/Model/Contact.php:2800 src/Module/Friendica.php:81 msgid "Blocked domain" msgstr "Blockierte Domain" -#: src/Model/Contact.php:2650 +#: src/Model/Contact.php:2805 msgid "Connect URL missing." msgstr "Connect-URL fehlt" -#: src/Model/Contact.php:2659 +#: src/Model/Contact.php:2814 msgid "" "The contact could not be added. Please check the relevant network " "credentials in your Settings -> Social Networks page." msgstr "Der Kontakt konnte nicht hinzugefügt werden. Bitte überprüfe die Einstellungen unter Einstellungen -> Soziale Netzwerke" -#: src/Model/Contact.php:2701 +#: src/Model/Contact.php:2856 msgid "The profile address specified does not provide adequate information." msgstr "Die angegebene Profiladresse liefert unzureichende Informationen." -#: src/Model/Contact.php:2703 +#: src/Model/Contact.php:2858 msgid "No compatible communication protocols or feeds were discovered." msgstr "Es wurden keine kompatiblen Kommunikationsprotokolle oder Feeds gefunden." -#: src/Model/Contact.php:2706 +#: src/Model/Contact.php:2861 msgid "An author or name was not found." msgstr "Es wurde kein Autor oder Name gefunden." -#: src/Model/Contact.php:2709 +#: src/Model/Contact.php:2864 msgid "No browser URL could be matched to this address." msgstr "Zu dieser Adresse konnte keine passende Browser-URL gefunden werden." -#: src/Model/Contact.php:2712 +#: src/Model/Contact.php:2867 msgid "" "Unable to match @-style Identity Address with a known protocol or email " "contact." msgstr "Konnte die @-Adresse mit keinem der bekannten Protokolle oder Email-Kontakte abgleichen." -#: src/Model/Contact.php:2713 +#: src/Model/Contact.php:2868 msgid "Use mailto: in front of address to force email check." msgstr "Verwende mailto: vor der E-Mail-Adresse, um eine Überprüfung der E-Mail-Adresse zu erzwingen." -#: src/Model/Contact.php:2719 +#: src/Model/Contact.php:2874 msgid "" "The profile address specified belongs to a network which has been disabled " "on this site." msgstr "Die Adresse dieses Profils gehört zu einem Netzwerk, mit dem die Kommunikation auf dieser Seite ausgeschaltet wurde." -#: src/Model/Contact.php:2724 +#: src/Model/Contact.php:2879 msgid "" "Limited profile. This person will be unable to receive direct/personal " "notifications from you." msgstr "Eingeschränktes Profil. Diese Person wird keine direkten/privaten Nachrichten von dir erhalten können." -#: src/Model/Contact.php:2783 +#: src/Model/Contact.php:2938 msgid "Unable to retrieve contact information." msgstr "Konnte die Kontaktinformationen nicht empfangen." @@ -3877,66 +3825,66 @@ msgstr "Gruppenname:" msgid "Edit groups" msgstr "Gruppen bearbeiten" -#: src/Model/Item.php:1865 +#: src/Model/Item.php:1965 #, php-format msgid "Detected languages in this post:\\n%s" msgstr "Erkannte Sprachen in diesem Beitrag:\\n%s" -#: src/Model/Item.php:2771 +#: src/Model/Item.php:2857 msgid "activity" msgstr "Aktivität" -#: src/Model/Item.php:2773 +#: src/Model/Item.php:2859 msgid "comment" msgstr "Kommentar" -#: src/Model/Item.php:2776 +#: src/Model/Item.php:2862 msgid "post" msgstr "Beitrag" -#: src/Model/Item.php:2892 +#: src/Model/Item.php:2978 #, php-format msgid "Content warning: %s" msgstr "Inhaltswarnung: %s" -#: src/Model/Item.php:3255 +#: src/Model/Item.php:3341 msgid "bytes" msgstr "Byte" -#: src/Model/Item.php:3286 +#: src/Model/Item.php:3372 #, php-format msgid "%2$s (%3$d%%, %1$d vote)" msgid_plural "%2$s (%3$d%%, %1$d votes)" msgstr[0] "%2$s (%3$d%%, %1$d Stimme)" msgstr[1] "%2$s (%3$d%%, %1$d Stimmen)" -#: src/Model/Item.php:3288 +#: src/Model/Item.php:3374 #, php-format msgid "%2$s (%1$d vote)" msgid_plural "%2$s (%1$d votes)" msgstr[0] "%2$s (%1$d Stimme)" msgstr[1] "%2$s (%1$d Stimmen)" -#: src/Model/Item.php:3293 +#: src/Model/Item.php:3379 #, php-format msgid "%d voter. Poll end: %s" msgid_plural "%d voters. Poll end: %s" msgstr[0] "%d Stimme, Abstimmung endet: %s" msgstr[1] "%d Stimmen, Abstimmung endet: %s" -#: src/Model/Item.php:3295 +#: src/Model/Item.php:3381 #, php-format msgid "%d voter." msgid_plural "%d voters." msgstr[0] "%d Stimme." msgstr[1] "%d Stimmen." -#: src/Model/Item.php:3297 +#: src/Model/Item.php:3383 #, php-format msgid "Poll end: %s" msgstr "Abstimmung endet: %s" -#: src/Model/Item.php:3331 src/Model/Item.php:3332 +#: src/Model/Item.php:3417 src/Model/Item.php:3418 msgid "View on separate page" msgstr "Auf separater Seite ansehen" @@ -4329,12 +4277,12 @@ msgid "" "\t\t\tThank you and welcome to %2$s." msgstr "\nDie Anmelde-Details sind die folgenden:\n\tAdresse der Seite:\t%3$s\n\tBenutzernamename:\t%1$s\n\tPasswort:\t%5$s\n\nDu kannst dein Passwort unter \"Einstellungen\" ändern, sobald du dich\nangemeldet hast.\n\nBitte nimm dir ein paar Minuten, um die anderen Einstellungen auf dieser\nSeite zu kontrollieren.\n\nEventuell magst du ja auch einige Informationen über dich in deinem\nProfil veröffentlichen, damit andere Leute dich einfacher finden können.\nBearbeite hierfür einfach dein Standard-Profil (über die Profil-Seite).\n\nWir empfehlen dir, deinen kompletten Namen anzugeben und ein zu dir\npassendes Profilbild zu wählen, damit dich alte Bekannte wiederfinden.\nAußerdem ist es nützlich, wenn du auf deinem Profil Schlüsselwörter\nangibst. Das erleichtert es, Leute zu finden, die deine Interessen teilen.\n\nWir respektieren deine Privatsphäre - keine dieser Angaben ist nötig.\nWenn du neu im Netzwerk bist und noch niemanden kennst, dann können sie\nallerdings dabei helfen, neue und interessante Kontakte zu knüpfen.\n\nSolltest du dein Nutzerkonto löschen wollen, kannst du dies unter %3$s/removeme jederzeit tun.\n\nDanke für deine Aufmerksamkeit und willkommen auf %2$s." -#: src/Moderation/DomainPatternBlocklist.php:218 +#: src/Moderation/DomainPatternBlocklist.php:228 #, php-format msgid "[%s] Notice of remote server domain pattern block list update" msgstr "[%s] Die Liste der blockierten Domain Muster wurde aktualisiert" -#: src/Moderation/DomainPatternBlocklist.php:220 +#: src/Moderation/DomainPatternBlocklist.php:230 #, php-format msgid "" "Dear %s,\n" @@ -4374,7 +4322,7 @@ msgstr "Einschalten" #: src/Module/Admin/Blocklist/Server/Add.php:121 #: src/Module/Admin/Blocklist/Server/Import.php:117 #: src/Module/Admin/Blocklist/Server/Index.php:93 -#: src/Module/Admin/Federation.php:200 src/Module/Admin/Item/Delete.php:64 +#: src/Module/Admin/Federation.php:201 src/Module/Admin/Item/Delete.php:64 #: src/Module/Admin/Logs/Settings.php:79 src/Module/Admin/Logs/View.php:84 #: src/Module/Admin/Queue.php:72 src/Module/Admin/Site.php:433 #: src/Module/Admin/Storage.php:138 src/Module/Admin/Summary.php:233 @@ -4441,8 +4389,8 @@ msgstr "Aktive" msgid "List of active accounts" msgstr "Liste der aktiven Benutzerkonten" -#: src/Module/Admin/BaseUsers.php:67 src/Module/Contact.php:314 -#: src/Module/Contact.php:374 +#: src/Module/Admin/BaseUsers.php:67 src/Module/Contact.php:317 +#: src/Module/Contact.php:377 msgid "Pending" msgstr "Ausstehend" @@ -4450,8 +4398,8 @@ msgstr "Ausstehend" msgid "List of pending registrations" msgstr "Liste der anstehenden Benutzerkonten" -#: src/Module/Admin/BaseUsers.php:75 src/Module/Contact.php:322 -#: src/Module/Contact.php:375 +#: src/Module/Admin/BaseUsers.php:75 src/Module/Contact.php:325 +#: src/Module/Contact.php:378 msgid "Blocked" msgstr "Geblockt" @@ -4467,19 +4415,19 @@ msgstr "Gelöscht" msgid "List of pending user deletions" msgstr "Liste der auf Löschung wartenden Benutzer" -#: src/Module/Admin/BaseUsers.php:100 src/Module/Settings/Account.php:493 +#: src/Module/Admin/BaseUsers.php:100 src/Module/Settings/Account.php:494 msgid "Normal Account Page" msgstr "Normales Konto" -#: src/Module/Admin/BaseUsers.php:101 src/Module/Settings/Account.php:500 +#: src/Module/Admin/BaseUsers.php:101 src/Module/Settings/Account.php:501 msgid "Soapbox Page" msgstr "Marktschreier-Konto" -#: src/Module/Admin/BaseUsers.php:102 src/Module/Settings/Account.php:507 +#: src/Module/Admin/BaseUsers.php:102 src/Module/Settings/Account.php:508 msgid "Public Forum" msgstr "Öffentliches Forum" -#: src/Module/Admin/BaseUsers.php:103 src/Module/Settings/Account.php:514 +#: src/Module/Admin/BaseUsers.php:103 src/Module/Settings/Account.php:515 msgid "Automatic Friend Page" msgstr "Automatische Freunde-Seite" @@ -4487,19 +4435,19 @@ msgstr "Automatische Freunde-Seite" msgid "Private Forum" msgstr "Privates Forum" -#: src/Module/Admin/BaseUsers.php:107 src/Module/Settings/Account.php:465 +#: src/Module/Admin/BaseUsers.php:107 src/Module/Settings/Account.php:466 msgid "Personal Page" msgstr "Persönliche Seite" -#: src/Module/Admin/BaseUsers.php:108 src/Module/Settings/Account.php:472 +#: src/Module/Admin/BaseUsers.php:108 src/Module/Settings/Account.php:473 msgid "Organisation Page" msgstr "Organisationsseite" -#: src/Module/Admin/BaseUsers.php:109 src/Module/Settings/Account.php:479 +#: src/Module/Admin/BaseUsers.php:109 src/Module/Settings/Account.php:480 msgid "News Page" msgstr "Nachrichtenseite" -#: src/Module/Admin/BaseUsers.php:110 src/Module/Settings/Account.php:486 +#: src/Module/Admin/BaseUsers.php:110 src/Module/Settings/Account.php:487 msgid "Community Forum" msgstr "Gemeinschaftsforum" @@ -4545,7 +4493,7 @@ msgstr "Auswahl aufheben" #: src/Module/Admin/Blocklist/Contact.php:101 #: src/Module/Admin/Users/Blocked.php:142 src/Module/Admin/Users/Index.php:156 -#: src/Module/Contact.php:398 src/Module/Contact/Profile.php:348 +#: src/Module/Contact.php:401 src/Module/Contact/Profile.php:348 #: src/Module/Contact/Profile.php:449 msgid "Unblock" msgstr "Entsperren" @@ -4699,83 +4647,83 @@ msgstr "Warum werden Server die diesem Domainmuster entsprechen geblockt? Die Be #: src/Module/Admin/Blocklist/Server/Import.php:75 #: src/Module/Admin/Blocklist/Server/Import.php:84 msgid "Error importing pattern file" -msgstr "" +msgstr "Fehler beim Import der Muster Datei" #: src/Module/Admin/Blocklist/Server/Import.php:90 msgid "Local blocklist replaced with the provided file." -msgstr "" +msgstr "Lokale Blockliste wurde durch die bereitgestellte Datei ersetzt." #: src/Module/Admin/Blocklist/Server/Import.php:94 #, php-format msgid "%d pattern was added to the local blocklist." msgid_plural "%d patterns were added to the local blocklist." -msgstr[0] "" -msgstr[1] "" +msgstr[0] "%d Muster wurde zur lokalen Blockliste hinzugefügt." +msgstr[1] "%d Muster wurden zur lokalen Blockliste hinzugefügt." #: src/Module/Admin/Blocklist/Server/Import.php:96 msgid "No pattern was added to the local blocklist." -msgstr "" +msgstr "Kein Muster wurde zur lokalen Blockliste hinzugefügt." #: src/Module/Admin/Blocklist/Server/Import.php:118 msgid "Import a Server Domain Pattern Blocklist" -msgstr "" +msgstr "Server Domain Muster Blockliste importieren" #: src/Module/Admin/Blocklist/Server/Import.php:119 msgid "" "

This file can be downloaded from the /friendica path of any " "Friendica server.

" -msgstr "" +msgstr "

Diese Datei kann vom /friendica Pfad auf jedem Friendica Server heruntergeladen werden.

" #: src/Module/Admin/Blocklist/Server/Import.php:120 #: src/Module/Admin/Blocklist/Server/Index.php:104 msgid "Upload file" -msgstr "" +msgstr "Datei hochladen" #: src/Module/Admin/Blocklist/Server/Import.php:121 msgid "Patterns to import" -msgstr "" +msgstr "Zu importierende Muster" #: src/Module/Admin/Blocklist/Server/Import.php:122 msgid "Domain Pattern" -msgstr "" +msgstr "Domain Muster" #: src/Module/Admin/Blocklist/Server/Import.php:124 msgid "Import Mode" -msgstr "" +msgstr "Importmodus" #: src/Module/Admin/Blocklist/Server/Import.php:125 msgid "Import Patterns" -msgstr "" +msgstr "Muster importieren" #: src/Module/Admin/Blocklist/Server/Import.php:126 #, php-format msgid "%d total pattern" msgid_plural "%d total patterns" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "%dMuster gesamt" +msgstr[1] "%dMuster gesamt" #: src/Module/Admin/Blocklist/Server/Import.php:128 #: src/Module/Admin/Blocklist/Server/Index.php:113 msgid "Server domain pattern blocklist CSV file" -msgstr "" +msgstr "Server Domain Muster Blockliste CSV-Datei" #: src/Module/Admin/Blocklist/Server/Import.php:129 msgid "Append" -msgstr "" +msgstr "Anhängen" #: src/Module/Admin/Blocklist/Server/Import.php:129 msgid "" "Imports patterns from the file that weren't already existing in the current " "blocklist." -msgstr "" +msgstr "Importiert Muster aus der Datei, die nicht bereits in der aktuellen Blockliste vorhanden waren." #: src/Module/Admin/Blocklist/Server/Import.php:130 msgid "Replace" -msgstr "" +msgstr "Ersetzen" #: src/Module/Admin/Blocklist/Server/Import.php:130 msgid "Replaces the current blocklist by the imported patterns." -msgstr "" +msgstr "Ersetzt die aktuelle Blockliste durch die importierten Muster." #: src/Module/Admin/Blocklist/Server/Index.php:84 #: src/Module/Admin/Blocklist/Server/Index.php:108 @@ -4815,7 +4763,7 @@ msgstr "Die Liste der blockierten Domain Muster wird auf der Seite ." +msgstr "Wenn du magst, kannst du unter den Benutzerdefinierte Theme-Einstellungen einstellen, dass diese Seite immer geöffnet wird, wenn du den \"Neuer Beitrag\" Button verwendest." + #: src/Module/Item/Follow.php:52 msgid "Unable to follow this item." msgstr "Konnte dem Beitrag nicht folgen." @@ -8471,7 +8401,7 @@ msgid "" "class=\"btn btn-sm pull-right\">Cancel" msgstr "Du betrachtest dein Profil gerade als %s Abbrechen" -#: src/Module/Profile/Profile.php:144 src/Module/Settings/Account.php:578 +#: src/Module/Profile/Profile.php:144 src/Module/Settings/Account.php:579 msgid "Full Name:" msgstr "Kompletter Name:" @@ -8487,17 +8417,17 @@ msgstr "j F, Y" msgid "j F" msgstr "j F" -#: src/Module/Profile/Profile.php:164 src/Util/Temporal.php:163 +#: src/Module/Profile/Profile.php:164 src/Util/Temporal.php:166 msgid "Birthday:" msgstr "Geburtstag:" #: src/Module/Profile/Profile.php:167 -#: src/Module/Settings/Profile/Index.php:245 src/Util/Temporal.php:165 +#: src/Module/Settings/Profile/Index.php:245 src/Util/Temporal.php:168 msgid "Age: " msgstr "Alter: " #: src/Module/Profile/Profile.php:167 -#: src/Module/Settings/Profile/Index.php:245 src/Util/Temporal.php:165 +#: src/Module/Settings/Profile/Index.php:245 src/Util/Temporal.php:168 #, php-format msgid "%d year old" msgid_plural "%d years old" @@ -8602,7 +8532,7 @@ msgid "Please repeat your e-mail address:" msgstr "Bitte wiederhole deine E-Mail Adresse" #: src/Module/Register.php:162 src/Module/Security/PasswordTooLong.php:97 -#: src/Module/Settings/Account.php:569 +#: src/Module/Settings/Account.php:570 msgid "New Password:" msgstr "Neues Passwort:" @@ -8611,7 +8541,7 @@ msgid "Leave empty for an auto generated password." msgstr "Leer lassen, um das Passwort automatisch zu generieren." #: src/Module/Register.php:163 src/Module/Security/PasswordTooLong.php:98 -#: src/Module/Settings/Account.php:570 +#: src/Module/Settings/Account.php:571 msgid "Confirm:" msgstr "Bestätigen:" @@ -8732,6 +8662,10 @@ msgstr "Solltest du das freie Soziale Netzwerk noch nicht benutzen, kannst du local " @@ -9098,89 +9032,89 @@ msgid "" " system settings." msgstr "Dein Profil wird im lokalen Verzeichnis dieses Knotens veröffentlicht. Je nach Systemeinstellungen kann es öffentlich auffindbar sein." -#: src/Module/Settings/Account.php:546 +#: src/Module/Settings/Account.php:547 #, php-format msgid "" "Your profile will also be published in the global friendica directories " "(e.g. %s)." msgstr "Dein Profil wird auch in den globalen Friendica Verzeichnissen (z.B. %s) veröffentlicht werden." -#: src/Module/Settings/Account.php:559 +#: src/Module/Settings/Account.php:560 msgid "Account Settings" msgstr "Kontoeinstellungen" -#: src/Module/Settings/Account.php:560 +#: src/Module/Settings/Account.php:561 #, php-format msgid "Your Identity Address is '%s' or '%s'." msgstr "Die Adresse deines Profils lautet '%s' oder '%s'." -#: src/Module/Settings/Account.php:568 +#: src/Module/Settings/Account.php:569 msgid "Password Settings" msgstr "Passwort-Einstellungen" -#: src/Module/Settings/Account.php:570 +#: src/Module/Settings/Account.php:571 msgid "Leave password fields blank unless changing" msgstr "Lass die Passwort-Felder leer, außer du willst das Passwort ändern" -#: src/Module/Settings/Account.php:572 +#: src/Module/Settings/Account.php:573 msgid "Password:" msgstr "Passwort:" -#: src/Module/Settings/Account.php:572 +#: src/Module/Settings/Account.php:573 msgid "Your current password to confirm the changes of the email address" msgstr "Dein aktuelles Passwort um die Änderungen deiner E-Mail Adresse zu bestätigen" -#: src/Module/Settings/Account.php:575 +#: src/Module/Settings/Account.php:576 msgid "Delete OpenID URL" msgstr "OpenID URL löschen" -#: src/Module/Settings/Account.php:577 +#: src/Module/Settings/Account.php:578 msgid "Basic Settings" msgstr "Grundeinstellungen" -#: src/Module/Settings/Account.php:579 +#: src/Module/Settings/Account.php:580 msgid "Email Address:" msgstr "E-Mail-Adresse:" -#: src/Module/Settings/Account.php:580 +#: src/Module/Settings/Account.php:581 msgid "Your Timezone:" msgstr "Deine Zeitzone:" -#: src/Module/Settings/Account.php:581 +#: src/Module/Settings/Account.php:582 msgid "Your Language:" msgstr "Deine Sprache:" -#: src/Module/Settings/Account.php:581 +#: src/Module/Settings/Account.php:582 msgid "" "Set the language we use to show you friendica interface and to send you " "emails" msgstr "Wähle die Sprache, in der wir dir die Friendica-Oberfläche präsentieren sollen und dir E-Mail schicken" -#: src/Module/Settings/Account.php:582 +#: src/Module/Settings/Account.php:583 msgid "Default Post Location:" msgstr "Standardstandort:" -#: src/Module/Settings/Account.php:583 +#: src/Module/Settings/Account.php:584 msgid "Use Browser Location:" msgstr "Standort des Browsers verwenden:" -#: src/Module/Settings/Account.php:585 +#: src/Module/Settings/Account.php:586 msgid "Security and Privacy Settings" msgstr "Sicherheits- und Privatsphäre-Einstellungen" -#: src/Module/Settings/Account.php:587 +#: src/Module/Settings/Account.php:588 msgid "Maximum Friend Requests/Day:" msgstr "Maximale Anzahl von Kontaktanfragen/Tag:" -#: src/Module/Settings/Account.php:587 src/Module/Settings/Account.php:597 +#: src/Module/Settings/Account.php:588 src/Module/Settings/Account.php:598 msgid "(to prevent spam abuse)" msgstr "(um SPAM zu vermeiden)" -#: src/Module/Settings/Account.php:589 +#: src/Module/Settings/Account.php:590 msgid "Allow your profile to be searchable globally?" msgstr "Darf dein Profil bei Suchanfragen gefunden werden?" -#: src/Module/Settings/Account.php:589 +#: src/Module/Settings/Account.php:590 msgid "" "Activate this setting if you want others to easily find and follow you. Your" " profile will be searchable on remote systems. This setting also determines " @@ -9188,43 +9122,43 @@ msgid "" "indexed or not." msgstr "Aktiviere diese Einstellung, wenn du von anderen einfach gefunden und gefolgt werden möchtest. Dei Profil wird dann auf anderen Systemen leicht durchsuchbar. Außerdem regelt diese Einstellung ob Friendica Suchmaschinen mitteilen soll, ob dein Profil indiziert werden soll oder nicht." -#: src/Module/Settings/Account.php:590 +#: src/Module/Settings/Account.php:591 msgid "Hide your contact/friend list from viewers of your profile?" msgstr "Liste der Kontakte vor Betrachtern des Profil verbergen?" -#: src/Module/Settings/Account.php:590 +#: src/Module/Settings/Account.php:591 msgid "" "A list of your contacts is displayed on your profile page. Activate this " "option to disable the display of your contact list." msgstr "Auf deiner Profilseite wird eine Liste deiner Kontakte angezeigt. Aktiviere diese Option wenn du das nicht möchtest." -#: src/Module/Settings/Account.php:591 +#: src/Module/Settings/Account.php:592 msgid "Hide your profile details from anonymous viewers?" msgstr "Profil-Details vor unbekannten Betrachtern verbergen?" -#: src/Module/Settings/Account.php:591 +#: src/Module/Settings/Account.php:592 msgid "" "Anonymous visitors will only see your profile picture, your display name and" " the nickname you are using on your profile page. Your public posts and " "replies will still be accessible by other means." msgstr "Anonyme Besucher deines Profils werden ausschließlich dein Profilbild, deinen Namen sowie deinen Spitznamen sehen. Deine öffentlichen Beiträge und Kommentare werden weiterhin sichtbar sein." -#: src/Module/Settings/Account.php:592 +#: src/Module/Settings/Account.php:593 msgid "Make public posts unlisted" msgstr "Öffentliche Beiträge nicht listen" -#: src/Module/Settings/Account.php:592 +#: src/Module/Settings/Account.php:593 msgid "" "Your public posts will not appear on the community pages or in search " "results, nor be sent to relay servers. However they can still appear on " "public feeds on remote servers." msgstr "Deine öffentlichen Beiträge werden nicht auf der Gemeinschaftsseite oder in den Suchergebnissen erscheinen, außerdem werden sie nicht an Relay-Server geschickt. Sie werden aber weiterhin in allen öffentlichen Feeds, auch auf entfernten Servern, erscheinen." -#: src/Module/Settings/Account.php:593 +#: src/Module/Settings/Account.php:594 msgid "Make all posted pictures accessible" msgstr "Alle geposteten Bilder zugreifbar machen" -#: src/Module/Settings/Account.php:593 +#: src/Module/Settings/Account.php:594 msgid "" "This option makes every posted picture accessible via the direct link. This " "is a workaround for the problem that most other networks can't handle " @@ -9232,131 +9166,127 @@ msgid "" "public on your photo albums though." msgstr "Diese Option macht jedes veröffentlichte Bild über den direkten Link zugänglich. Dies ist eine Problemumgehung für das Problem, dass die meisten anderen Netzwerke keine Berechtigungen für Bilder verarbeiten können. Nicht öffentliche Bilder sind in Ihren Fotoalben jedoch immer noch nicht für die Öffentlichkeit sichtbar." -#: src/Module/Settings/Account.php:594 +#: src/Module/Settings/Account.php:595 msgid "Allow friends to post to your profile page?" msgstr "Dürfen deine Kontakte auf deine Pinnwand schreiben?" -#: src/Module/Settings/Account.php:594 +#: src/Module/Settings/Account.php:595 msgid "" "Your contacts may write posts on your profile wall. These posts will be " "distributed to your contacts" msgstr "Deine Kontakte können Beiträge auf deiner Pinnwand hinterlassen. Diese werden an deine Kontakte verteilt." -#: src/Module/Settings/Account.php:595 +#: src/Module/Settings/Account.php:596 msgid "Allow friends to tag your posts?" msgstr "Dürfen deine Kontakte deine Beiträge mit Schlagwörtern versehen?" -#: src/Module/Settings/Account.php:595 +#: src/Module/Settings/Account.php:596 msgid "Your contacts can add additional tags to your posts." msgstr "Deine Kontakte dürfen deine Beiträge mit zusätzlichen Schlagworten versehen." -#: src/Module/Settings/Account.php:596 +#: src/Module/Settings/Account.php:597 msgid "Permit unknown people to send you private mail?" msgstr "Dürfen dir Unbekannte private Nachrichten schicken?" -#: src/Module/Settings/Account.php:596 +#: src/Module/Settings/Account.php:597 msgid "" "Friendica network users may send you private messages even if they are not " "in your contact list." msgstr "Nutzer des Friendica Netzwerks können dir private Nachrichten senden, selbst wenn sie nicht in deine Kontaktliste sind." -#: src/Module/Settings/Account.php:597 +#: src/Module/Settings/Account.php:598 msgid "Maximum private messages per day from unknown people:" msgstr "Maximale Anzahl privater Nachrichten von Unbekannten pro Tag:" -#: src/Module/Settings/Account.php:599 +#: src/Module/Settings/Account.php:600 msgid "Default Post Permissions" msgstr "Standard-Zugriffsrechte für Beiträge" -#: src/Module/Settings/Account.php:603 +#: src/Module/Settings/Account.php:604 msgid "Expiration settings" msgstr "Verfalls-Einstellungen" -#: src/Module/Settings/Account.php:604 +#: src/Module/Settings/Account.php:605 msgid "Automatically expire posts after this many days:" msgstr "Beiträge verfallen automatisch nach dieser Anzahl von Tagen:" -#: src/Module/Settings/Account.php:604 +#: src/Module/Settings/Account.php:605 msgid "If empty, posts will not expire. Expired posts will be deleted" msgstr "Wenn leer, verfallen Beiträge nie automatisch. Verfallene Beiträge werden gelöscht." -#: src/Module/Settings/Account.php:605 +#: src/Module/Settings/Account.php:606 msgid "Expire posts" msgstr "Beiträge verfallen lassen" -#: src/Module/Settings/Account.php:605 +#: src/Module/Settings/Account.php:606 msgid "When activated, posts and comments will be expired." msgstr "Ist dies aktiviert, werden Beiträge und Kommentare verfallen." -#: src/Module/Settings/Account.php:606 +#: src/Module/Settings/Account.php:607 msgid "Expire personal notes" msgstr "Persönliche Notizen verfallen lassen" -#: src/Module/Settings/Account.php:606 +#: src/Module/Settings/Account.php:607 msgid "" "When activated, the personal notes on your profile page will be expired." msgstr "Ist dies aktiviert, werden persönliche Notizen auf deiner Pinnwand verfallen." -#: src/Module/Settings/Account.php:607 +#: src/Module/Settings/Account.php:608 msgid "Expire starred posts" msgstr "Markierte Beiträge verfallen lassen" -#: src/Module/Settings/Account.php:607 +#: src/Module/Settings/Account.php:608 msgid "" "Starring posts keeps them from being expired. That behaviour is overwritten " "by this setting." msgstr "Markierte Beiträge verfallen eigentlich nicht. Mit dieser Option kannst du sie verfallen lassen." -#: src/Module/Settings/Account.php:608 +#: src/Module/Settings/Account.php:609 msgid "Only expire posts by others" msgstr "Nur Beiträge anderer verfallen lassen." -#: src/Module/Settings/Account.php:608 +#: src/Module/Settings/Account.php:609 msgid "" "When activated, your own posts never expire. Then the settings above are " "only valid for posts you received." msgstr "Wenn aktiviert werden deine eigenen Beiträge niemals verfallen. Die obigen Einstellungen betreffen dann ausschließlich die Beiträge von anderen Accounts." -#: src/Module/Settings/Account.php:611 +#: src/Module/Settings/Account.php:612 msgid "Notification Settings" msgstr "Benachrichtigungseinstellungen" -#: src/Module/Settings/Account.php:612 +#: src/Module/Settings/Account.php:613 msgid "Send a notification email when:" msgstr "Benachrichtigungs-E-Mail senden, wenn:" -#: src/Module/Settings/Account.php:613 +#: src/Module/Settings/Account.php:614 msgid "You receive an introduction" msgstr "– du eine Kontaktanfrage erhältst" -#: src/Module/Settings/Account.php:614 +#: src/Module/Settings/Account.php:615 msgid "Your introductions are confirmed" msgstr "– eine Deiner Kontaktanfragen akzeptiert wurde" -#: src/Module/Settings/Account.php:615 +#: src/Module/Settings/Account.php:616 msgid "Someone writes on your profile wall" msgstr "– jemand etwas auf Deine Pinnwand schreibt" -#: src/Module/Settings/Account.php:616 +#: src/Module/Settings/Account.php:617 msgid "Someone writes a followup comment" msgstr "– jemand auch einen Kommentar verfasst" -#: src/Module/Settings/Account.php:617 +#: src/Module/Settings/Account.php:618 msgid "You receive a private message" msgstr "– du eine private Nachricht erhältst" -#: src/Module/Settings/Account.php:618 +#: src/Module/Settings/Account.php:619 msgid "You receive a friend suggestion" msgstr "– du eine Empfehlung erhältst" -#: src/Module/Settings/Account.php:619 +#: src/Module/Settings/Account.php:620 msgid "You are tagged in a post" msgstr "– du in einem Beitrag erwähnt wirst" -#: src/Module/Settings/Account.php:620 -msgid "You are poked/prodded/etc. in a post" -msgstr "– du von jemandem angestupst oder sonstwie behandelt wirst" - #: src/Module/Settings/Account.php:622 msgid "Create a desktop notification when:" msgstr "Benachrichtigungen anzeigen wenn:" @@ -9553,121 +9483,121 @@ msgstr "Das gewählte Theme ist nicht verfügbar" msgid "%s - (Unsupported)" msgstr "%s - (Nicht unterstützt)" -#: src/Module/Settings/Display.php:192 +#: src/Module/Settings/Display.php:200 msgid "Display Settings" msgstr "Anzeige-Einstellungen" -#: src/Module/Settings/Display.php:194 +#: src/Module/Settings/Display.php:202 msgid "General Theme Settings" msgstr "Allgemeine Theme-Einstellungen" -#: src/Module/Settings/Display.php:195 +#: src/Module/Settings/Display.php:203 msgid "Custom Theme Settings" msgstr "Benutzerdefinierte Theme-Einstellungen" -#: src/Module/Settings/Display.php:196 +#: src/Module/Settings/Display.php:204 msgid "Content Settings" msgstr "Einstellungen zum Inhalt" -#: src/Module/Settings/Display.php:197 view/theme/duepuntozero/config.php:70 -#: view/theme/frio/config.php:161 view/theme/quattro/config.php:72 +#: src/Module/Settings/Display.php:205 view/theme/duepuntozero/config.php:70 +#: view/theme/frio/config.php:172 view/theme/quattro/config.php:72 #: view/theme/vier/config.php:120 msgid "Theme settings" msgstr "Theme-Einstellungen" -#: src/Module/Settings/Display.php:198 +#: src/Module/Settings/Display.php:206 msgid "Calendar" msgstr "Kalender" -#: src/Module/Settings/Display.php:204 +#: src/Module/Settings/Display.php:212 msgid "Display Theme:" msgstr "Theme:" -#: src/Module/Settings/Display.php:205 +#: src/Module/Settings/Display.php:213 msgid "Mobile Theme:" msgstr "Mobiles Theme" -#: src/Module/Settings/Display.php:208 +#: src/Module/Settings/Display.php:216 msgid "Number of items to display per page:" msgstr "Zahl der Beiträge, die pro Netzwerkseite angezeigt werden sollen: " -#: src/Module/Settings/Display.php:208 src/Module/Settings/Display.php:209 +#: src/Module/Settings/Display.php:216 src/Module/Settings/Display.php:217 msgid "Maximum of 100 items" msgstr "Maximal 100 Beiträge" -#: src/Module/Settings/Display.php:209 +#: src/Module/Settings/Display.php:217 msgid "Number of items to display per page when viewed from mobile device:" msgstr "Zahl der Beiträge, die pro Netzwerkseite auf mobilen Geräten angezeigt werden sollen:" -#: src/Module/Settings/Display.php:210 +#: src/Module/Settings/Display.php:218 msgid "Update browser every xx seconds" msgstr "Browser alle xx Sekunden aktualisieren" -#: src/Module/Settings/Display.php:210 +#: src/Module/Settings/Display.php:218 msgid "Minimum of 10 seconds. Enter -1 to disable it." msgstr "Minimum sind 10 Sekunden. Gib -1 ein, um abzuschalten." -#: src/Module/Settings/Display.php:211 +#: src/Module/Settings/Display.php:219 msgid "Automatic updates only at the top of the post stream pages" msgstr "Automatische Updates nur, wenn du oben auf den Beitragsstream-Seiten bist." -#: src/Module/Settings/Display.php:211 +#: src/Module/Settings/Display.php:219 msgid "" "Auto update may add new posts at the top of the post stream pages, which can" " affect the scroll position and perturb normal reading if it happens " "anywhere else the top of the page." msgstr "Das automatische Aktualisieren des Streams kann neue Beiträge am Anfang des Stream einfügen. Dies kann die angezeigte Position im Stream beeinflussen, wenn du gerade nicht den Anfang des Streams betrachtest." -#: src/Module/Settings/Display.php:212 +#: src/Module/Settings/Display.php:220 msgid "Display emoticons" msgstr "Zeige Emoticons" -#: src/Module/Settings/Display.php:212 +#: src/Module/Settings/Display.php:220 msgid "When enabled, emoticons are replaced with matching symbols." msgstr "Wenn dies aktiviert ist, werden Text-Emoticons in Beiträgen durch Symbole ersetzt." -#: src/Module/Settings/Display.php:213 +#: src/Module/Settings/Display.php:221 msgid "Infinite scroll" msgstr "Endloses Scrollen" -#: src/Module/Settings/Display.php:213 +#: src/Module/Settings/Display.php:221 msgid "Automatic fetch new items when reaching the page end." msgstr "Automatisch neue Beiträge laden, wenn das Ende der Seite erreicht ist." -#: src/Module/Settings/Display.php:214 +#: src/Module/Settings/Display.php:222 msgid "Enable Smart Threading" msgstr "Intelligentes Threading aktivieren" -#: src/Module/Settings/Display.php:214 +#: src/Module/Settings/Display.php:222 msgid "Enable the automatic suppression of extraneous thread indentation." msgstr "Schaltet das automatische Unterdrücken von überflüssigen Thread-Einrückungen ein." -#: src/Module/Settings/Display.php:215 +#: src/Module/Settings/Display.php:223 msgid "Display the Dislike feature" msgstr "Das \"Nicht-mögen\" Feature anzeigen" -#: src/Module/Settings/Display.php:215 +#: src/Module/Settings/Display.php:223 msgid "" "Display the Dislike button and dislike reactions on posts and comments." msgstr "Einen \"Ich mag das nicht\" Button und die dislike Reaktion auf Beiträge und Kommentare anzeigen." -#: src/Module/Settings/Display.php:216 +#: src/Module/Settings/Display.php:224 msgid "Display the resharer" msgstr "Teilenden anzeigen" -#: src/Module/Settings/Display.php:216 +#: src/Module/Settings/Display.php:224 msgid "Display the first resharer as icon and text on a reshared item." msgstr "Zeige das Profilbild des ersten Kontakts von dem ein Beitrag geteilt wurde." -#: src/Module/Settings/Display.php:217 +#: src/Module/Settings/Display.php:225 msgid "Stay local" msgstr "Bleib lokal" -#: src/Module/Settings/Display.php:217 +#: src/Module/Settings/Display.php:225 msgid "Don't go to a remote system when following a contact link." msgstr "Gehe nicht zu einem Remote-System, wenn einem Kontaktlink gefolgt wird" -#: src/Module/Settings/Display.php:219 +#: src/Module/Settings/Display.php:227 msgid "Beginning of week:" msgstr "Wochenbeginn:" @@ -9723,8 +9653,8 @@ msgstr "Profilbild" msgid "Location" msgstr "Wohnort" -#: src/Module/Settings/Profile/Index.php:230 src/Util/Temporal.php:93 -#: src/Util/Temporal.php:95 +#: src/Module/Settings/Profile/Index.php:230 src/Util/Temporal.php:95 +#: src/Util/Temporal.php:97 msgid "Miscellaneous" msgstr "Verschiedenes" @@ -10594,206 +10524,190 @@ msgstr "%1$s hat in der Unterhaltung von %3$s kommentiert" msgid "%1$s commented on your thread %2$s" msgstr "%1$s hat in deiner Unterhaltung %2$s kommentiert" -#: src/Navigation/Notifications/Repository/Notify.php:222 -#: src/Navigation/Notifications/Repository/Notify.php:736 +#: src/Navigation/Notifications/Repository/Notify.php:225 +#: src/Navigation/Notifications/Repository/Notify.php:721 msgid "[Friendica:Notify]" msgstr "[Friendica Meldung]" -#: src/Navigation/Notifications/Repository/Notify.php:286 +#: src/Navigation/Notifications/Repository/Notify.php:289 #, php-format msgid "%s New mail received at %s" msgstr "%sNeue Nachricht auf %s empfangen" -#: src/Navigation/Notifications/Repository/Notify.php:288 +#: src/Navigation/Notifications/Repository/Notify.php:291 #, php-format msgid "%1$s sent you a new private message at %2$s." msgstr "%1$s hat dir eine neue, private Nachricht auf %2$s geschickt." -#: src/Navigation/Notifications/Repository/Notify.php:289 +#: src/Navigation/Notifications/Repository/Notify.php:292 msgid "a private message" msgstr "eine private Nachricht" -#: src/Navigation/Notifications/Repository/Notify.php:289 +#: src/Navigation/Notifications/Repository/Notify.php:292 #, php-format msgid "%1$s sent you %2$s." msgstr "%1$s schickte dir %2$s." -#: src/Navigation/Notifications/Repository/Notify.php:291 +#: src/Navigation/Notifications/Repository/Notify.php:294 #, php-format msgid "Please visit %s to view and/or reply to your private messages." msgstr "Bitte besuche %s, um Deine privaten Nachrichten anzusehen und/oder zu beantworten." -#: src/Navigation/Notifications/Repository/Notify.php:321 +#: src/Navigation/Notifications/Repository/Notify.php:324 #, php-format msgid "%1$s commented on %2$s's %3$s %4$s" msgstr "%1$s kommentierte %2$s's %3$s%4$s" -#: src/Navigation/Notifications/Repository/Notify.php:326 +#: src/Navigation/Notifications/Repository/Notify.php:329 #, php-format msgid "%1$s commented on your %2$s %3$s" msgstr "%1$s kommentierte auf (%2$s) %3$s" -#: src/Navigation/Notifications/Repository/Notify.php:330 +#: src/Navigation/Notifications/Repository/Notify.php:333 #, php-format msgid "%1$s commented on their %2$s %3$s" msgstr "%1$s hat den eigenen %2$s %3$s kommentiert" -#: src/Navigation/Notifications/Repository/Notify.php:334 -#: src/Navigation/Notifications/Repository/Notify.php:770 +#: src/Navigation/Notifications/Repository/Notify.php:337 +#: src/Navigation/Notifications/Repository/Notify.php:755 #, php-format msgid "%1$s Comment to conversation #%2$d by %3$s" msgstr "%1$sKommentar von %3$s auf Unterhaltung %2$d" -#: src/Navigation/Notifications/Repository/Notify.php:336 +#: src/Navigation/Notifications/Repository/Notify.php:339 #, php-format msgid "%s commented on an item/conversation you have been following." msgstr "%s hat einen Beitrag kommentiert, dem du folgst." -#: src/Navigation/Notifications/Repository/Notify.php:340 -#: src/Navigation/Notifications/Repository/Notify.php:355 -#: src/Navigation/Notifications/Repository/Notify.php:374 -#: src/Navigation/Notifications/Repository/Notify.php:785 +#: src/Navigation/Notifications/Repository/Notify.php:343 +#: src/Navigation/Notifications/Repository/Notify.php:358 +#: src/Navigation/Notifications/Repository/Notify.php:770 #, php-format msgid "Please visit %s to view and/or reply to the conversation." msgstr "Bitte besuche %s, um die Konversation anzusehen und/oder zu kommentieren." -#: src/Navigation/Notifications/Repository/Notify.php:347 +#: src/Navigation/Notifications/Repository/Notify.php:350 #, php-format msgid "%s %s posted to your profile wall" msgstr "%s%s hat auf deine Pinnwand gepostet" -#: src/Navigation/Notifications/Repository/Notify.php:349 +#: src/Navigation/Notifications/Repository/Notify.php:352 #, php-format msgid "%1$s posted to your profile wall at %2$s" msgstr "%1$s schrieb um %2$s auf Deine Pinnwand" -#: src/Navigation/Notifications/Repository/Notify.php:350 +#: src/Navigation/Notifications/Repository/Notify.php:353 #, php-format msgid "%1$s posted to [url=%2$s]your wall[/url]" msgstr "%1$s hat etwas auf [url=%2$s]Deiner Pinnwand[/url] gepostet" -#: src/Navigation/Notifications/Repository/Notify.php:362 -#, php-format -msgid "%1$s %2$s poked you" -msgstr "%1$s%2$shat dich angestubst" - -#: src/Navigation/Notifications/Repository/Notify.php:364 -#, php-format -msgid "%1$s poked you at %2$s" -msgstr "%1$s hat dich auf %2$s angestupst" - -#: src/Navigation/Notifications/Repository/Notify.php:365 -#, php-format -msgid "%1$s [url=%2$s]poked you[/url]." -msgstr "%1$s [url=%2$s]hat dich angestupst[/url]." - -#: src/Navigation/Notifications/Repository/Notify.php:382 +#: src/Navigation/Notifications/Repository/Notify.php:366 #, php-format msgid "%s Introduction received" msgstr "%sVorstellung erhalten" -#: src/Navigation/Notifications/Repository/Notify.php:384 +#: src/Navigation/Notifications/Repository/Notify.php:368 #, php-format msgid "You've received an introduction from '%1$s' at %2$s" msgstr "Du hast eine Kontaktanfrage von '%1$s' auf %2$s erhalten" -#: src/Navigation/Notifications/Repository/Notify.php:385 +#: src/Navigation/Notifications/Repository/Notify.php:369 #, php-format msgid "You've received [url=%1$s]an introduction[/url] from %2$s." msgstr "Du hast eine [url=%1$s]Kontaktanfrage[/url] von %2$s erhalten." -#: src/Navigation/Notifications/Repository/Notify.php:390 -#: src/Navigation/Notifications/Repository/Notify.php:436 +#: src/Navigation/Notifications/Repository/Notify.php:374 +#: src/Navigation/Notifications/Repository/Notify.php:420 #, php-format msgid "You may visit their profile at %s" msgstr "Hier kannst du das Profil betrachten: %s" -#: src/Navigation/Notifications/Repository/Notify.php:392 +#: src/Navigation/Notifications/Repository/Notify.php:376 #, php-format msgid "Please visit %s to approve or reject the introduction." msgstr "Bitte besuche %s, um die Kontaktanfrage anzunehmen oder abzulehnen." -#: src/Navigation/Notifications/Repository/Notify.php:399 +#: src/Navigation/Notifications/Repository/Notify.php:383 #, php-format msgid "%s A new person is sharing with you" msgstr "%sEine neue Person teilt nun mit dir" -#: src/Navigation/Notifications/Repository/Notify.php:401 -#: src/Navigation/Notifications/Repository/Notify.php:402 +#: src/Navigation/Notifications/Repository/Notify.php:385 +#: src/Navigation/Notifications/Repository/Notify.php:386 #, php-format msgid "%1$s is sharing with you at %2$s" msgstr "%1$s teilt mit dir auf %2$s" -#: src/Navigation/Notifications/Repository/Notify.php:409 +#: src/Navigation/Notifications/Repository/Notify.php:393 #, php-format msgid "%s You have a new follower" msgstr "%sDu hast einen neuen Kontakt" -#: src/Navigation/Notifications/Repository/Notify.php:411 -#: src/Navigation/Notifications/Repository/Notify.php:412 +#: src/Navigation/Notifications/Repository/Notify.php:395 +#: src/Navigation/Notifications/Repository/Notify.php:396 #, php-format msgid "You have a new follower at %2$s : %1$s" msgstr "Du hast einen neuen Kontakt auf %2$s: %1$s" -#: src/Navigation/Notifications/Repository/Notify.php:425 +#: src/Navigation/Notifications/Repository/Notify.php:409 #, php-format msgid "%s Friend suggestion received" msgstr "%sKontaktvorschlag erhalten" -#: src/Navigation/Notifications/Repository/Notify.php:427 +#: src/Navigation/Notifications/Repository/Notify.php:411 #, php-format msgid "You've received a friend suggestion from '%1$s' at %2$s" msgstr "Du hast einen Kontakt-Vorschlag von '%1$s' auf %2$s erhalten" -#: src/Navigation/Notifications/Repository/Notify.php:428 +#: src/Navigation/Notifications/Repository/Notify.php:412 #, php-format msgid "" "You've received [url=%1$s]a friend suggestion[/url] for %2$s from %3$s." msgstr "Du hast einen [url=%1$s]Kontakt-Vorschlag[/url] %2$s von %3$s erhalten." -#: src/Navigation/Notifications/Repository/Notify.php:434 +#: src/Navigation/Notifications/Repository/Notify.php:418 msgid "Name:" msgstr "Name:" -#: src/Navigation/Notifications/Repository/Notify.php:435 +#: src/Navigation/Notifications/Repository/Notify.php:419 msgid "Photo:" msgstr "Foto:" -#: src/Navigation/Notifications/Repository/Notify.php:438 +#: src/Navigation/Notifications/Repository/Notify.php:422 #, php-format msgid "Please visit %s to approve or reject the suggestion." msgstr "Bitte besuche %s, um den Vorschlag zu akzeptieren oder abzulehnen." -#: src/Navigation/Notifications/Repository/Notify.php:446 -#: src/Navigation/Notifications/Repository/Notify.php:461 +#: src/Navigation/Notifications/Repository/Notify.php:430 +#: src/Navigation/Notifications/Repository/Notify.php:445 #, php-format msgid "%s Connection accepted" msgstr "%sKontaktanfrage bestätigt" -#: src/Navigation/Notifications/Repository/Notify.php:448 -#: src/Navigation/Notifications/Repository/Notify.php:463 +#: src/Navigation/Notifications/Repository/Notify.php:432 +#: src/Navigation/Notifications/Repository/Notify.php:447 #, php-format msgid "'%1$s' has accepted your connection request at %2$s" msgstr "'%1$s' hat Deine Kontaktanfrage auf %2$s bestätigt" -#: src/Navigation/Notifications/Repository/Notify.php:449 -#: src/Navigation/Notifications/Repository/Notify.php:464 +#: src/Navigation/Notifications/Repository/Notify.php:433 +#: src/Navigation/Notifications/Repository/Notify.php:448 #, php-format msgid "%2$s has accepted your [url=%1$s]connection request[/url]." msgstr "%2$s hat Deine [url=%1$s]Kontaktanfrage[/url] akzeptiert." -#: src/Navigation/Notifications/Repository/Notify.php:454 +#: src/Navigation/Notifications/Repository/Notify.php:438 msgid "" "You are now mutual friends and may exchange status updates, photos, and " "email without restriction." msgstr "Ihr seid nun beidseitige Kontakte und könnt Statusmitteilungen, Bilder und E-Mails ohne Einschränkungen austauschen." -#: src/Navigation/Notifications/Repository/Notify.php:456 +#: src/Navigation/Notifications/Repository/Notify.php:440 #, php-format msgid "Please visit %s if you wish to make any changes to this relationship." msgstr "Bitte besuche %s, wenn du Änderungen an eurer Beziehung vornehmen willst." -#: src/Navigation/Notifications/Repository/Notify.php:469 +#: src/Navigation/Notifications/Repository/Notify.php:453 #, php-format msgid "" "'%1$s' has chosen to accept you a fan, which restricts some forms of " @@ -10802,33 +10716,33 @@ msgid "" "automatically." msgstr "'%1$s' hat sich entschieden dich als Fan zu akzeptieren, dies schränkt einige Kommunikationswege - wie private Nachrichten und einige Interaktionsmöglichkeiten auf der Profilseite - ein. Wenn dies eine Berühmtheiten- oder Gemeinschaftsseite ist, werden diese Einstellungen automatisch vorgenommen." -#: src/Navigation/Notifications/Repository/Notify.php:471 +#: src/Navigation/Notifications/Repository/Notify.php:455 #, php-format msgid "" "'%1$s' may choose to extend this into a two-way or more permissive " "relationship in the future." msgstr "'%1$s' kann den Kontaktstatus zu einem späteren Zeitpunkt erweitern und diese Einschränkungen aufheben. " -#: src/Navigation/Notifications/Repository/Notify.php:473 +#: src/Navigation/Notifications/Repository/Notify.php:457 #, php-format msgid "Please visit %s if you wish to make any changes to this relationship." msgstr "Bitte besuche %s, wenn du Änderungen an eurer Beziehung vornehmen willst." -#: src/Navigation/Notifications/Repository/Notify.php:483 +#: src/Navigation/Notifications/Repository/Notify.php:467 msgid "registration request" msgstr "Registrierungsanfrage" -#: src/Navigation/Notifications/Repository/Notify.php:485 +#: src/Navigation/Notifications/Repository/Notify.php:469 #, php-format msgid "You've received a registration request from '%1$s' at %2$s" msgstr "Du hast eine Registrierungsanfrage von %2$s auf '%1$s' erhalten" -#: src/Navigation/Notifications/Repository/Notify.php:486 +#: src/Navigation/Notifications/Repository/Notify.php:470 #, php-format msgid "You've received a [url=%1$s]registration request[/url] from %2$s." msgstr "Du hast eine [url=%1$s]Registrierungsanfrage[/url] von %2$s erhalten." -#: src/Navigation/Notifications/Repository/Notify.php:491 +#: src/Navigation/Notifications/Repository/Notify.php:475 #, php-format msgid "" "Full Name:\t%s\n" @@ -10836,17 +10750,17 @@ msgid "" "Login Name:\t%s (%s)" msgstr "Kompletter Name: %s\nURL der Seite: %s\nLogin Name: %s(%s)" -#: src/Navigation/Notifications/Repository/Notify.php:497 +#: src/Navigation/Notifications/Repository/Notify.php:481 #, php-format msgid "Please visit %s to approve or reject the request." msgstr "Bitte besuche %s, um die Anfrage zu bearbeiten." -#: src/Navigation/Notifications/Repository/Notify.php:764 +#: src/Navigation/Notifications/Repository/Notify.php:749 #, php-format msgid "%s %s tagged you" msgstr "%s %s hat dich erwähnt" -#: src/Navigation/Notifications/Repository/Notify.php:767 +#: src/Navigation/Notifications/Repository/Notify.php:752 #, php-format msgid "%s %s shared a new post" msgstr "%s%shat einen Beitrag geteilt" @@ -11076,28 +10990,28 @@ msgstr "Zeige mehr" msgid "Show fewer" msgstr "Zeige weniger" -#: src/Protocol/OStatus.php:1475 +#: src/Protocol/OStatus.php:1471 #, php-format msgid "%s is now following %s." msgstr "%s folgt nun %s" -#: src/Protocol/OStatus.php:1476 +#: src/Protocol/OStatus.php:1472 msgid "following" msgstr "folgen" -#: src/Protocol/OStatus.php:1479 +#: src/Protocol/OStatus.php:1475 #, php-format msgid "%s stopped following %s." msgstr "%s hat aufgehört %s, zu folgen" -#: src/Protocol/OStatus.php:1480 +#: src/Protocol/OStatus.php:1476 msgid "stopped following" msgstr "wird nicht mehr gefolgt" -#: src/Render/FriendicaSmartyEngine.php:53 +#: src/Render/FriendicaSmartyEngine.php:56 #, php-format msgid "The folder %s must be writable by webserver." -msgstr "" +msgstr "Das Verzeichnis %s muss für den Web-Server beschreibbar sein." #: src/Security/Authentication.php:226 msgid "Login failed." @@ -11139,86 +11053,86 @@ msgstr "der Administrator von %s" msgid "thanks" msgstr "danke" -#: src/Util/Temporal.php:167 +#: src/Util/Temporal.php:170 msgid "YYYY-MM-DD or MM-DD" msgstr "YYYY-MM-DD oder MM-DD" -#: src/Util/Temporal.php:275 +#: src/Util/Temporal.php:278 #, php-format msgid "Time zone: %s Change in Settings" msgstr "Zeitzone: %s Änderbar in den Einstellungen" -#: src/Util/Temporal.php:318 +#: src/Util/Temporal.php:321 msgid "never" msgstr "nie" -#: src/Util/Temporal.php:325 +#: src/Util/Temporal.php:328 msgid "less than a second ago" msgstr "vor weniger als einer Sekunde" -#: src/Util/Temporal.php:333 +#: src/Util/Temporal.php:337 msgid "year" msgstr "Jahr" -#: src/Util/Temporal.php:333 +#: src/Util/Temporal.php:337 msgid "years" msgstr "Jahre" -#: src/Util/Temporal.php:334 +#: src/Util/Temporal.php:338 msgid "months" msgstr "Monate" -#: src/Util/Temporal.php:335 +#: src/Util/Temporal.php:339 msgid "weeks" msgstr "Wochen" -#: src/Util/Temporal.php:336 +#: src/Util/Temporal.php:340 msgid "days" msgstr "Tage" -#: src/Util/Temporal.php:337 +#: src/Util/Temporal.php:341 msgid "hour" msgstr "Stunde" -#: src/Util/Temporal.php:337 +#: src/Util/Temporal.php:341 msgid "hours" msgstr "Stunden" -#: src/Util/Temporal.php:338 +#: src/Util/Temporal.php:342 msgid "minute" msgstr "Minute" -#: src/Util/Temporal.php:338 +#: src/Util/Temporal.php:342 msgid "minutes" msgstr "Minuten" -#: src/Util/Temporal.php:339 +#: src/Util/Temporal.php:343 msgid "second" msgstr "Sekunde" -#: src/Util/Temporal.php:339 +#: src/Util/Temporal.php:343 msgid "seconds" msgstr "Sekunden" -#: src/Util/Temporal.php:349 +#: src/Util/Temporal.php:353 #, php-format msgid "in %1$d %2$s" msgstr "in %1$d %2$s" -#: src/Util/Temporal.php:352 +#: src/Util/Temporal.php:356 #, php-format msgid "%1$d %2$s ago" msgstr "%1$d %2$s her" -#: src/Worker/Delivery.php:525 +#: src/Worker/Delivery.php:524 msgid "(no subject)" msgstr "(kein Betreff)" -#: src/Worker/PushSubscription.php:111 +#: src/Worker/PushSubscription.php:110 msgid "Notification from Friendica" msgstr "Benachrichtigung von Friendica" -#: src/Worker/PushSubscription.php:112 +#: src/Worker/PushSubscription.php:111 msgid "Empty Post" msgstr "Leerer Beitrag" @@ -11254,113 +11168,124 @@ msgstr "slackr" msgid "Variations" msgstr "Variationen" -#: view/theme/frio/config.php:142 +#: view/theme/frio/config.php:153 msgid "Light (Accented)" msgstr "Hell (Akzentuiert)" -#: view/theme/frio/config.php:143 +#: view/theme/frio/config.php:154 msgid "Dark (Accented)" msgstr "Dunkel (Akzentuiert)" -#: view/theme/frio/config.php:144 +#: view/theme/frio/config.php:155 msgid "Black (Accented)" msgstr "Schwarz (Akzentuiert)" -#: view/theme/frio/config.php:156 +#: view/theme/frio/config.php:167 msgid "Note" msgstr "Hinweis" -#: view/theme/frio/config.php:156 +#: view/theme/frio/config.php:167 msgid "Check image permissions if all users are allowed to see the image" msgstr "Überprüfe, dass alle Benutzer die Berechtigung haben dieses Bild anzusehen" -#: view/theme/frio/config.php:162 +#: view/theme/frio/config.php:173 msgid "Custom" msgstr "Benutzerdefiniert" -#: view/theme/frio/config.php:163 +#: view/theme/frio/config.php:174 msgid "Legacy" msgstr "Vermächtnis" -#: view/theme/frio/config.php:164 +#: view/theme/frio/config.php:175 msgid "Accented" msgstr "Akzentuiert" -#: view/theme/frio/config.php:165 +#: view/theme/frio/config.php:176 msgid "Select color scheme" msgstr "Farbschema auswählen" -#: view/theme/frio/config.php:166 +#: view/theme/frio/config.php:177 msgid "Select scheme accent" msgstr "Wähle einen Akzent für das Thema" -#: view/theme/frio/config.php:166 +#: view/theme/frio/config.php:177 msgid "Blue" msgstr "Blau" -#: view/theme/frio/config.php:166 +#: view/theme/frio/config.php:177 msgid "Red" msgstr "Rot" -#: view/theme/frio/config.php:166 +#: view/theme/frio/config.php:177 msgid "Purple" msgstr "Violett" -#: view/theme/frio/config.php:166 +#: view/theme/frio/config.php:177 msgid "Green" msgstr "Grün" -#: view/theme/frio/config.php:166 +#: view/theme/frio/config.php:177 msgid "Pink" msgstr "Rosa" -#: view/theme/frio/config.php:167 +#: view/theme/frio/config.php:178 msgid "Copy or paste schemestring" msgstr "Farbschema kopieren oder einfügen" -#: view/theme/frio/config.php:167 +#: view/theme/frio/config.php:178 msgid "" "You can copy this string to share your theme with others. Pasting here " "applies the schemestring" msgstr "Du kannst den String mit den Farbschema Informationen mit anderen Teilen. Wenn du einen neuen Farbschema-String hier einfügst wird er für deine Einstellungen übernommen." -#: view/theme/frio/config.php:168 +#: view/theme/frio/config.php:179 msgid "Navigation bar background color" msgstr "Hintergrundfarbe der Navigationsleiste" -#: view/theme/frio/config.php:169 +#: view/theme/frio/config.php:180 msgid "Navigation bar icon color " msgstr "Icon Farbe in der Navigationsleiste" -#: view/theme/frio/config.php:170 +#: view/theme/frio/config.php:181 msgid "Link color" msgstr "Linkfarbe" -#: view/theme/frio/config.php:171 +#: view/theme/frio/config.php:182 msgid "Set the background color" msgstr "Hintergrundfarbe festlegen" -#: view/theme/frio/config.php:172 +#: view/theme/frio/config.php:183 msgid "Content background opacity" msgstr "Opazität des Hintergrunds von Beiträgen" -#: view/theme/frio/config.php:173 +#: view/theme/frio/config.php:184 msgid "Set the background image" msgstr "Hintergrundbild festlegen" -#: view/theme/frio/config.php:174 +#: view/theme/frio/config.php:185 msgid "Background image style" msgstr "Stil des Hintergrundbildes" -#: view/theme/frio/config.php:179 +#: view/theme/frio/config.php:188 +msgid "Always open Compose page" +msgstr "Immer die Composer Seite öffnen" + +#: view/theme/frio/config.php:188 +msgid "" +"The New Post button always open the Compose page " +"instead of the modal form. When this is disabled, the Compose page can be " +"accessed with a middle click on the link or from the modal." +msgstr "Neue Beiträge werden immer in der Composer Seite anstelle des Dialoges bearbeitet. Ist diese Option deaktiviert, kann die Composer Seite durch einen Klick mit der mittleren Maustaste geöffnet werden." + +#: view/theme/frio/config.php:192 msgid "Login page background image" msgstr "Hintergrundbild der Login-Seite" -#: view/theme/frio/config.php:183 +#: view/theme/frio/config.php:196 msgid "Login page background color" msgstr "Hintergrundfarbe der Login-Seite" -#: view/theme/frio/config.php:183 +#: view/theme/frio/config.php:196 msgid "Leave background image and color empty for theme defaults" msgstr "Wenn die Theme-Vorgaben verwendet werden sollen, lass bitte die Felder für die Hintergrundfarbe und das Hintergrundbild leer." @@ -11408,11 +11333,11 @@ msgstr "Zum Inhalt der Seite gehen" msgid "Back to top" msgstr "Zurück nach Oben" -#: view/theme/frio/theme.php:212 +#: view/theme/frio/theme.php:218 msgid "Guest" msgstr "Gast" -#: view/theme/frio/theme.php:215 +#: view/theme/frio/theme.php:221 msgid "Visitor" msgstr "Besucher" diff --git a/view/lang/de/strings.php b/view/lang/de/strings.php index 8375f7b03..69508c34e 100644 --- a/view/lang/de/strings.php +++ b/view/lang/de/strings.php @@ -521,12 +521,17 @@ $a->strings['You subscribed to one or more tags in this post.'] = 'Du folgst ein $a->strings['Reshared'] = 'Geteilt'; $a->strings['Reshared by %s <%s>'] = 'Geteilt von %s <%s>'; $a->strings['%s is participating in this thread.'] = '%s ist an der Unterhaltung beteiligt.'; +$a->strings['Stored for general reasons'] = 'Aus allgemeinen Gründen aufbewahrt'; $a->strings['Global post'] = 'Globaler Beitrag'; $a->strings['Sent via an relay server'] = 'Über einen Relay-Server gesendet'; $a->strings['Sent via the relay server %s <%s>'] = 'Über den Relay-Server %s <%s> gesendet'; $a->strings['Fetched'] = 'Abgerufen'; $a->strings['Fetched because of %s <%s>'] = 'Wegen %s <%s> abgerufen'; +$a->strings['Stored because of a child post to complete this thread.'] = 'Gespeichert wegen eines untergeordneten Beitrags zur Vervollständigung dieses Themas.'; $a->strings['Local delivery'] = 'Lokale Zustellung'; +$a->strings['Stored because of your activity (like, comment, star, ...)'] = 'Gespeichert aufgrund Ihrer Aktivität (Like, Kommentar, Stern, ...)'; +$a->strings['Distributed'] = 'Verteilt'; +$a->strings['Pushed to us'] = 'Zu uns gepusht'; $a->strings['General Features'] = 'Allgemeine Features'; $a->strings['Photo Location'] = 'Aufnahmeort'; $a->strings['Photo metadata is normally stripped. This extracts the location (if present) prior to stripping metadata and links it to a map.'] = 'Die Foto-Metadaten werden ausgelesen. Dadurch kann der Aufnahmeort (wenn vorhanden) in einer Karte angezeigt werden.'; @@ -553,7 +558,6 @@ $a->strings['Forums'] = 'Foren'; $a->strings['External link to forum'] = 'Externer Link zum Forum'; $a->strings['show less'] = 'weniger anzeigen'; $a->strings['show more'] = 'mehr anzeigen'; -$a->strings['%1$s poked %2$s'] = '%1$s stupste %2$s'; $a->strings['event'] = 'Veranstaltung'; $a->strings['Follow Thread'] = 'Folge der Unterhaltung'; $a->strings['View Status'] = 'Status anschauen'; @@ -565,7 +569,6 @@ $a->strings['Send PM'] = 'Private Nachricht senden'; $a->strings['Block'] = 'Sperren'; $a->strings['Ignore'] = 'Ignorieren'; $a->strings['Languages'] = 'Sprachen'; -$a->strings['Poke'] = 'Anstupsen'; $a->strings['Nothing new here'] = 'Keine Neuigkeiten'; $a->strings['Go back'] = 'Geh zurück'; $a->strings['Clear notifications'] = 'Bereinige Benachrichtigungen'; @@ -812,18 +815,6 @@ $a->strings['Sep'] = 'Sep'; $a->strings['Oct'] = 'Okt'; $a->strings['Nov'] = 'Nov'; $a->strings['Dec'] = 'Dez'; -$a->strings['poke'] = 'anstupsen'; -$a->strings['poked'] = 'stupste'; -$a->strings['ping'] = 'anpingen'; -$a->strings['pinged'] = 'pingte'; -$a->strings['prod'] = 'knuffen'; -$a->strings['prodded'] = 'knuffte'; -$a->strings['slap'] = 'ohrfeigen'; -$a->strings['slapped'] = 'ohrfeigte'; -$a->strings['finger'] = 'befummeln'; -$a->strings['fingered'] = 'befummelte'; -$a->strings['rebuff'] = 'eine Abfuhr erteilen'; -$a->strings['rebuffed'] = 'abfuhrerteilte'; $a->strings['Friendica can\'t display this page at the moment, please contact the administrator.'] = 'Friendica kann die Seite im Moment nicht darstellen. Bitte kontaktiere das Administratoren Team.'; $a->strings['template engine cannot be registered without a name.'] = 'Die Template Engine kann nicht ohne einen Namen registriert werden.'; $a->strings['template engine is not registered!'] = 'Template Engine wurde nicht registriert!'; @@ -1247,6 +1238,29 @@ $a->strings['Also purges all the locally stored content authored by the known co ]; $a->strings['Block reason'] = 'Begründung der Blockierung'; $a->strings['The reason why you blocked this server domain pattern. This reason will be shown publicly in the server information page.'] = 'Warum werden Server die diesem Domainmuster entsprechen geblockt? Die Begründung wird öffentlich auf der Server-Informationsseite sichtbar sein.'; +$a->strings['Error importing pattern file'] = 'Fehler beim Import der Muster Datei'; +$a->strings['Local blocklist replaced with the provided file.'] = 'Lokale Blockliste wurde durch die bereitgestellte Datei ersetzt.'; +$a->strings['%d pattern was added to the local blocklist.'] = [ + 0 => '%d Muster wurde zur lokalen Blockliste hinzugefügt.', + 1 => '%d Muster wurden zur lokalen Blockliste hinzugefügt.', +]; +$a->strings['No pattern was added to the local blocklist.'] = 'Kein Muster wurde zur lokalen Blockliste hinzugefügt.'; +$a->strings['Import a Server Domain Pattern Blocklist'] = 'Server Domain Muster Blockliste importieren'; +$a->strings['

This file can be downloaded from the /friendica path of any Friendica server.

'] = '

Diese Datei kann vom /friendica Pfad auf jedem Friendica Server heruntergeladen werden.

'; +$a->strings['Upload file'] = 'Datei hochladen'; +$a->strings['Patterns to import'] = 'Zu importierende Muster'; +$a->strings['Domain Pattern'] = 'Domain Muster'; +$a->strings['Import Mode'] = 'Importmodus'; +$a->strings['Import Patterns'] = 'Muster importieren'; +$a->strings['%d total pattern'] = [ + 0 => '%dMuster gesamt', + 1 => '%dMuster gesamt', +]; +$a->strings['Server domain pattern blocklist CSV file'] = 'Server Domain Muster Blockliste CSV-Datei'; +$a->strings['Append'] = 'Anhängen'; +$a->strings['Imports patterns from the file that weren\'t already existing in the current blocklist.'] = 'Importiert Muster aus der Datei, die nicht bereits in der aktuellen Blockliste vorhanden waren.'; +$a->strings['Replace'] = 'Ersetzen'; +$a->strings['Replaces the current blocklist by the imported patterns.'] = 'Ersetzt die aktuelle Blockliste durch die importierten Muster.'; $a->strings['Blocked server domain pattern'] = 'Blockierte Server Domain Muster'; $a->strings['Reason for the block'] = 'Begründung für die Blockierung'; $a->strings['Delete server domain pattern'] = 'Server Domain Muster löschen'; @@ -1254,6 +1268,7 @@ $a->strings['Check to delete this entry from the blocklist'] = 'Markieren, um di $a->strings['Server Domain Pattern Blocklist'] = 'Server Domain Muster Blockliste'; $a->strings['This page can be used to define a blocklist of server domain patterns from the federated network that are not allowed to interact with your node. For each domain pattern you should also provide the reason why you block it.'] = 'Auf dieser Seite kannst du Muster definieren mit denen Server Domains aus dem föderierten Netzwerk daran gehindert werden mit deiner Instanz zu interagieren. Es ist ratsam für jedes Muster anzugeben, warum du es zur Blockliste hinzugefügt hast.'; $a->strings['The list of blocked server domain patterns will be made publically available on the /friendica page so that your users and people investigating communication problems can find the reason easily.'] = 'Die Liste der blockierten Domain Muster wird auf der Seite /friendica öffentlich einsehbar gemacht, damit deine Nutzer und Personen, die Kommunikationsprobleme erkunden, die Ursachen einfach finden können.'; +$a->strings['Import server domain pattern blocklist'] = 'Server Domain Muster Blockliste importieren'; $a->strings['Add new entry to the blocklist'] = 'Neuen Eintrag in die Blockliste'; $a->strings['Save changes to the blocklist'] = 'Änderungen der Blockliste speichern'; $a->strings['Current Entries in the Blocklist'] = 'Aktuelle Einträge der Blockliste'; @@ -1276,8 +1291,40 @@ $a->strings['Lock feature %s'] = 'Feature festlegen: %s'; $a->strings['Manage Additional Features'] = 'Zusätzliche Features Verwalten'; $a->strings['Other'] = 'Andere'; $a->strings['unknown'] = 'Unbekannt'; +$a->strings['%2$s total system'] = [ + 0 => '%2$sServer gesamt', + 1 => '%2$s Server gesamt', +]; +$a->strings['%2$s active user last month'] = [ + 0 => '%2$s aktiver Nutzer im letzten Monat', + 1 => '%2$s aktive Nutzer im letzten Monat', +]; +$a->strings['%2$s active user last six months'] = [ + 0 => '%2$s aktive Nutzer im letzten halben Jahr', + 1 => '%2$s aktive Nutzer im letzten halben Jahr', +]; +$a->strings['%2$s registered user'] = [ + 0 => '%2$sregistrierter Nutzer', + 1 => '%2$s registrierte Nutzer', +]; +$a->strings['%2$s locally created post or comment'] = [ + 0 => '%2$slokal erstellter Beitrag oder Kommentar', + 1 => '%2$slokal erstellte Beiträge und Kommentare', +]; +$a->strings['%2$s post per user'] = [ + 0 => '%2$sBeitrag pro Nutzer', + 1 => '%2$sBeiträge pro Nutzer', +]; +$a->strings['%2$s user per system'] = [ + 0 => '%2$sNutzer pro System', + 1 => '%2$sNutzer pro System', +]; $a->strings['This page offers you some numbers to the known part of the federated social network your Friendica node is part of. These numbers are not complete but only reflect the part of the network your node is aware of.'] = 'Diese Seite präsentiert einige Zahlen zu dem bekannten Teil des föderalen sozialen Netzwerks, von dem deine Friendica Installation ein Teil ist. Diese Zahlen sind nicht absolut und reflektieren nur den Teil des Netzwerks, den dein Knoten kennt.'; $a->strings['Federation Statistics'] = 'Föderation Statistik'; +$a->strings['Currently this node is aware of %2$s node (%3$s active users last month, %4$s active users last six months, %5$s registered users in total) from the following platforms:'] = [ + 0 => 'Derzeit kennt dieser Knoten %2$s andere Knoten (mit %3$s aktiven Nutzern im letzten Monat, %4$s aktiven Nutzern im letzten halben Jahr, %5$s registrierten Nutzern insgesamt) von den folgenden Plattformen:', + 1 => 'Derzeit kennt dieser Knoten %2$s andere Knoten (mit %3$s aktiven Nutzern im letzten Monat, %4$s aktiven Nutzern im letzten halben Jahr, %5$s registrierten Nutzern insgesamt) von den folgenden Plattformen:', +]; $a->strings['Item marked for deletion.'] = 'Eintrag wurden zur Löschung markiert'; $a->strings['Delete Item'] = 'Eintrag löschen'; $a->strings['Delete this Item'] = 'Diesen Eintrag löschen'; @@ -1509,6 +1556,8 @@ $a->strings['Temp path'] = 'Temp-Pfad'; $a->strings['If you have a restricted system where the webserver can\'t access the system temp path, enter another path here.'] = 'Solltest du ein eingeschränktes System haben, auf dem der Webserver nicht auf das temp-Verzeichnis des Systems zugreifen kann, setze hier einen anderen Pfad.'; $a->strings['Only search in tags'] = 'Nur in Tags suchen'; $a->strings['On large systems the text search can slow down the system extremely.'] = 'Auf großen Knoten kann die Volltext-Suche das System ausbremsen.'; +$a->strings['Generate counts per contact group when calculating network count'] = 'Erstelle Zählungen je Kontaktgruppe bei der Berechnung der Netzwerkanzahl'; +$a->strings['On systems with users that heavily use contact groups the query can be very expensive.'] = 'Auf Systemen mit Benutzern, die häufig Kontaktgruppen verwenden, kann die Abfrage sehr aufwändig sein.'; $a->strings['Maximum number of parallel workers'] = 'Maximale Anzahl parallel laufender Worker'; $a->strings['On shared hosters set this to %d. On larger systems, values of %d are great. Default value is %d.'] = 'Wenn dein Knoten bei einem Shared Hoster ist, setze diesen Wert auf %d. Auf größeren Systemen funktioniert ein Wert von %d recht gut. Standardeinstellung sind %d.'; $a->strings['Enable fastlane'] = 'Aktiviere Fastlane'; @@ -1680,6 +1729,10 @@ $a->strings['Weekly posting limit of %d post reached. The post was rejected.'] = 0 => 'Das wöchentliche Limit von %d Beitrag wurde erreicht. Die Nachricht wurde verworfen.', 1 => 'Das wöchentliche Limit von %d Beiträgen wurde erreicht. Der Beitrag wurde verworfen.', ]; +$a->strings['Monthly posting limit of %d post reached. The post was rejected.'] = [ + 0 => 'Das monatliche Limit von %d Beitrag wurde erreicht. Der Beitrag wurde verworfen.', + 1 => 'Das monatliche Limit von %d Beiträgen wurde erreicht. Der Beitrag wurde verworfen.', +]; $a->strings['Profile Details'] = 'Profildetails'; $a->strings['Only You Can See This'] = 'Nur du kannst das sehen'; $a->strings['Scheduled Posts'] = 'Geplante Beiträge'; @@ -1757,12 +1810,6 @@ $a->strings['Contact (%s)'] = [ 0 => 'Kontakt (%s)', 1 => 'Kontakte (%s)', ]; -$a->strings['Error while sending poke, please retry.'] = 'Beim Versenden des Stupsers ist ein Fehler aufgetreten. Bitte erneut versuchen.'; -$a->strings['You must be logged in to use this module.'] = 'Du musst eingeloggt sein, um dieses Modul benutzen zu können.'; -$a->strings['Poke/Prod'] = 'Anstupsen'; -$a->strings['poke, prod or do other things to somebody'] = 'Stupse Leute an oder mache anderes mit ihnen'; -$a->strings['Choose what you wish to do to recipient'] = 'Was willst du mit dem Empfänger machen:'; -$a->strings['Make this post private'] = 'Diesen Beitrag privat machen'; $a->strings['Failed to update contact record.'] = 'Aktualisierung der Kontaktdaten fehlgeschlagen.'; $a->strings['Contact has been unblocked'] = 'Kontakt wurde wieder freigegeben'; $a->strings['Contact has been blocked'] = 'Kontakt wurde blockiert'; @@ -1822,6 +1869,7 @@ $a->strings['Contact is being deleted.'] = 'Kontakt wurde gelöscht.'; $a->strings['Follow was successfully revoked.'] = 'Folgen wurde erfolgreich widerrufen.'; $a->strings['Do you really want to revoke this contact\'s follow? This cannot be undone and they will have to manually follow you back again.'] = 'Willst du das Folgen dieses Kontakt wirklich widerrufen? Dies kann nicht rückgängig gemacht werden und der Kontakt muss Ihnen manuell wieder folgen.'; $a->strings['Yes'] = 'Ja'; +$a->strings['This community stream shows all public posts received by this node. They may not reflect the opinions of this node’s users.'] = 'Diese Gemeinschaftsseite zeigt alle öffentlichen Beiträge, die auf diesem Knoten eingegangen sind. Der Inhalt entspricht nicht zwingend der Meinung der Nutzer dieses Servers.'; $a->strings['Local Community'] = 'Lokale Gemeinschaft'; $a->strings['Posts from local users on this server'] = 'Beiträge von Nutzern dieses Servers'; $a->strings['Global Community'] = 'Globale Gemeinschaft'; @@ -1830,7 +1878,6 @@ $a->strings['Own Contacts'] = 'Eigene Kontakte'; $a->strings['Include'] = 'Einschließen'; $a->strings['Hide'] = 'Verbergen'; $a->strings['No results.'] = 'Keine Ergebnisse.'; -$a->strings['This community stream shows all public posts received by this node. They may not reflect the opinions of this node’s users.'] = 'Diese Gemeinschaftsseite zeigt alle öffentlichen Beiträge, die auf diesem Knoten eingegangen sind. Der Inhalt entspricht nicht zwingend der Meinung der Nutzer dieses Servers.'; $a->strings['Community option not available.'] = 'Optionen für die Gemeinschaftsseite nicht verfügbar.'; $a->strings['Not available.'] = 'Nicht verfügbar.'; $a->strings['No such group'] = 'Es gibt keine solche Gruppe'; @@ -1919,8 +1966,8 @@ $a->strings['No entries (some entries may be hidden).'] = 'Keine Einträge (eini $a->strings['Find on this site'] = 'Auf diesem Server suchen'; $a->strings['Results for:'] = 'Ergebnisse für:'; $a->strings['Site Directory'] = 'Verzeichnis'; -$a->strings['Item was not removed'] = 'Item wurde nicht entfernt'; $a->strings['Item was not deleted'] = 'Item wurde nicht gelöscht'; +$a->strings['Item was not removed'] = 'Item wurde nicht entfernt'; $a->strings['- select -'] = '- auswählen -'; $a->strings['Suggested contact not found.'] = 'Vorgeschlagener Kontakt wurde nicht gefunden.'; $a->strings['Friend suggestion sent.'] = 'Kontaktvorschlag gesendet.'; @@ -1930,6 +1977,7 @@ $a->strings['Installed addons/apps:'] = 'Installierte Apps und Addons'; $a->strings['No installed addons/apps'] = 'Es sind keine Addons oder Apps installiert'; $a->strings['Read about the Terms of Service of this node.'] = 'Erfahre mehr über die Nutzungsbedingungen dieses Knotens.'; $a->strings['On this server the following remote servers are blocked.'] = 'Auf diesem Server werden die folgenden, entfernten Server blockiert.'; +$a->strings['Download this list in CSV format'] = 'Liste im CSV-Format herunterladen'; $a->strings['This is Friendica, version %s that is running at the web location %s. The database version is %s, the post update version is %s.'] = 'Diese Friendica-Instanz verwendet die Version %s, sie ist unter der folgenden Adresse im Web zu finden %s. Die Datenbankversion ist %s und die Post-Update-Version %s.'; $a->strings['Please visit Friendi.ca to learn more about the Friendica project.'] = 'Bitte besuche Friendi.ca, um mehr über das Friendica-Projekt zu erfahren.'; $a->strings['Bug reports and issues: please visit'] = 'Probleme oder Fehler gefunden? Bitte besuche'; @@ -2022,6 +2070,7 @@ $a->strings['Visibility'] = 'Sichtbarkeit'; $a->strings['Clear the location'] = 'Ort löschen'; $a->strings['Location services are unavailable on your device'] = 'Ortungsdienste sind auf Ihrem Gerät nicht verfügbar'; $a->strings['Location services are disabled. Please check the website\'s permissions on your device'] = 'Ortungsdienste sind deaktiviert. Bitte überprüfe die Berechtigungen der Website auf deinem Gerät'; +$a->strings['You can make this page always open when you use the New Post button in the Theme Customization settings.'] = 'Wenn du magst, kannst du unter den Benutzerdefinierte Theme-Einstellungen einstellen, dass diese Seite immer geöffnet wird, wenn du den "Neuer Beitrag" Button verwendest.'; $a->strings['Unable to follow this item.'] = 'Konnte dem Beitrag nicht folgen.'; $a->strings['System down for maintenance'] = 'System zur Wartung abgeschaltet'; $a->strings['This Friendica node is currently in maintenance mode, either automatically because it is self-updating or manually by the node administrator. This condition should be temporary, please come back in a few minutes.'] = 'Diese Friendica Instanz befindet sich derzeit im Wartungsmodus, entweder aufgrund von automatischen Updateprozessen oder weil die Administratoren der Instanz den Wartungsmodus aktiviert haben. Dies sollte ein vorübergehender Zustand sein. Bitte versuche es in ein paar Minuten erneut.'; @@ -2135,6 +2184,7 @@ $a->strings['Friend/Connection Request'] = 'Kontaktanfrage'; $a->strings['Enter your Webfinger address (user@domain.tld) or profile URL here. If this isn\'t supported by your system, you have to subscribe to %s or %s directly on your system.'] = 'Gib entweder deine Webfinger- (user@domain.tld) oder die Profil-Adresse an. Wenn dies von deinem System nicht unterstützt wird, folge bitte %s oder %s direkt von deinem System. '; $a->strings['If you are not yet a member of the free social web, follow this link to find a public Friendica node and join us today.'] = 'Solltest du das freie Soziale Netzwerk noch nicht benutzen, kannst du diesem Link folgen um eine öffentliche Friendica Instanz zu finden um noch heute dem Netzwerk beizutreten.'; $a->strings['Your Webfinger address or profile URL:'] = 'Deine Webfinger Adresse oder Profil-URL'; +$a->strings['You must be logged in to use this module.'] = 'Du musst eingeloggt sein, um dieses Modul benutzen zu können.'; $a->strings['Only logged in users are permitted to perform a search.'] = 'Nur eingeloggten Benutzern ist das Suchen gestattet.'; $a->strings['Only one search per minute is permitted for not logged in users.'] = 'Es ist nur eine Suchanfrage pro Minute für nicht eingeloggte Benutzer gestattet.'; $a->strings['Items tagged with: %s'] = 'Beiträge, die mit %s getaggt sind'; @@ -2157,8 +2207,10 @@ $a->strings['OpenID protocol error. No ID returned'] = 'OpenID Protokollfehler. $a->strings['Account not found. Please login to your existing account to add the OpenID to it.'] = 'Nutzerkonto nicht gefunden. Bitte melde dich an und füge die OpenID zu deinem Konto hinzu.'; $a->strings['Account not found. Please register a new account or login to your existing account to add the OpenID to it.'] = 'Nutzerkonto nicht gefunden. Bitte registriere ein neues Konto oder melde dich mit einem existierendem Konto an um diene OpenID hinzuzufügen.'; $a->strings['Passwords do not match.'] = 'Die Passwörter stimmen nicht überein.'; +$a->strings['Password does not need changing.'] = 'Passwort muss nicht geändert werden.'; $a->strings['Password unchanged.'] = 'Passwort unverändert.'; $a->strings['Password Too Long'] = 'Passwort ist zu lang'; +$a->strings['Since version 2022.09, we\'ve realized that any password longer than 72 characters is truncated during hashing. To prevent any confusion about this behavior, please update your password to be fewer or equal to 72 characters.'] = 'Mit der Version 2022.09 haben wir festgestellt, dass jedes Passwort, das länger als 72 Zeichen ist, beim Hashing abgeschnitten wird. Um Verwirrung über dieses Verhalten zu vermeiden, aktualisieren Sie Ihr Passwort bitte so, dass es höchstens 72 Zeichen hat.'; $a->strings['Update Password'] = 'Passwort aktualisieren'; $a->strings['Current Password:'] = 'Aktuelles Passwort:'; $a->strings['Your current password to confirm the changes'] = 'Dein aktuelles Passwort um die Änderungen zu bestätigen'; @@ -2267,7 +2319,6 @@ $a->strings['Someone writes a followup comment'] = '– jemand auch einen Kommen $a->strings['You receive a private message'] = '– du eine private Nachricht erhältst'; $a->strings['You receive a friend suggestion'] = '– du eine Empfehlung erhältst'; $a->strings['You are tagged in a post'] = '– du in einem Beitrag erwähnt wirst'; -$a->strings['You are poked/prodded/etc. in a post'] = '– du von jemandem angestupst oder sonstwie behandelt wirst'; $a->strings['Create a desktop notification when:'] = 'Benachrichtigungen anzeigen wenn:'; $a->strings['Someone tagged you'] = 'Dich jemand erwähnt'; $a->strings['Someone directly commented on your post'] = 'Jemand einen Beitrag von dir kommentiert hat'; @@ -2580,9 +2631,6 @@ $a->strings['Please visit %s to view and/or reply to the conversation.'] = 'Bitt $a->strings['%s %s posted to your profile wall'] = '%s%s hat auf deine Pinnwand gepostet'; $a->strings['%1$s posted to your profile wall at %2$s'] = '%1$s schrieb um %2$s auf Deine Pinnwand'; $a->strings['%1$s posted to [url=%2$s]your wall[/url]'] = '%1$s hat etwas auf [url=%2$s]Deiner Pinnwand[/url] gepostet'; -$a->strings['%1$s %2$s poked you'] = '%1$s%2$shat dich angestubst'; -$a->strings['%1$s poked you at %2$s'] = '%1$s hat dich auf %2$s angestupst'; -$a->strings['%1$s [url=%2$s]poked you[/url].'] = '%1$s [url=%2$s]hat dich angestupst[/url].'; $a->strings['%s Introduction received'] = '%sVorstellung erhalten'; $a->strings['You\'ve received an introduction from \'%1$s\' at %2$s'] = 'Du hast eine Kontaktanfrage von \'%1$s\' auf %2$s erhalten'; $a->strings['You\'ve received [url=%1$s]an introduction[/url] from %2$s.'] = 'Du hast eine [url=%1$s]Kontaktanfrage[/url] von %2$s erhalten.'; @@ -2677,6 +2725,7 @@ $a->strings['%s is now following %s.'] = '%s folgt nun %s'; $a->strings['following'] = 'folgen'; $a->strings['%s stopped following %s.'] = '%s hat aufgehört %s, zu folgen'; $a->strings['stopped following'] = 'wird nicht mehr gefolgt'; +$a->strings['The folder %s must be writable by webserver.'] = 'Das Verzeichnis %s muss für den Web-Server beschreibbar sein.'; $a->strings['Login failed.'] = 'Anmeldung fehlgeschlagen.'; $a->strings['Login failed. Please check your credentials.'] = 'Anmeldung fehlgeschlagen. Bitte überprüfe deine Angaben.'; $a->strings['Welcome %s'] = 'Willkommen %s'; @@ -2737,6 +2786,8 @@ $a->strings['Set the background color'] = 'Hintergrundfarbe festlegen'; $a->strings['Content background opacity'] = 'Opazität des Hintergrunds von Beiträgen'; $a->strings['Set the background image'] = 'Hintergrundbild festlegen'; $a->strings['Background image style'] = 'Stil des Hintergrundbildes'; +$a->strings['Always open Compose page'] = 'Immer die Composer Seite öffnen'; +$a->strings['The New Post button always open the Compose page instead of the modal form. When this is disabled, the Compose page can be accessed with a middle click on the link or from the modal.'] = 'Neue Beiträge werden immer in der Composer Seite anstelle des Dialoges bearbeitet. Ist diese Option deaktiviert, kann die Composer Seite durch einen Klick mit der mittleren Maustaste geöffnet werden.'; $a->strings['Login page background image'] = 'Hintergrundbild der Login-Seite'; $a->strings['Login page background color'] = 'Hintergrundfarbe der Login-Seite'; $a->strings['Leave background image and color empty for theme defaults'] = 'Wenn die Theme-Vorgaben verwendet werden sollen, lass bitte die Felder für die Hintergrundfarbe und das Hintergrundbild leer.'; From 9bac8153aef970c76d1720e4fda629ef95e02b68 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 17 Oct 2022 09:24:32 +0000 Subject: [PATCH 16/27] Some more constants are moved to their specific classes --- boot.php | 17 ----------- src/Content/Nav.php | 5 ++-- src/Core/Update.php | 8 +++-- src/Module/Admin/Site.php | 14 ++++----- src/Module/Api/GNUSocial/GNUSocial/Config.php | 1 - src/Module/Conversation/Community.php | 29 ++++++++++++++----- 6 files changed, 36 insertions(+), 38 deletions(-) diff --git a/boot.php b/boot.php index b90c1fb2e..6b078f7c9 100644 --- a/boot.php +++ b/boot.php @@ -32,8 +32,6 @@ use Friendica\Model\Contact; define('FRIENDICA_PLATFORM', 'Friendica'); define('FRIENDICA_CODENAME', 'Giant Rhubarb'); define('FRIENDICA_VERSION', '2022.12-dev'); -define('DFRN_PROTOCOL_VERSION', '2.23'); -define('NEW_TABLE_STRUCTURE_VERSION', 1288); /** * Constant with a HTML line break. @@ -44,21 +42,6 @@ define('NEW_TABLE_STRUCTURE_VERSION', 1288); */ define('EOL', "
\r\n"); -/** - * @name CP - * - * Type of the community page - * @{ - */ -define('CP_NO_INTERNAL_COMMUNITY', -2); -define('CP_NO_COMMUNITY_PAGE', -1); -define('CP_USERS_ON_SERVER', 0); -define('CP_GLOBAL_COMMUNITY', 1); -define('CP_USERS_AND_GLOBAL', 2); -/** - * @} - */ - /** * @name Gravity * diff --git a/src/Content/Nav.php b/src/Content/Nav.php index 77f068863..6861d69e8 100644 --- a/src/Content/Nav.php +++ b/src/Content/Nav.php @@ -30,6 +30,7 @@ use Friendica\DI; use Friendica\Model\Contact; use Friendica\Model\Profile; use Friendica\Model\User; +use Friendica\Module\Conversation\Community; class Nav { @@ -251,8 +252,8 @@ class Nav } } - if ((local_user() || DI::config()->get('system', 'community_page_style') != CP_NO_COMMUNITY_PAGE) && - !(DI::config()->get('system', 'community_page_style') == CP_NO_INTERNAL_COMMUNITY)) { + if ((local_user() || DI::config()->get('system', 'community_page_style') != Community::DISABLED_VISITOR) && + !(DI::config()->get('system', 'community_page_style') == Community::DISABLED)) { $nav['community'] = ['community', DI::l10n()->t('Community'), '', DI::l10n()->t('Conversations on this and other servers')]; } diff --git a/src/Core/Update.php b/src/Core/Update.php index ad5b31760..5f4251720 100644 --- a/src/Core/Update.php +++ b/src/Core/Update.php @@ -35,6 +35,8 @@ class Update const SUCCESS = 0; const FAILED = 1; + const NEW_TABLE_STRUCTURE_VERSION = 1288; + /** * Function to check if the Database structure needs an update. * @@ -63,7 +65,7 @@ class Update } // We don't support upgrading from very old versions anymore - if ($build < NEW_TABLE_STRUCTURE_VERSION) { + if ($build < self::NEW_TABLE_STRUCTURE_VERSION) { $error = DI::l10n()->t('Updates from version %s are not supported. Please update at least to version 2021.01 and wait until the postupdate finished version 1383.', $build); if (DI::mode()->getExecutor() == Mode::INDEX) { die($error); @@ -73,8 +75,8 @@ class Update } // The postupdate has to completed version 1288 for the new post views to take over - $postupdate = DI::config()->get('system', 'post_update_version', NEW_TABLE_STRUCTURE_VERSION); - if ($postupdate < NEW_TABLE_STRUCTURE_VERSION) { + $postupdate = DI::config()->get('system', 'post_update_version', self::NEW_TABLE_STRUCTURE_VERSION); + if ($postupdate < self::NEW_TABLE_STRUCTURE_VERSION) { $error = DI::l10n()->t('Updates from postupdate version %s are not supported. Please update at least to version 2021.01 and wait until the postupdate finished version 1383.', $postupdate); if (DI::mode()->getExecutor() == Mode::INDEX) { die($error); diff --git a/src/Module/Admin/Site.php b/src/Module/Admin/Site.php index 37d8ed040..011e3c411 100644 --- a/src/Module/Admin/Site.php +++ b/src/Module/Admin/Site.php @@ -22,7 +22,6 @@ namespace Friendica\Module\Admin; use Friendica\App; -use Friendica\Core\Relocate; use Friendica\Core\Renderer; use Friendica\Core\Search; use Friendica\Core\System; @@ -33,12 +32,11 @@ use Friendica\DI; use Friendica\Model\Contact; use Friendica\Model\User; use Friendica\Module\BaseAdmin; +use Friendica\Module\Conversation\Community; use Friendica\Module\Register; use Friendica\Protocol\Relay; use Friendica\Util\BasePath; use Friendica\Util\EMailer\MailBuilder; -use Friendica\Util\Strings; -use Friendica\Worker\Delivery; require_once __DIR__ . '/../../../boot.php'; @@ -364,11 +362,11 @@ class Site extends BaseAdmin /* Community page style */ $community_page_style_choices = [ - CP_NO_INTERNAL_COMMUNITY => DI::l10n()->t('No community page for local users'), - CP_NO_COMMUNITY_PAGE => DI::l10n()->t('No community page'), - CP_USERS_ON_SERVER => DI::l10n()->t('Public postings from users of this site'), - CP_GLOBAL_COMMUNITY => DI::l10n()->t('Public postings from the federated network'), - CP_USERS_AND_GLOBAL => DI::l10n()->t('Public postings from local users and the federated network') + Community::DISABLED => DI::l10n()->t('No community page'), + Community::DISABLED_VISITOR => DI::l10n()->t('No community page for visitors'), + Community::LOCAL => DI::l10n()->t('Public postings from users of this site'), + Community::GLOBAL => DI::l10n()->t('Public postings from the federated network'), + Community::LOCAL_AND_GLOBAL => DI::l10n()->t('Public postings from local users and the federated network') ]; /* get user names to make the install a personal install of X */ diff --git a/src/Module/Api/GNUSocial/GNUSocial/Config.php b/src/Module/Api/GNUSocial/GNUSocial/Config.php index b0325f47a..75c70ce06 100644 --- a/src/Module/Api/GNUSocial/GNUSocial/Config.php +++ b/src/Module/Api/GNUSocial/GNUSocial/Config.php @@ -55,7 +55,6 @@ class Config extends BaseApi 'friendica' => [ 'FRIENDICA_PLATFORM' => FRIENDICA_PLATFORM, 'FRIENDICA_VERSION' => FRIENDICA_VERSION, - 'DFRN_PROTOCOL_VERSION' => DFRN_PROTOCOL_VERSION, 'DB_UPDATE_VERSION' => DB_UPDATE_VERSION, ] ], diff --git a/src/Module/Conversation/Community.php b/src/Module/Conversation/Community.php index 8d73f825f..3ba95e1ef 100644 --- a/src/Module/Conversation/Community.php +++ b/src/Module/Conversation/Community.php @@ -40,6 +40,21 @@ use Friendica\Network\HTTPException; class Community extends BaseModule { + /** + * @name CP + * + * Type of the community page + * @{ + */ + const DISABLED = -2; + const DISABLED_VISITOR = -1; + const LOCAL = 0; + const GLOBAL = 1; + const LOCAL_AND_GLOBAL = 2; + /** + * @} + */ + protected static $page_style; protected static $content; protected static $accountTypeString; @@ -69,7 +84,7 @@ class Community extends BaseModule if (empty($_GET['mode']) || ($_GET['mode'] != 'raw')) { $tabs = []; - if ((Session::isAuthenticated() || in_array(self::$page_style, [CP_USERS_AND_GLOBAL, CP_USERS_ON_SERVER])) && empty(DI::config()->get('system', 'singleuser'))) { + if ((Session::isAuthenticated() || in_array(self::$page_style, [self::LOCAL_AND_GLOBAL, self::LOCAL])) && empty(DI::config()->get('system', 'singleuser'))) { $tabs[] = [ 'label' => DI::l10n()->t('Local Community'), 'url' => 'community/local', @@ -80,7 +95,7 @@ class Community extends BaseModule ]; } - if (Session::isAuthenticated() || in_array(self::$page_style, [CP_USERS_AND_GLOBAL, CP_GLOBAL_COMMUNITY])) { + if (Session::isAuthenticated() || in_array(self::$page_style, [self::LOCAL_AND_GLOBAL, self::GLOBAL])) { $tabs[] = [ 'label' => DI::l10n()->t('Global Community'), 'url' => 'community/global', @@ -177,7 +192,7 @@ class Community extends BaseModule self::$page_style = DI::config()->get('system', 'community_page_style'); - if (self::$page_style == CP_NO_INTERNAL_COMMUNITY) { + if (self::$page_style == self::DISABLED) { throw new HTTPException\ForbiddenException(DI::l10n()->t('Access denied.')); } @@ -191,7 +206,7 @@ class Community extends BaseModule self::$content = 'global'; } else { // When only the global community is allowed, we use this as default - self::$content = self::$page_style == CP_GLOBAL_COMMUNITY ? 'global' : 'local'; + self::$content = self::$page_style == self::GLOBAL ? 'global' : 'local'; } } @@ -201,14 +216,14 @@ class Community extends BaseModule // Check if we are allowed to display the content to visitors if (!Session::isAuthenticated()) { - $available = self::$page_style == CP_USERS_AND_GLOBAL; + $available = self::$page_style == self::LOCAL_AND_GLOBAL; if (!$available) { - $available = (self::$page_style == CP_USERS_ON_SERVER) && (self::$content == 'local'); + $available = (self::$page_style == self::LOCAL) && (self::$content == 'local'); } if (!$available) { - $available = (self::$page_style == CP_GLOBAL_COMMUNITY) && (self::$content == 'global'); + $available = (self::$page_style == self::GLOBAL) && (self::$content == 'global'); } if (!$available) { From b1de40cb423660fefc08b541dd8bc6930158f697 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 17 Oct 2022 09:33:29 +0000 Subject: [PATCH 17/27] Updated messages.po --- view/lang/C/messages.po | 620 ++++++++++++++++++++-------------------- 1 file changed, 310 insertions(+), 310 deletions(-) diff --git a/view/lang/C/messages.po b/view/lang/C/messages.po index eed528689..33b83ca21 100644 --- a/view/lang/C/messages.po +++ b/view/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 2022.12-dev\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-16 12:38-0400\n" +"POT-Creation-Date: 2022-10-17 09:33+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -19,7 +19,7 @@ msgstr "" #: mod/cal.php:46 mod/cal.php:50 mod/follow.php:39 mod/redir.php:36 -#: mod/redir.php:177 src/Module/Conversation/Community.php:181 +#: mod/redir.php:177 src/Module/Conversation/Community.php:196 #: src/Module/Debug/ItemBody.php:38 src/Module/Diaspora/Receive.php:57 #: src/Module/Item/Follow.php:42 src/Module/Item/Ignore.php:41 #: src/Module/Item/Pin.php:42 src/Module/Item/Pin.php:57 @@ -43,8 +43,8 @@ msgstr "" msgid "Access to this profile has been restricted." msgstr "" -#: mod/cal.php:243 mod/events.php:374 src/Content/Nav.php:196 -#: src/Content/Nav.php:260 src/Module/BaseProfile.php:84 +#: mod/cal.php:243 mod/events.php:374 src/Content/Nav.php:197 +#: src/Content/Nav.php:261 src/Module/BaseProfile.php:84 #: src/Module/BaseProfile.php:95 view/theme/frio/theme.php:240 #: view/theme/frio/theme.php:244 msgid "Events" @@ -105,7 +105,7 @@ msgid "calendar" msgstr "" #: mod/display.php:143 mod/photos.php:802 -#: src/Module/Conversation/Community.php:175 src/Module/Directory.php:49 +#: src/Module/Conversation/Community.php:190 src/Module/Directory.php:49 #: src/Module/Search/Index.php:65 msgid "Public access denied." msgstr "" @@ -119,7 +119,7 @@ msgid "The feed for this item is unavailable." msgstr "" #: mod/editpost.php:38 mod/events.php:217 mod/follow.php:56 mod/follow.php:130 -#: mod/item.php:181 mod/item.php:186 mod/item.php:865 mod/message.php:69 +#: mod/item.php:182 mod/item.php:187 mod/item.php:866 mod/message.php:69 #: mod/message.php:111 mod/notes.php:44 mod/ostatus_subscribe.php:33 #: mod/photos.php:160 mod/photos.php:891 mod/repair_ostatus.php:31 #: mod/settings.php:40 mod/settings.php:50 mod/settings.php:156 @@ -426,7 +426,7 @@ msgstr "" msgid "Basic" msgstr "" -#: mod/events.php:517 src/Module/Admin/Site.php:441 src/Module/Contact.php:477 +#: mod/events.php:517 src/Module/Admin/Site.php:439 src/Module/Contact.php:477 #: src/Module/Profile/Profile.php:249 msgid "Advanced" msgstr "" @@ -435,7 +435,7 @@ msgstr "" msgid "Failed to remove event" msgstr "" -#: mod/fbrowser.php:61 src/Content/Nav.php:194 src/Module/BaseProfile.php:64 +#: mod/fbrowser.php:61 src/Content/Nav.php:195 src/Module/BaseProfile.php:64 #: view/theme/frio/theme.php:238 msgid "Photos" msgstr "" @@ -515,27 +515,27 @@ msgstr "" msgid "The contact could not be added." msgstr "" -#: mod/item.php:131 mod/item.php:135 +#: mod/item.php:132 mod/item.php:136 msgid "Unable to locate original post." msgstr "" -#: mod/item.php:337 mod/item.php:342 +#: mod/item.php:338 mod/item.php:343 msgid "Empty post discarded." msgstr "" -#: mod/item.php:677 +#: mod/item.php:678 msgid "Post updated." msgstr "" -#: mod/item.php:687 mod/item.php:692 +#: mod/item.php:688 mod/item.php:693 msgid "Item wasn't stored." msgstr "" -#: mod/item.php:703 +#: mod/item.php:704 msgid "Item couldn't be fetched." msgstr "" -#: mod/item.php:843 src/Module/Admin/Themes/Details.php:39 +#: mod/item.php:844 src/Module/Admin/Themes/Details.php:39 #: src/Module/Admin/Themes/Index.php:59 src/Module/Debug/ItemBody.php:42 #: src/Module/Debug/ItemBody.php:57 msgid "Item not found." @@ -691,7 +691,7 @@ msgstr "" msgid "Profile Match" msgstr "" -#: mod/message.php:46 mod/message.php:126 src/Content/Nav.php:288 +#: mod/message.php:46 mod/message.php:126 src/Content/Nav.php:289 msgid "New Message" msgstr "" @@ -717,7 +717,7 @@ msgstr "" msgid "Discard" msgstr "" -#: mod/message.php:133 src/Content/Nav.php:285 view/theme/frio/theme.php:245 +#: mod/message.php:133 src/Content/Nav.php:286 view/theme/frio/theme.php:245 msgid "Messages" msgstr "" @@ -1191,7 +1191,7 @@ msgstr "" msgid "Name" msgstr "" -#: mod/settings.php:177 src/Content/Nav.php:214 +#: mod/settings.php:177 src/Content/Nav.php:215 msgid "Home Page" msgstr "" @@ -1206,7 +1206,7 @@ msgstr "" #: mod/settings.php:205 mod/settings.php:237 mod/settings.php:268 #: mod/settings.php:352 src/Module/Admin/Addons/Index.php:69 #: src/Module/Admin/Features.php:87 src/Module/Admin/Logs/Settings.php:81 -#: src/Module/Admin/Site.php:436 src/Module/Admin/Themes/Index.php:113 +#: src/Module/Admin/Site.php:434 src/Module/Admin/Themes/Index.php:113 #: src/Module/Admin/Tos.php:83 src/Module/Settings/Account.php:563 #: src/Module/Settings/Delegation.php:170 src/Module/Settings/Display.php:201 msgid "Save Settings" @@ -1389,7 +1389,7 @@ msgstr "" msgid "Action after import:" msgstr "" -#: mod/settings.php:350 src/Content/Nav.php:282 +#: mod/settings.php:350 src/Content/Nav.php:283 msgid "Mark as seen" msgstr "" @@ -2274,7 +2274,7 @@ msgstr "" msgid "Display membership date in profile" msgstr "" -#: src/Content/ForumManager.php:151 src/Content/Nav.php:241 +#: src/Content/ForumManager.php:151 src/Content/Nav.php:242 #: src/Content/Text/HTML.php:903 src/Content/Widget.php:524 msgid "Forums" msgstr "" @@ -2347,101 +2347,101 @@ msgstr "" msgid "Languages" msgstr "" -#: src/Content/Nav.php:90 +#: src/Content/Nav.php:91 msgid "Nothing new here" msgstr "" -#: src/Content/Nav.php:94 src/Module/Special/HTTPException.php:50 +#: src/Content/Nav.php:95 src/Module/Special/HTTPException.php:50 msgid "Go back" msgstr "" -#: src/Content/Nav.php:95 +#: src/Content/Nav.php:96 msgid "Clear notifications" msgstr "" -#: src/Content/Nav.php:96 src/Content/Text/HTML.php:890 +#: src/Content/Nav.php:97 src/Content/Text/HTML.php:890 msgid "@name, !forum, #tags, content" msgstr "" -#: src/Content/Nav.php:185 src/Module/Security/Login.php:158 +#: src/Content/Nav.php:186 src/Module/Security/Login.php:158 msgid "Logout" msgstr "" -#: src/Content/Nav.php:185 +#: src/Content/Nav.php:186 msgid "End this session" msgstr "" -#: src/Content/Nav.php:187 src/Module/Bookmarklet.php:44 +#: src/Content/Nav.php:188 src/Module/Bookmarklet.php:44 #: src/Module/Security/Login.php:159 msgid "Login" msgstr "" -#: src/Content/Nav.php:187 +#: src/Content/Nav.php:188 msgid "Sign in" msgstr "" -#: src/Content/Nav.php:192 src/Module/BaseProfile.php:56 +#: src/Content/Nav.php:193 src/Module/BaseProfile.php:56 #: src/Module/Contact.php:436 src/Module/Contact/Profile.php:380 #: src/Module/Settings/TwoFactor/Index.php:120 view/theme/frio/theme.php:236 msgid "Status" msgstr "" -#: src/Content/Nav.php:192 src/Content/Nav.php:275 +#: src/Content/Nav.php:193 src/Content/Nav.php:276 #: view/theme/frio/theme.php:236 msgid "Your posts and conversations" msgstr "" -#: src/Content/Nav.php:193 src/Module/BaseProfile.php:48 +#: src/Content/Nav.php:194 src/Module/BaseProfile.php:48 #: src/Module/BaseSettings.php:55 src/Module/Contact.php:460 #: src/Module/Contact/Profile.php:382 src/Module/Profile/Profile.php:241 #: src/Module/Welcome.php:57 view/theme/frio/theme.php:237 msgid "Profile" msgstr "" -#: src/Content/Nav.php:193 view/theme/frio/theme.php:237 +#: src/Content/Nav.php:194 view/theme/frio/theme.php:237 msgid "Your profile page" msgstr "" -#: src/Content/Nav.php:194 view/theme/frio/theme.php:238 +#: src/Content/Nav.php:195 view/theme/frio/theme.php:238 msgid "Your photos" msgstr "" -#: src/Content/Nav.php:195 src/Module/BaseProfile.php:72 +#: src/Content/Nav.php:196 src/Module/BaseProfile.php:72 #: src/Module/BaseProfile.php:75 src/Module/Contact.php:452 #: view/theme/frio/theme.php:239 msgid "Media" msgstr "" -#: src/Content/Nav.php:195 view/theme/frio/theme.php:239 +#: src/Content/Nav.php:196 view/theme/frio/theme.php:239 msgid "Your postings with media" msgstr "" -#: src/Content/Nav.php:196 view/theme/frio/theme.php:240 +#: src/Content/Nav.php:197 view/theme/frio/theme.php:240 msgid "Your events" msgstr "" -#: src/Content/Nav.php:197 +#: src/Content/Nav.php:198 msgid "Personal notes" msgstr "" -#: src/Content/Nav.php:197 +#: src/Content/Nav.php:198 msgid "Your personal notes" msgstr "" -#: src/Content/Nav.php:214 src/Content/Nav.php:275 +#: src/Content/Nav.php:215 src/Content/Nav.php:276 msgid "Home" msgstr "" -#: src/Content/Nav.php:218 src/Module/Register.php:168 +#: src/Content/Nav.php:219 src/Module/Register.php:168 #: src/Module/Security/Login.php:124 msgid "Register" msgstr "" -#: src/Content/Nav.php:218 +#: src/Content/Nav.php:219 msgid "Create an account" msgstr "" -#: src/Content/Nav.php:224 src/Module/Help.php:67 +#: src/Content/Nav.php:225 src/Module/Help.php:67 #: src/Module/Settings/TwoFactor/AppSpecific.php:127 #: src/Module/Settings/TwoFactor/Index.php:119 #: src/Module/Settings/TwoFactor/Recovery.php:105 @@ -2449,158 +2449,158 @@ msgstr "" msgid "Help" msgstr "" -#: src/Content/Nav.php:224 +#: src/Content/Nav.php:225 msgid "Help and documentation" msgstr "" -#: src/Content/Nav.php:228 +#: src/Content/Nav.php:229 msgid "Apps" msgstr "" -#: src/Content/Nav.php:228 +#: src/Content/Nav.php:229 msgid "Addon applications, utilities, games" msgstr "" -#: src/Content/Nav.php:232 src/Content/Text/HTML.php:888 +#: src/Content/Nav.php:233 src/Content/Text/HTML.php:888 #: src/Module/Admin/Logs/View.php:87 src/Module/Search/Index.php:112 msgid "Search" msgstr "" -#: src/Content/Nav.php:232 +#: src/Content/Nav.php:233 msgid "Search site content" msgstr "" -#: src/Content/Nav.php:235 src/Content/Text/HTML.php:897 +#: src/Content/Nav.php:236 src/Content/Text/HTML.php:897 msgid "Full Text" msgstr "" -#: src/Content/Nav.php:236 src/Content/Text/HTML.php:898 +#: src/Content/Nav.php:237 src/Content/Text/HTML.php:898 #: src/Content/Widget/TagCloud.php:68 msgid "Tags" msgstr "" -#: src/Content/Nav.php:237 src/Content/Nav.php:296 +#: src/Content/Nav.php:238 src/Content/Nav.php:297 #: src/Content/Text/HTML.php:899 src/Module/BaseProfile.php:125 #: src/Module/BaseProfile.php:128 src/Module/Contact.php:373 #: src/Module/Contact.php:467 view/theme/frio/theme.php:247 msgid "Contacts" msgstr "" -#: src/Content/Nav.php:256 +#: src/Content/Nav.php:257 msgid "Community" msgstr "" -#: src/Content/Nav.php:256 +#: src/Content/Nav.php:257 msgid "Conversations on this and other servers" msgstr "" -#: src/Content/Nav.php:260 src/Module/BaseProfile.php:87 +#: src/Content/Nav.php:261 src/Module/BaseProfile.php:87 #: src/Module/BaseProfile.php:98 view/theme/frio/theme.php:244 msgid "Events and Calendar" msgstr "" -#: src/Content/Nav.php:263 +#: src/Content/Nav.php:264 msgid "Directory" msgstr "" -#: src/Content/Nav.php:263 +#: src/Content/Nav.php:264 msgid "People directory" msgstr "" -#: src/Content/Nav.php:265 src/Module/BaseAdmin.php:88 +#: src/Content/Nav.php:266 src/Module/BaseAdmin.php:88 msgid "Information" msgstr "" -#: src/Content/Nav.php:265 +#: src/Content/Nav.php:266 msgid "Information about this friendica instance" msgstr "" -#: src/Content/Nav.php:268 src/Module/Admin/Tos.php:76 +#: src/Content/Nav.php:269 src/Module/Admin/Tos.php:76 #: src/Module/BaseAdmin.php:99 src/Module/Register.php:176 #: src/Module/Tos.php:87 msgid "Terms of Service" msgstr "" -#: src/Content/Nav.php:268 +#: src/Content/Nav.php:269 msgid "Terms of Service of this Friendica instance" msgstr "" -#: src/Content/Nav.php:273 view/theme/frio/theme.php:243 +#: src/Content/Nav.php:274 view/theme/frio/theme.php:243 msgid "Network" msgstr "" -#: src/Content/Nav.php:273 view/theme/frio/theme.php:243 +#: src/Content/Nav.php:274 view/theme/frio/theme.php:243 msgid "Conversations from your friends" msgstr "" -#: src/Content/Nav.php:279 +#: src/Content/Nav.php:280 msgid "Introductions" msgstr "" -#: src/Content/Nav.php:279 +#: src/Content/Nav.php:280 msgid "Friend Requests" msgstr "" -#: src/Content/Nav.php:280 src/Module/BaseNotifications.php:148 +#: src/Content/Nav.php:281 src/Module/BaseNotifications.php:148 #: src/Module/Notifications/Introductions.php:73 msgid "Notifications" msgstr "" -#: src/Content/Nav.php:281 +#: src/Content/Nav.php:282 msgid "See all notifications" msgstr "" -#: src/Content/Nav.php:282 +#: src/Content/Nav.php:283 msgid "Mark all system notifications as seen" msgstr "" -#: src/Content/Nav.php:285 view/theme/frio/theme.php:245 +#: src/Content/Nav.php:286 view/theme/frio/theme.php:245 msgid "Private mail" msgstr "" -#: src/Content/Nav.php:286 +#: src/Content/Nav.php:287 msgid "Inbox" msgstr "" -#: src/Content/Nav.php:287 +#: src/Content/Nav.php:288 msgid "Outbox" msgstr "" -#: src/Content/Nav.php:291 +#: src/Content/Nav.php:292 msgid "Accounts" msgstr "" -#: src/Content/Nav.php:291 +#: src/Content/Nav.php:292 msgid "Manage other pages" msgstr "" -#: src/Content/Nav.php:294 src/Module/Admin/Addons/Details.php:114 +#: src/Content/Nav.php:295 src/Module/Admin/Addons/Details.php:114 #: src/Module/Admin/Themes/Details.php:93 src/Module/BaseSettings.php:122 #: src/Module/Welcome.php:52 view/theme/frio/theme.php:246 msgid "Settings" msgstr "" -#: src/Content/Nav.php:294 view/theme/frio/theme.php:246 +#: src/Content/Nav.php:295 view/theme/frio/theme.php:246 msgid "Account settings" msgstr "" -#: src/Content/Nav.php:296 view/theme/frio/theme.php:247 +#: src/Content/Nav.php:297 view/theme/frio/theme.php:247 msgid "Manage/edit friends and contacts" msgstr "" -#: src/Content/Nav.php:301 src/Module/BaseAdmin.php:129 +#: src/Content/Nav.php:302 src/Module/BaseAdmin.php:129 msgid "Admin" msgstr "" -#: src/Content/Nav.php:301 +#: src/Content/Nav.php:302 msgid "Site setup and configuration" msgstr "" -#: src/Content/Nav.php:304 +#: src/Content/Nav.php:305 msgid "Navigation" msgstr "" -#: src/Content/Nav.php:304 +#: src/Content/Nav.php:305 msgid "Site map" msgstr "" @@ -2639,8 +2639,8 @@ msgid "" "%2$s %3$s" msgstr "" -#: src/Content/Text/BBCode.php:1263 src/Model/Item.php:3429 -#: src/Model/Item.php:3435 src/Model/Item.php:3436 +#: src/Content/Text/BBCode.php:1263 src/Model/Item.php:3456 +#: src/Model/Item.php:3462 src/Model/Item.php:3463 msgid "Link to source" msgstr "" @@ -3421,36 +3421,36 @@ msgstr "" msgid "Enter a valid existing folder" msgstr "" -#: src/Core/Update.php:67 +#: src/Core/Update.php:69 #, php-format msgid "" "Updates from version %s are not supported. Please update at least to version " "2021.01 and wait until the postupdate finished version 1383." msgstr "" -#: src/Core/Update.php:78 +#: src/Core/Update.php:80 #, php-format msgid "" "Updates from postupdate version %s are not supported. Please update at least " "to version 2021.01 and wait until the postupdate finished version 1383." msgstr "" -#: src/Core/Update.php:153 +#: src/Core/Update.php:155 #, php-format msgid "%s: executing pre update %d" msgstr "" -#: src/Core/Update.php:191 +#: src/Core/Update.php:193 #, php-format msgid "%s: executing post update %d" msgstr "" -#: src/Core/Update.php:261 +#: src/Core/Update.php:263 #, php-format msgid "Update %s failed. See error logs." msgstr "" -#: src/Core/Update.php:315 +#: src/Core/Update.php:317 #, php-format msgid "" "\n" @@ -3462,16 +3462,16 @@ msgid "" "might be invalid." msgstr "" -#: src/Core/Update.php:321 +#: src/Core/Update.php:323 #, php-format msgid "The error message is\\n[pre]%s[/pre]" msgstr "" -#: src/Core/Update.php:325 src/Core/Update.php:367 +#: src/Core/Update.php:327 src/Core/Update.php:369 msgid "[Friendica Notify] Database update" msgstr "" -#: src/Core/Update.php:361 +#: src/Core/Update.php:363 #, php-format msgid "" "\n" @@ -3799,49 +3799,49 @@ msgstr "" msgid "post" msgstr "" -#: src/Model/Item.php:2978 +#: src/Model/Item.php:3005 #, php-format msgid "Content warning: %s" msgstr "" -#: src/Model/Item.php:3341 +#: src/Model/Item.php:3368 msgid "bytes" msgstr "" -#: src/Model/Item.php:3372 +#: src/Model/Item.php:3399 #, php-format msgid "%2$s (%3$d%%, %1$d vote)" msgid_plural "%2$s (%3$d%%, %1$d votes)" msgstr[0] "" msgstr[1] "" -#: src/Model/Item.php:3374 +#: src/Model/Item.php:3401 #, php-format msgid "%2$s (%1$d vote)" msgid_plural "%2$s (%1$d votes)" msgstr[0] "" msgstr[1] "" -#: src/Model/Item.php:3379 +#: src/Model/Item.php:3406 #, php-format msgid "%d voter. Poll end: %s" msgid_plural "%d voters. Poll end: %s" msgstr[0] "" msgstr[1] "" -#: src/Model/Item.php:3381 +#: src/Model/Item.php:3408 #, php-format msgid "%d voter." msgid_plural "%d voters." msgstr[0] "" msgstr[1] "" -#: src/Model/Item.php:3383 +#: src/Model/Item.php:3410 #, php-format msgid "Poll end: %s" msgstr "" -#: src/Model/Item.php:3417 src/Model/Item.php:3418 +#: src/Model/Item.php:3444 src/Model/Item.php:3445 msgid "View on separate page" msgstr "" @@ -4294,7 +4294,7 @@ msgstr "" #: src/Module/Admin/Blocklist/Server/Index.php:93 #: src/Module/Admin/Federation.php:201 src/Module/Admin/Item/Delete.php:64 #: src/Module/Admin/Logs/Settings.php:79 src/Module/Admin/Logs/View.php:84 -#: src/Module/Admin/Queue.php:72 src/Module/Admin/Site.php:433 +#: src/Module/Admin/Queue.php:72 src/Module/Admin/Site.php:431 #: src/Module/Admin/Storage.php:138 src/Module/Admin/Summary.php:233 #: src/Module/Admin/Themes/Details.php:90 src/Module/Admin/Themes/Index.php:111 #: src/Module/Admin/Tos.php:75 src/Module/Admin/Users/Active.php:136 @@ -5153,470 +5153,470 @@ msgstr "" msgid "Priority" msgstr "" -#: src/Module/Admin/Site.php:338 src/Module/Settings/Display.php:138 +#: src/Module/Admin/Site.php:336 src/Module/Settings/Display.php:138 msgid "No special theme for mobile devices" msgstr "" -#: src/Module/Admin/Site.php:355 src/Module/Settings/Display.php:148 +#: src/Module/Admin/Site.php:353 src/Module/Settings/Display.php:148 #, php-format msgid "%s - (Experimental)" msgstr "" -#: src/Module/Admin/Site.php:367 -msgid "No community page for local users" -msgstr "" - -#: src/Module/Admin/Site.php:368 +#: src/Module/Admin/Site.php:365 msgid "No community page" msgstr "" -#: src/Module/Admin/Site.php:369 +#: src/Module/Admin/Site.php:366 +msgid "No community page for visitors" +msgstr "" + +#: src/Module/Admin/Site.php:367 msgid "Public postings from users of this site" msgstr "" -#: src/Module/Admin/Site.php:370 +#: src/Module/Admin/Site.php:368 msgid "Public postings from the federated network" msgstr "" -#: src/Module/Admin/Site.php:371 +#: src/Module/Admin/Site.php:369 msgid "Public postings from local users and the federated network" msgstr "" -#: src/Module/Admin/Site.php:377 +#: src/Module/Admin/Site.php:375 msgid "Multi user instance" msgstr "" -#: src/Module/Admin/Site.php:404 +#: src/Module/Admin/Site.php:402 msgid "Closed" msgstr "" -#: src/Module/Admin/Site.php:405 +#: src/Module/Admin/Site.php:403 msgid "Requires approval" msgstr "" -#: src/Module/Admin/Site.php:406 +#: src/Module/Admin/Site.php:404 msgid "Open" msgstr "" -#: src/Module/Admin/Site.php:410 src/Module/Install.php:222 +#: src/Module/Admin/Site.php:408 src/Module/Install.php:222 msgid "No SSL policy, links will track page SSL state" msgstr "" -#: src/Module/Admin/Site.php:411 src/Module/Install.php:223 +#: src/Module/Admin/Site.php:409 src/Module/Install.php:223 msgid "Force all links to use SSL" msgstr "" -#: src/Module/Admin/Site.php:412 src/Module/Install.php:224 +#: src/Module/Admin/Site.php:410 src/Module/Install.php:224 msgid "Self-signed certificate, use SSL for local links only (discouraged)" msgstr "" -#: src/Module/Admin/Site.php:416 +#: src/Module/Admin/Site.php:414 msgid "Don't check" msgstr "" -#: src/Module/Admin/Site.php:417 +#: src/Module/Admin/Site.php:415 msgid "check the stable version" msgstr "" -#: src/Module/Admin/Site.php:418 +#: src/Module/Admin/Site.php:416 msgid "check the development version" msgstr "" -#: src/Module/Admin/Site.php:422 +#: src/Module/Admin/Site.php:420 msgid "none" msgstr "" -#: src/Module/Admin/Site.php:423 +#: src/Module/Admin/Site.php:421 msgid "Local contacts" msgstr "" -#: src/Module/Admin/Site.php:424 +#: src/Module/Admin/Site.php:422 msgid "Interactors" msgstr "" -#: src/Module/Admin/Site.php:434 src/Module/BaseAdmin.php:93 +#: src/Module/Admin/Site.php:432 src/Module/BaseAdmin.php:93 msgid "Site" msgstr "" -#: src/Module/Admin/Site.php:435 +#: src/Module/Admin/Site.php:433 msgid "General Information" msgstr "" -#: src/Module/Admin/Site.php:437 +#: src/Module/Admin/Site.php:435 msgid "Republish users to directory" msgstr "" -#: src/Module/Admin/Site.php:438 src/Module/Register.php:152 +#: src/Module/Admin/Site.php:436 src/Module/Register.php:152 msgid "Registration" msgstr "" -#: src/Module/Admin/Site.php:439 +#: src/Module/Admin/Site.php:437 msgid "File upload" msgstr "" -#: src/Module/Admin/Site.php:440 +#: src/Module/Admin/Site.php:438 msgid "Policies" msgstr "" -#: src/Module/Admin/Site.php:442 +#: src/Module/Admin/Site.php:440 msgid "Auto Discovered Contact Directory" msgstr "" -#: src/Module/Admin/Site.php:443 +#: src/Module/Admin/Site.php:441 msgid "Performance" msgstr "" -#: src/Module/Admin/Site.php:444 +#: src/Module/Admin/Site.php:442 msgid "Worker" msgstr "" -#: src/Module/Admin/Site.php:445 +#: src/Module/Admin/Site.php:443 msgid "Message Relay" msgstr "" -#: src/Module/Admin/Site.php:446 +#: src/Module/Admin/Site.php:444 msgid "" "Use the command \"console relay\" in the command line to add or remove " "relays." msgstr "" -#: src/Module/Admin/Site.php:447 +#: src/Module/Admin/Site.php:445 msgid "The system is not subscribed to any relays at the moment." msgstr "" -#: src/Module/Admin/Site.php:448 +#: src/Module/Admin/Site.php:446 msgid "The system is currently subscribed to the following relays:" msgstr "" -#: src/Module/Admin/Site.php:450 +#: src/Module/Admin/Site.php:448 msgid "Relocate Node" msgstr "" -#: src/Module/Admin/Site.php:451 +#: src/Module/Admin/Site.php:449 msgid "" "Relocating your node enables you to change the DNS domain of this node and " "keep all the existing users and posts. This process takes a while and can " "only be started from the relocate console command like this:" msgstr "" -#: src/Module/Admin/Site.php:452 +#: src/Module/Admin/Site.php:450 msgid "(Friendica directory)# bin/console relocate https://newdomain.com" msgstr "" -#: src/Module/Admin/Site.php:456 +#: src/Module/Admin/Site.php:454 msgid "Site name" msgstr "" -#: src/Module/Admin/Site.php:457 +#: src/Module/Admin/Site.php:455 msgid "Sender Email" msgstr "" -#: src/Module/Admin/Site.php:457 +#: src/Module/Admin/Site.php:455 msgid "" "The email address your server shall use to send notification emails from." msgstr "" -#: src/Module/Admin/Site.php:458 +#: src/Module/Admin/Site.php:456 msgid "Name of the system actor" msgstr "" -#: src/Module/Admin/Site.php:458 +#: src/Module/Admin/Site.php:456 msgid "" "Name of the internal system account that is used to perform ActivityPub " "requests. This must be an unused username. If set, this can't be changed " "again." msgstr "" -#: src/Module/Admin/Site.php:459 +#: src/Module/Admin/Site.php:457 msgid "Banner/Logo" msgstr "" -#: src/Module/Admin/Site.php:460 +#: src/Module/Admin/Site.php:458 msgid "Email Banner/Logo" msgstr "" -#: src/Module/Admin/Site.php:461 +#: src/Module/Admin/Site.php:459 msgid "Shortcut icon" msgstr "" -#: src/Module/Admin/Site.php:461 +#: src/Module/Admin/Site.php:459 msgid "Link to an icon that will be used for browsers." msgstr "" -#: src/Module/Admin/Site.php:462 +#: src/Module/Admin/Site.php:460 msgid "Touch icon" msgstr "" -#: src/Module/Admin/Site.php:462 +#: src/Module/Admin/Site.php:460 msgid "Link to an icon that will be used for tablets and mobiles." msgstr "" -#: src/Module/Admin/Site.php:463 +#: src/Module/Admin/Site.php:461 msgid "Additional Info" msgstr "" -#: src/Module/Admin/Site.php:463 +#: src/Module/Admin/Site.php:461 #, php-format msgid "" "For public servers: you can add additional information here that will be " "listed at %s/servers." msgstr "" -#: src/Module/Admin/Site.php:464 +#: src/Module/Admin/Site.php:462 msgid "System language" msgstr "" -#: src/Module/Admin/Site.php:465 +#: src/Module/Admin/Site.php:463 msgid "System theme" msgstr "" -#: src/Module/Admin/Site.php:465 +#: src/Module/Admin/Site.php:463 #, php-format msgid "" "Default system theme - may be over-ridden by user profiles - Change default theme settings" msgstr "" -#: src/Module/Admin/Site.php:466 +#: src/Module/Admin/Site.php:464 msgid "Mobile system theme" msgstr "" -#: src/Module/Admin/Site.php:466 +#: src/Module/Admin/Site.php:464 msgid "Theme for mobile devices" msgstr "" -#: src/Module/Admin/Site.php:467 src/Module/Install.php:232 +#: src/Module/Admin/Site.php:465 src/Module/Install.php:232 msgid "SSL link policy" msgstr "" -#: src/Module/Admin/Site.php:467 src/Module/Install.php:234 +#: src/Module/Admin/Site.php:465 src/Module/Install.php:234 msgid "Determines whether generated links should be forced to use SSL" msgstr "" -#: src/Module/Admin/Site.php:468 +#: src/Module/Admin/Site.php:466 msgid "Force SSL" msgstr "" -#: src/Module/Admin/Site.php:468 +#: src/Module/Admin/Site.php:466 msgid "" "Force all Non-SSL requests to SSL - Attention: on some systems it could lead " "to endless loops." msgstr "" -#: src/Module/Admin/Site.php:469 +#: src/Module/Admin/Site.php:467 msgid "Show help entry from navigation menu" msgstr "" -#: src/Module/Admin/Site.php:469 +#: src/Module/Admin/Site.php:467 msgid "" "Displays the menu entry for the Help pages from the navigation menu. It is " "always accessible by calling /help directly." msgstr "" -#: src/Module/Admin/Site.php:470 +#: src/Module/Admin/Site.php:468 msgid "Single user instance" msgstr "" -#: src/Module/Admin/Site.php:470 +#: src/Module/Admin/Site.php:468 msgid "Make this instance multi-user or single-user for the named user" msgstr "" -#: src/Module/Admin/Site.php:472 +#: src/Module/Admin/Site.php:470 msgid "Maximum image size" msgstr "" -#: src/Module/Admin/Site.php:472 +#: src/Module/Admin/Site.php:470 msgid "" "Maximum size in bytes of uploaded images. Default is 0, which means no " "limits." msgstr "" -#: src/Module/Admin/Site.php:473 +#: src/Module/Admin/Site.php:471 msgid "Maximum image length" msgstr "" -#: src/Module/Admin/Site.php:473 +#: src/Module/Admin/Site.php:471 msgid "" "Maximum length in pixels of the longest side of uploaded images. Default is " "-1, which means no limits." msgstr "" -#: src/Module/Admin/Site.php:474 +#: src/Module/Admin/Site.php:472 msgid "JPEG image quality" msgstr "" -#: src/Module/Admin/Site.php:474 +#: src/Module/Admin/Site.php:472 msgid "" "Uploaded JPEGS will be saved at this quality setting [0-100]. Default is " "100, which is full quality." msgstr "" -#: src/Module/Admin/Site.php:476 +#: src/Module/Admin/Site.php:474 msgid "Register policy" msgstr "" -#: src/Module/Admin/Site.php:477 +#: src/Module/Admin/Site.php:475 msgid "Maximum Daily Registrations" msgstr "" -#: src/Module/Admin/Site.php:477 +#: src/Module/Admin/Site.php:475 msgid "" "If registration is permitted above, this sets the maximum number of new user " "registrations to accept per day. If register is set to closed, this setting " "has no effect." msgstr "" -#: src/Module/Admin/Site.php:478 +#: src/Module/Admin/Site.php:476 msgid "Register text" msgstr "" -#: src/Module/Admin/Site.php:478 +#: src/Module/Admin/Site.php:476 msgid "" "Will be displayed prominently on the registration page. You can use BBCode " "here." msgstr "" -#: src/Module/Admin/Site.php:479 +#: src/Module/Admin/Site.php:477 msgid "Forbidden Nicknames" msgstr "" -#: src/Module/Admin/Site.php:479 +#: src/Module/Admin/Site.php:477 msgid "" "Comma separated list of nicknames that are forbidden from registration. " "Preset is a list of role names according RFC 2142." msgstr "" -#: src/Module/Admin/Site.php:480 +#: src/Module/Admin/Site.php:478 msgid "Accounts abandoned after x days" msgstr "" -#: src/Module/Admin/Site.php:480 +#: src/Module/Admin/Site.php:478 msgid "" "Will not waste system resources polling external sites for abandonded " "accounts. Enter 0 for no time limit." msgstr "" -#: src/Module/Admin/Site.php:481 +#: src/Module/Admin/Site.php:479 msgid "Allowed friend domains" msgstr "" -#: src/Module/Admin/Site.php:481 +#: src/Module/Admin/Site.php:479 msgid "" "Comma separated list of domains which are allowed to establish friendships " "with this site. Wildcards are accepted. Empty to allow any domains" msgstr "" -#: src/Module/Admin/Site.php:482 +#: src/Module/Admin/Site.php:480 msgid "Allowed email domains" msgstr "" -#: src/Module/Admin/Site.php:482 +#: src/Module/Admin/Site.php:480 msgid "" "Comma separated list of domains which are allowed in email addresses for " "registrations to this site. Wildcards are accepted. Empty to allow any " "domains" msgstr "" -#: src/Module/Admin/Site.php:483 +#: src/Module/Admin/Site.php:481 msgid "No OEmbed rich content" msgstr "" -#: src/Module/Admin/Site.php:483 +#: src/Module/Admin/Site.php:481 msgid "" "Don't show the rich content (e.g. embedded PDF), except from the domains " "listed below." msgstr "" -#: src/Module/Admin/Site.php:484 +#: src/Module/Admin/Site.php:482 msgid "Trusted third-party domains" msgstr "" -#: src/Module/Admin/Site.php:484 +#: src/Module/Admin/Site.php:482 msgid "" "Comma separated list of domains from which content is allowed to be embedded " "in posts like with OEmbed. All sub-domains of the listed domains are allowed " "as well." msgstr "" -#: src/Module/Admin/Site.php:485 +#: src/Module/Admin/Site.php:483 msgid "Block public" msgstr "" -#: src/Module/Admin/Site.php:485 +#: src/Module/Admin/Site.php:483 msgid "" "Check to block public access to all otherwise public personal pages on this " "site unless you are currently logged in." msgstr "" -#: src/Module/Admin/Site.php:486 +#: src/Module/Admin/Site.php:484 msgid "Force publish" msgstr "" -#: src/Module/Admin/Site.php:486 +#: src/Module/Admin/Site.php:484 msgid "" "Check to force all profiles on this site to be listed in the site directory." msgstr "" -#: src/Module/Admin/Site.php:486 +#: src/Module/Admin/Site.php:484 msgid "Enabling this may violate privacy laws like the GDPR" msgstr "" -#: src/Module/Admin/Site.php:487 +#: src/Module/Admin/Site.php:485 msgid "Global directory URL" msgstr "" -#: src/Module/Admin/Site.php:487 +#: src/Module/Admin/Site.php:485 msgid "" "URL to the global directory. If this is not set, the global directory is " "completely unavailable to the application." msgstr "" -#: src/Module/Admin/Site.php:488 +#: src/Module/Admin/Site.php:486 msgid "Private posts by default for new users" msgstr "" -#: src/Module/Admin/Site.php:488 +#: src/Module/Admin/Site.php:486 msgid "" "Set default post permissions for all new members to the default privacy " "group rather than public." msgstr "" -#: src/Module/Admin/Site.php:489 +#: src/Module/Admin/Site.php:487 msgid "Don't include post content in email notifications" msgstr "" -#: src/Module/Admin/Site.php:489 +#: src/Module/Admin/Site.php:487 msgid "" "Don't include the content of a post/comment/private message/etc. in the " "email notifications that are sent out from this site, as a privacy measure." msgstr "" -#: src/Module/Admin/Site.php:490 +#: src/Module/Admin/Site.php:488 msgid "Disallow public access to addons listed in the apps menu." msgstr "" -#: src/Module/Admin/Site.php:490 +#: src/Module/Admin/Site.php:488 msgid "" "Checking this box will restrict addons listed in the apps menu to members " "only." msgstr "" -#: src/Module/Admin/Site.php:491 +#: src/Module/Admin/Site.php:489 msgid "Don't embed private images in posts" msgstr "" -#: src/Module/Admin/Site.php:491 +#: src/Module/Admin/Site.php:489 msgid "" "Don't replace locally-hosted private photos in posts with an embedded copy " "of the image. This means that contacts who receive posts containing private " "photos will have to authenticate and load each image, which may take a while." msgstr "" -#: src/Module/Admin/Site.php:492 +#: src/Module/Admin/Site.php:490 msgid "Explicit Content" msgstr "" -#: src/Module/Admin/Site.php:492 +#: src/Module/Admin/Site.php:490 msgid "" "Set this to announce that your node is used mostly for explicit content that " "might not be suited for minors. This information will be published in the " @@ -5625,257 +5625,257 @@ msgid "" "will be shown at the user registration page." msgstr "" -#: src/Module/Admin/Site.php:493 +#: src/Module/Admin/Site.php:491 msgid "Proxify external content" msgstr "" -#: src/Module/Admin/Site.php:493 +#: src/Module/Admin/Site.php:491 msgid "" "Route external content via the proxy functionality. This is used for example " "for some OEmbed accesses and in some other rare cases." msgstr "" -#: src/Module/Admin/Site.php:494 +#: src/Module/Admin/Site.php:492 msgid "Cache contact avatars" msgstr "" -#: src/Module/Admin/Site.php:494 +#: src/Module/Admin/Site.php:492 msgid "" "Locally store the avatar pictures of the contacts. This uses a lot of " "storage space but it increases the performance." msgstr "" -#: src/Module/Admin/Site.php:495 +#: src/Module/Admin/Site.php:493 msgid "Allow Users to set remote_self" msgstr "" -#: src/Module/Admin/Site.php:495 +#: src/Module/Admin/Site.php:493 msgid "" "With checking this, every user is allowed to mark every contact as a " "remote_self in the repair contact dialog. Setting this flag on a contact " "causes mirroring every posting of that contact in the users stream." msgstr "" -#: src/Module/Admin/Site.php:496 +#: src/Module/Admin/Site.php:494 msgid "Enable multiple registrations" msgstr "" -#: src/Module/Admin/Site.php:496 +#: src/Module/Admin/Site.php:494 msgid "Enable users to register additional accounts for use as pages." msgstr "" -#: src/Module/Admin/Site.php:497 +#: src/Module/Admin/Site.php:495 msgid "Enable OpenID" msgstr "" -#: src/Module/Admin/Site.php:497 +#: src/Module/Admin/Site.php:495 msgid "Enable OpenID support for registration and logins." msgstr "" -#: src/Module/Admin/Site.php:498 +#: src/Module/Admin/Site.php:496 msgid "Enable Fullname check" msgstr "" -#: src/Module/Admin/Site.php:498 +#: src/Module/Admin/Site.php:496 msgid "" "Enable check to only allow users to register with a space between the first " "name and the last name in their full name." msgstr "" -#: src/Module/Admin/Site.php:499 +#: src/Module/Admin/Site.php:497 msgid "Community pages for visitors" msgstr "" -#: src/Module/Admin/Site.php:499 +#: src/Module/Admin/Site.php:497 msgid "" "Which community pages should be available for visitors. Local users always " "see both pages." msgstr "" -#: src/Module/Admin/Site.php:500 +#: src/Module/Admin/Site.php:498 msgid "Posts per user on community page" msgstr "" -#: src/Module/Admin/Site.php:500 +#: src/Module/Admin/Site.php:498 msgid "" "The maximum number of posts per user on the community page. (Not valid for " "\"Global Community\")" msgstr "" -#: src/Module/Admin/Site.php:502 +#: src/Module/Admin/Site.php:500 msgid "Enable Mail support" msgstr "" -#: src/Module/Admin/Site.php:502 +#: src/Module/Admin/Site.php:500 msgid "" "Enable built-in mail support to poll IMAP folders and to reply via mail." msgstr "" -#: src/Module/Admin/Site.php:503 +#: src/Module/Admin/Site.php:501 msgid "" "Mail support can't be enabled because the PHP IMAP module is not installed." msgstr "" -#: src/Module/Admin/Site.php:504 +#: src/Module/Admin/Site.php:502 msgid "Enable OStatus support" msgstr "" -#: src/Module/Admin/Site.php:504 +#: src/Module/Admin/Site.php:502 msgid "" "Enable built-in OStatus (StatusNet, GNU Social etc.) compatibility. All " "communications in OStatus are public." msgstr "" -#: src/Module/Admin/Site.php:506 +#: src/Module/Admin/Site.php:504 msgid "" "Diaspora support can't be enabled because Friendica was installed into a sub " "directory." msgstr "" -#: src/Module/Admin/Site.php:507 +#: src/Module/Admin/Site.php:505 msgid "Enable Diaspora support" msgstr "" -#: src/Module/Admin/Site.php:507 +#: src/Module/Admin/Site.php:505 msgid "" "Enable built-in Diaspora network compatibility for communicating with " "diaspora servers." msgstr "" -#: src/Module/Admin/Site.php:508 +#: src/Module/Admin/Site.php:506 msgid "Verify SSL" msgstr "" -#: src/Module/Admin/Site.php:508 +#: src/Module/Admin/Site.php:506 msgid "" "If you wish, you can turn on strict certificate checking. This will mean you " "cannot connect (at all) to self-signed SSL sites." msgstr "" -#: src/Module/Admin/Site.php:509 +#: src/Module/Admin/Site.php:507 msgid "Proxy user" msgstr "" -#: src/Module/Admin/Site.php:509 +#: src/Module/Admin/Site.php:507 msgid "User name for the proxy server." msgstr "" -#: src/Module/Admin/Site.php:510 +#: src/Module/Admin/Site.php:508 msgid "Proxy URL" msgstr "" -#: src/Module/Admin/Site.php:510 +#: src/Module/Admin/Site.php:508 msgid "" "If you want to use a proxy server that Friendica should use to connect to " "the network, put the URL of the proxy here." msgstr "" -#: src/Module/Admin/Site.php:511 +#: src/Module/Admin/Site.php:509 msgid "Network timeout" msgstr "" -#: src/Module/Admin/Site.php:511 +#: src/Module/Admin/Site.php:509 msgid "Value is in seconds. Set to 0 for unlimited (not recommended)." msgstr "" -#: src/Module/Admin/Site.php:512 +#: src/Module/Admin/Site.php:510 msgid "Maximum Load Average" msgstr "" -#: src/Module/Admin/Site.php:512 +#: src/Module/Admin/Site.php:510 #, php-format msgid "" "Maximum system load before delivery and poll processes are deferred - " "default %d." msgstr "" -#: src/Module/Admin/Site.php:513 +#: src/Module/Admin/Site.php:511 msgid "Minimal Memory" msgstr "" -#: src/Module/Admin/Site.php:513 +#: src/Module/Admin/Site.php:511 msgid "" "Minimal free memory in MB for the worker. Needs access to /proc/meminfo - " "default 0 (deactivated)." msgstr "" -#: src/Module/Admin/Site.php:514 +#: src/Module/Admin/Site.php:512 msgid "Periodically optimize tables" msgstr "" -#: src/Module/Admin/Site.php:514 +#: src/Module/Admin/Site.php:512 msgid "Periodically optimize tables like the cache and the workerqueue" msgstr "" -#: src/Module/Admin/Site.php:516 +#: src/Module/Admin/Site.php:514 msgid "Discover followers/followings from contacts" msgstr "" -#: src/Module/Admin/Site.php:516 +#: src/Module/Admin/Site.php:514 msgid "" "If enabled, contacts are checked for their followers and following contacts." msgstr "" -#: src/Module/Admin/Site.php:517 +#: src/Module/Admin/Site.php:515 msgid "None - deactivated" msgstr "" -#: src/Module/Admin/Site.php:518 +#: src/Module/Admin/Site.php:516 msgid "" "Local contacts - contacts of our local contacts are discovered for their " "followers/followings." msgstr "" -#: src/Module/Admin/Site.php:519 +#: src/Module/Admin/Site.php:517 msgid "" "Interactors - contacts of our local contacts and contacts who interacted on " "locally visible postings are discovered for their followers/followings." msgstr "" -#: src/Module/Admin/Site.php:521 +#: src/Module/Admin/Site.php:519 msgid "Synchronize the contacts with the directory server" msgstr "" -#: src/Module/Admin/Site.php:521 +#: src/Module/Admin/Site.php:519 msgid "" "if enabled, the system will check periodically for new contacts on the " "defined directory server." msgstr "" -#: src/Module/Admin/Site.php:523 +#: src/Module/Admin/Site.php:521 msgid "Days between requery" msgstr "" -#: src/Module/Admin/Site.php:523 +#: src/Module/Admin/Site.php:521 msgid "Number of days after which a server is requeried for his contacts." msgstr "" -#: src/Module/Admin/Site.php:524 +#: src/Module/Admin/Site.php:522 msgid "Discover contacts from other servers" msgstr "" -#: src/Module/Admin/Site.php:524 +#: src/Module/Admin/Site.php:522 msgid "" "Periodically query other servers for contacts. The system queries Friendica, " "Mastodon and Hubzilla servers." msgstr "" -#: src/Module/Admin/Site.php:525 +#: src/Module/Admin/Site.php:523 msgid "Search the local directory" msgstr "" -#: src/Module/Admin/Site.php:525 +#: src/Module/Admin/Site.php:523 msgid "" "Search the local directory instead of the global directory. When searching " "locally, every search will be executed on the global directory in the " "background. This improves the search results when the search is repeated." msgstr "" -#: src/Module/Admin/Site.php:527 +#: src/Module/Admin/Site.php:525 msgid "Publish server information" msgstr "" -#: src/Module/Admin/Site.php:527 +#: src/Module/Admin/Site.php:525 msgid "" "If enabled, general server and usage data will be published. The data " "contains the name and version of the server, number of users with public " @@ -5883,50 +5883,50 @@ msgid "" "href=\"http://the-federation.info/\">the-federation.info for details." msgstr "" -#: src/Module/Admin/Site.php:529 +#: src/Module/Admin/Site.php:527 msgid "Check upstream version" msgstr "" -#: src/Module/Admin/Site.php:529 +#: src/Module/Admin/Site.php:527 msgid "" "Enables checking for new Friendica versions at github. If there is a new " "version, you will be informed in the admin panel overview." msgstr "" -#: src/Module/Admin/Site.php:530 +#: src/Module/Admin/Site.php:528 msgid "Suppress Tags" msgstr "" -#: src/Module/Admin/Site.php:530 +#: src/Module/Admin/Site.php:528 msgid "Suppress showing a list of hashtags at the end of the posting." msgstr "" -#: src/Module/Admin/Site.php:531 +#: src/Module/Admin/Site.php:529 msgid "Clean database" msgstr "" -#: src/Module/Admin/Site.php:531 +#: src/Module/Admin/Site.php:529 msgid "" "Remove old remote items, orphaned database records and old content from some " "other helper tables." msgstr "" -#: src/Module/Admin/Site.php:532 +#: src/Module/Admin/Site.php:530 msgid "Lifespan of remote items" msgstr "" -#: src/Module/Admin/Site.php:532 +#: src/Module/Admin/Site.php:530 msgid "" "When the database cleanup is enabled, this defines the days after which " "remote items will be deleted. Own items, and marked or filed items are " "always kept. 0 disables this behaviour." msgstr "" -#: src/Module/Admin/Site.php:533 +#: src/Module/Admin/Site.php:531 msgid "Lifespan of unclaimed items" msgstr "" -#: src/Module/Admin/Site.php:533 +#: src/Module/Admin/Site.php:531 msgid "" "When the database cleanup is enabled, this defines the days after which " "unclaimed remote items (mostly content from the relay) will be deleted. " @@ -5934,144 +5934,144 @@ msgid "" "items if set to 0." msgstr "" -#: src/Module/Admin/Site.php:534 +#: src/Module/Admin/Site.php:532 msgid "Lifespan of raw conversation data" msgstr "" -#: src/Module/Admin/Site.php:534 +#: src/Module/Admin/Site.php:532 msgid "" "The conversation data is used for ActivityPub and OStatus, as well as for " "debug purposes. It should be safe to remove it after 14 days, default is 90 " "days." msgstr "" -#: src/Module/Admin/Site.php:535 +#: src/Module/Admin/Site.php:533 msgid "Maximum numbers of comments per post" msgstr "" -#: src/Module/Admin/Site.php:535 +#: src/Module/Admin/Site.php:533 msgid "How much comments should be shown for each post? Default value is 100." msgstr "" -#: src/Module/Admin/Site.php:536 +#: src/Module/Admin/Site.php:534 msgid "Maximum numbers of comments per post on the display page" msgstr "" -#: src/Module/Admin/Site.php:536 +#: src/Module/Admin/Site.php:534 msgid "" "How many comments should be shown on the single view for each post? Default " "value is 1000." msgstr "" -#: src/Module/Admin/Site.php:537 +#: src/Module/Admin/Site.php:535 msgid "Temp path" msgstr "" -#: src/Module/Admin/Site.php:537 +#: src/Module/Admin/Site.php:535 msgid "" "If you have a restricted system where the webserver can't access the system " "temp path, enter another path here." msgstr "" -#: src/Module/Admin/Site.php:538 +#: src/Module/Admin/Site.php:536 msgid "Only search in tags" msgstr "" -#: src/Module/Admin/Site.php:538 +#: src/Module/Admin/Site.php:536 msgid "On large systems the text search can slow down the system extremely." msgstr "" -#: src/Module/Admin/Site.php:539 +#: src/Module/Admin/Site.php:537 msgid "Generate counts per contact group when calculating network count" msgstr "" -#: src/Module/Admin/Site.php:539 +#: src/Module/Admin/Site.php:537 msgid "" "On systems with users that heavily use contact groups the query can be very " "expensive." msgstr "" -#: src/Module/Admin/Site.php:541 +#: src/Module/Admin/Site.php:539 msgid "Maximum number of parallel workers" msgstr "" -#: src/Module/Admin/Site.php:541 +#: src/Module/Admin/Site.php:539 #, php-format msgid "" "On shared hosters set this to %d. On larger systems, values of %d are great. " "Default value is %d." msgstr "" -#: src/Module/Admin/Site.php:542 +#: src/Module/Admin/Site.php:540 msgid "Enable fastlane" msgstr "" -#: src/Module/Admin/Site.php:542 +#: src/Module/Admin/Site.php:540 msgid "" "When enabed, the fastlane mechanism starts an additional worker if processes " "with higher priority are blocked by processes of lower priority." msgstr "" -#: src/Module/Admin/Site.php:544 +#: src/Module/Admin/Site.php:542 msgid "Direct relay transfer" msgstr "" -#: src/Module/Admin/Site.php:544 +#: src/Module/Admin/Site.php:542 msgid "" "Enables the direct transfer to other servers without using the relay servers" msgstr "" -#: src/Module/Admin/Site.php:545 +#: src/Module/Admin/Site.php:543 msgid "Relay scope" msgstr "" -#: src/Module/Admin/Site.php:545 +#: src/Module/Admin/Site.php:543 msgid "" "Can be \"all\" or \"tags\". \"all\" means that every public post should be " "received. \"tags\" means that only posts with selected tags should be " "received." msgstr "" -#: src/Module/Admin/Site.php:545 src/Module/Contact/Profile.php:273 +#: src/Module/Admin/Site.php:543 src/Module/Contact/Profile.php:273 #: src/Module/Settings/TwoFactor/Index.php:126 msgid "Disabled" msgstr "" -#: src/Module/Admin/Site.php:545 +#: src/Module/Admin/Site.php:543 msgid "all" msgstr "" -#: src/Module/Admin/Site.php:545 +#: src/Module/Admin/Site.php:543 msgid "tags" msgstr "" -#: src/Module/Admin/Site.php:546 +#: src/Module/Admin/Site.php:544 msgid "Server tags" msgstr "" -#: src/Module/Admin/Site.php:546 +#: src/Module/Admin/Site.php:544 msgid "Comma separated list of tags for the \"tags\" subscription." msgstr "" -#: src/Module/Admin/Site.php:547 +#: src/Module/Admin/Site.php:545 msgid "Deny Server tags" msgstr "" -#: src/Module/Admin/Site.php:547 +#: src/Module/Admin/Site.php:545 msgid "Comma separated list of tags that are rejected." msgstr "" -#: src/Module/Admin/Site.php:548 +#: src/Module/Admin/Site.php:546 msgid "Allow user tags" msgstr "" -#: src/Module/Admin/Site.php:548 +#: src/Module/Admin/Site.php:546 msgid "" "If enabled, the tags from the saved searches will used for the \"tags\" " "subscription in addition to the \"relay_server_tags\"." msgstr "" -#: src/Module/Admin/Site.php:551 +#: src/Module/Admin/Site.php:549 msgid "Start Relocation" msgstr "" @@ -7256,50 +7256,50 @@ msgstr "" msgid "Yes" msgstr "" -#: src/Module/Conversation/Community.php:61 +#: src/Module/Conversation/Community.php:76 msgid "" "This community stream shows all public posts received by this node. They may " "not reflect the opinions of this node’s users." msgstr "" -#: src/Module/Conversation/Community.php:74 +#: src/Module/Conversation/Community.php:89 msgid "Local Community" msgstr "" -#: src/Module/Conversation/Community.php:77 +#: src/Module/Conversation/Community.php:92 msgid "Posts from local users on this server" msgstr "" -#: src/Module/Conversation/Community.php:85 +#: src/Module/Conversation/Community.php:100 msgid "Global Community" msgstr "" -#: src/Module/Conversation/Community.php:88 +#: src/Module/Conversation/Community.php:103 msgid "Posts from users of the whole federated network" msgstr "" -#: src/Module/Conversation/Community.php:121 +#: src/Module/Conversation/Community.php:136 msgid "Own Contacts" msgstr "" -#: src/Module/Conversation/Community.php:125 +#: src/Module/Conversation/Community.php:140 msgid "Include" msgstr "" -#: src/Module/Conversation/Community.php:126 +#: src/Module/Conversation/Community.php:141 msgid "Hide" msgstr "" -#: src/Module/Conversation/Community.php:143 src/Module/Search/Index.php:152 +#: src/Module/Conversation/Community.php:158 src/Module/Search/Index.php:152 #: src/Module/Search/Index.php:194 msgid "No results." msgstr "" -#: src/Module/Conversation/Community.php:199 +#: src/Module/Conversation/Community.php:214 msgid "Community option not available." msgstr "" -#: src/Module/Conversation/Community.php:215 +#: src/Module/Conversation/Community.php:230 msgid "Not available." msgstr "" @@ -8410,19 +8410,19 @@ msgstr "" #: src/Module/Profile/Profile.php:326 src/Module/Profile/Profile.php:329 #: src/Module/Profile/Status.php:66 src/Module/Profile/Status.php:69 -#: src/Protocol/Feed.php:1025 src/Protocol/OStatus.php:1046 +#: src/Protocol/Feed.php:1026 src/Protocol/OStatus.php:1046 #, php-format msgid "%s's timeline" msgstr "" #: src/Module/Profile/Profile.php:327 src/Module/Profile/Status.php:67 -#: src/Protocol/Feed.php:1029 src/Protocol/OStatus.php:1051 +#: src/Protocol/Feed.php:1030 src/Protocol/OStatus.php:1051 #, php-format msgid "%s's posts" msgstr "" #: src/Module/Profile/Profile.php:328 src/Module/Profile/Status.php:68 -#: src/Protocol/Feed.php:1032 src/Protocol/OStatus.php:1055 +#: src/Protocol/Feed.php:1033 src/Protocol/OStatus.php:1055 #, php-format msgid "%s's comments" msgstr "" From 62a0d55fc8db61630b52bc74edaae6d49513c397 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 17 Oct 2022 10:37:48 +0000 Subject: [PATCH 18/27] The friendica constants have been moved to the app class --- boot.php | 4 ---- src/App.php | 4 ++++ src/App/Page.php | 8 ++++---- src/Core/Console.php | 3 ++- src/Module/Admin/Federation.php | 3 ++- src/Module/Admin/Summary.php | 11 ++++++----- src/Module/Api/GNUSocial/GNUSocial/Config.php | 6 +++--- src/Module/Friendica.php | 7 ++++--- src/Module/NodeInfo110.php | 2 +- src/Module/NodeInfo120.php | 2 +- src/Module/NodeInfo210.php | 2 +- src/Module/Settings/UserExport.php | 4 ++-- src/Module/Statistics.php | 4 ++-- src/Network/HTTPClient/Factory/HttpClient.php | 6 +++--- src/Object/Api/Mastodon/Instance.php | 4 ++-- src/Protocol/ActivityPub/Transmitter.php | 3 ++- src/Protocol/DFRN.php | 5 +++-- src/Protocol/Feed.php | 5 +++-- src/Protocol/OStatus.php | 5 +++-- src/Util/EMailer/MailBuilder.php | 7 ++++--- src/Util/Writer/DbaDefinitionSqlWriter.php | 3 ++- tests/src/Module/NodeInfoTest.php | 8 ++++---- 22 files changed, 58 insertions(+), 48 deletions(-) diff --git a/boot.php b/boot.php index 6b078f7c9..6336c2e41 100644 --- a/boot.php +++ b/boot.php @@ -29,10 +29,6 @@ use Friendica\Model\Contact; -define('FRIENDICA_PLATFORM', 'Friendica'); -define('FRIENDICA_CODENAME', 'Giant Rhubarb'); -define('FRIENDICA_VERSION', '2022.12-dev'); - /** * Constant with a HTML line break. * diff --git a/src/App.php b/src/App.php index a141adf49..d46f69843 100644 --- a/src/App.php +++ b/src/App.php @@ -58,6 +58,10 @@ use Psr\Log\LoggerInterface; */ class App { + const PLATFORM = 'Friendica'; + const CODENAME = 'Giant Rhubarb'; + const VERSION = '2022.12-dev'; + // Allow themes to control internal parameters // by changing App values in theme.php private $theme_info = [ diff --git a/src/App/Page.php b/src/App/Page.php index 633145611..dcd2e8832 100644 --- a/src/App/Page.php +++ b/src/App/Page.php @@ -202,7 +202,7 @@ class Page implements ArrayAccess */ public function registerStylesheet(string $path, string $media = 'screen') { - $path = Network::appendQueryParam($path, ['v' => FRIENDICA_VERSION]); + $path = Network::appendQueryParam($path, ['v' => App::VERSION]); if (mb_strpos($path, $this->basePath . DIRECTORY_SEPARATOR) === 0) { $path = mb_substr($path, mb_strlen($this->basePath . DIRECTORY_SEPARATOR)); @@ -277,7 +277,7 @@ class Page implements ArrayAccess */ $this->page['htmlhead'] = Renderer::replaceMacros($tpl, [ '$local_user' => local_user(), - '$generator' => 'Friendica' . ' ' . FRIENDICA_VERSION, + '$generator' => 'Friendica' . ' ' . App::VERSION, '$delitem' => $l10n->t('Delete this item?'), '$blockAuthor' => $l10n->t('Block this author? They won\'t be able to follow you nor see your public posts, and you won\'t be able to see their posts and their notifications.'), '$update_interval' => $interval, @@ -395,7 +395,7 @@ class Page implements ArrayAccess */ public function registerFooterScript($path) { - $path = Network::appendQueryParam($path, ['v' => FRIENDICA_VERSION]); + $path = Network::appendQueryParam($path, ['v' => App::VERSION]); $url = str_replace($this->basePath . DIRECTORY_SEPARATOR, '', $path); @@ -543,7 +543,7 @@ class Page implements ArrayAccess $page = $this->page; - header("X-Friendica-Version: " . FRIENDICA_VERSION); + header("X-Friendica-Version: " . App::VERSION); header("Content-type: text/html; charset=utf-8"); if ($config->get('system', 'hsts') && ($baseURL->getSSLPolicy() == BaseURL::SSL_POLICY_FULL)) { diff --git a/src/Core/Console.php b/src/Core/Console.php index 2521e21be..f51e33bd5 100644 --- a/src/Core/Console.php +++ b/src/Core/Console.php @@ -23,6 +23,7 @@ namespace Friendica\Core; use Dice\Dice; use Friendica; +use Friendica\App; /** * Description of Console @@ -133,7 +134,7 @@ HELP; $command = null; if ($this->getOption('version')) { - $this->out('Friendica Console version ' . FRIENDICA_VERSION); + $this->out('Friendica Console version ' . App::VERSION); return 0; } elseif ((count($this->options) === 0 || $this->getOption($this->customHelpOptions) === true || $this->getOption($this->customHelpOptions) === 1) && count($this->args) === 0 diff --git a/src/Module/Admin/Federation.php b/src/Module/Admin/Federation.php index 5144b1e76..0fae254dd 100644 --- a/src/Module/Admin/Federation.php +++ b/src/Module/Admin/Federation.php @@ -21,6 +21,7 @@ namespace Friendica\Module\Admin; +use Friendica\App; use Friendica\Core\Protocol; use Friendica\Core\Renderer; use Friendica\Database\DBA; @@ -202,7 +203,7 @@ class Federation extends BaseAdmin '$page' => DI::l10n()->t('Federation Statistics'), '$intro' => $intro, '$counts' => $counts, - '$version' => FRIENDICA_VERSION, + '$version' => App::VERSION, '$legendtext' => DI::l10n()->tt('Currently this node is aware of %2$s node (%3$s active users last month, %4$s active users last six months, %5$s registered users in total) from the following platforms:', 'Currently this node is aware of %2$s nodes (%3$s active users last month, %4$s active users last six months, %5$s registered users in total) from the following platforms:', $total, number_format($total), number_format($month), number_format($halfyear), number_format($users)), ]); } diff --git a/src/Module/Admin/Summary.php b/src/Module/Admin/Summary.php index 667b32242..8eb4978b6 100644 --- a/src/Module/Admin/Summary.php +++ b/src/Module/Admin/Summary.php @@ -21,6 +21,7 @@ namespace Friendica\Module\Admin; +use Friendica\App; use Friendica\Core\Addon; use Friendica\Core\Config\ValueObject\Cache; use Friendica\Core\Logger; @@ -79,8 +80,8 @@ class Summary extends BaseAdmin // the local version of Friendica. Check is opt-in, source may be stable or develop branch if (DI::config()->get('system', 'check_new_version_url', 'none') != 'none') { $gitversion = DI::config()->get('system', 'git_friendica_version'); - if (version_compare(FRIENDICA_VERSION, $gitversion) < 0) { - $warningtext[] = DI::l10n()->t('There is a new version of Friendica available for download. Your current version is %1$s, upstream version is %2$s', FRIENDICA_VERSION, $gitversion); + if (version_compare(App::VERSION, $gitversion) < 0) { + $warningtext[] = DI::l10n()->t('There is a new version of Friendica available for download. Your current version is %1$s, upstream version is %2$s', App::VERSION, $gitversion); } } @@ -236,9 +237,9 @@ class Summary extends BaseAdmin '$users' => [DI::l10n()->t('Registered users'), $users], '$accounts' => $accounts, '$pending' => [DI::l10n()->t('Pending registrations'), $pending], - '$version' => [DI::l10n()->t('Version'), FRIENDICA_VERSION], - '$platform' => FRIENDICA_PLATFORM, - '$codename' => FRIENDICA_CODENAME, + '$version' => [DI::l10n()->t('Version'), App::VERSION], + '$platform' => App::PLATFORM, + '$codename' => App::CODENAME, '$build' => DI::config()->get('system', 'build'), '$addons' => [DI::l10n()->t('Active addons'), Addon::getEnabledList()], '$serversettings' => $server_settings, diff --git a/src/Module/Api/GNUSocial/GNUSocial/Config.php b/src/Module/Api/GNUSocial/GNUSocial/Config.php index 75c70ce06..6e9a6e9f4 100644 --- a/src/Module/Api/GNUSocial/GNUSocial/Config.php +++ b/src/Module/Api/GNUSocial/GNUSocial/Config.php @@ -53,9 +53,9 @@ class Config extends BaseApi 'sslserver' => null, 'ssl' => DI::config()->get('system', 'ssl_policy') == App\BaseURL::SSL_POLICY_FULL ? 'always' : '0', 'friendica' => [ - 'FRIENDICA_PLATFORM' => FRIENDICA_PLATFORM, - 'FRIENDICA_VERSION' => FRIENDICA_VERSION, - 'DB_UPDATE_VERSION' => DB_UPDATE_VERSION, + 'FRIENDICA_PLATFORM' => App::PLATFORM, + 'FRIENDICA_VERSION' => App::VERSION, + 'DB_UPDATE_VERSION' => App::VERSION, ] ], ]; diff --git a/src/Module/Friendica.php b/src/Module/Friendica.php index 012f65ef6..37bd69da4 100644 --- a/src/Module/Friendica.php +++ b/src/Module/Friendica.php @@ -21,6 +21,7 @@ namespace Friendica\Module; +use Friendica\App; use Friendica\BaseModule; use Friendica\Core\Addon; use Friendica\Core\Hook; @@ -96,7 +97,7 @@ class Friendica extends BaseModule return Renderer::replaceMacros($tpl, [ 'about' => DI::l10n()->t('This is Friendica, version %s that is running at the web location %s. The database version is %s, the post update version is %s.', - '' . FRIENDICA_VERSION . '', + '' . App::VERSION . '', DI::baseUrl()->get(), '' . $config->get('system', 'build') . '/' . DB_UPDATE_VERSION . '', '' . $config->get('system', 'post_update_version') . '/' . PostUpdate::VERSION . ''), @@ -169,7 +170,7 @@ class Friendica extends BaseModule } $data = [ - 'version' => FRIENDICA_VERSION, + 'version' => App::VERSION, 'url' => DI::baseUrl()->get(), 'addons' => $visible_addons, 'locked_features' => $locked_features, @@ -178,7 +179,7 @@ class Friendica extends BaseModule 'register_policy' => $register_policy, 'admin' => $admin, 'site_name' => $config->get('config', 'sitename'), - 'platform' => strtolower(FRIENDICA_PLATFORM), + 'platform' => strtolower(App::PLATFORM), 'info' => $config->get('config', 'info'), 'no_scrape_url' => DI::baseUrl()->get() . '/noscrape', ]; diff --git a/src/Module/NodeInfo110.php b/src/Module/NodeInfo110.php index a308f8e6f..2f7042f10 100644 --- a/src/Module/NodeInfo110.php +++ b/src/Module/NodeInfo110.php @@ -53,7 +53,7 @@ class NodeInfo110 extends BaseModule 'version' => '1.0', 'software' => [ 'name' => 'friendica', - 'version' => FRIENDICA_VERSION . '-' . DB_UPDATE_VERSION, + 'version' => App::VERSION . '-' . DB_UPDATE_VERSION, ], 'protocols' => [ 'inbound' => [ diff --git a/src/Module/NodeInfo120.php b/src/Module/NodeInfo120.php index 3e6a69b74..34880c4e3 100644 --- a/src/Module/NodeInfo120.php +++ b/src/Module/NodeInfo120.php @@ -53,7 +53,7 @@ class NodeInfo120 extends BaseModule 'version' => '2.0', 'software' => [ 'name' => 'friendica', - 'version' => FRIENDICA_VERSION . '-' . DB_UPDATE_VERSION, + 'version' => App::VERSION . '-' . DB_UPDATE_VERSION, ], 'protocols' => ['dfrn', 'activitypub'], 'services' => Nodeinfo::getServices(), diff --git a/src/Module/NodeInfo210.php b/src/Module/NodeInfo210.php index 723736a61..f12ce52cb 100644 --- a/src/Module/NodeInfo210.php +++ b/src/Module/NodeInfo210.php @@ -55,7 +55,7 @@ class NodeInfo210 extends BaseModule 'baseUrl' => $this->baseUrl->get(), 'name' => $this->config->get('config', 'sitename'), 'software' => 'friendica', - 'version' => FRIENDICA_VERSION . '-' . DB_UPDATE_VERSION, + 'version' => App::VERSION . '-' . DB_UPDATE_VERSION, ], 'organization' => Nodeinfo::getOrganization($this->config), 'protocols' => ['dfrn', 'activitypub'], diff --git a/src/Module/Settings/UserExport.php b/src/Module/Settings/UserExport.php index 4dfbdb99e..ccfd08b52 100644 --- a/src/Module/Settings/UserExport.php +++ b/src/Module/Settings/UserExport.php @@ -21,11 +21,11 @@ namespace Friendica\Module\Settings; +use Friendica\App; use Friendica\Core\Hook; use Friendica\Core\Renderer; use Friendica\Core\System; use Friendica\Database\DBA; -use Friendica\Database\DBStructure; use Friendica\DI; use Friendica\Model\Item; use Friendica\Model\Post; @@ -253,7 +253,7 @@ class UserExport extends BaseSettings ); $output = [ - 'version' => FRIENDICA_VERSION, + 'version' => App::VERSION, 'schema' => DB_UPDATE_VERSION, 'baseurl' => DI::baseUrl(), 'user' => $user, diff --git a/src/Module/Statistics.php b/src/Module/Statistics.php index db145bd43..e06fc6405 100644 --- a/src/Module/Statistics.php +++ b/src/Module/Statistics.php @@ -69,8 +69,8 @@ class Statistics extends BaseModule $statistics = array_merge([ 'name' => $this->config->get('config', 'sitename'), - 'network' => FRIENDICA_PLATFORM, - 'version' => FRIENDICA_VERSION . '-' . DB_UPDATE_VERSION, + 'network' => App::PLATFORM, + 'version' => App::VERSION . '-' . DB_UPDATE_VERSION, 'registrations_open' => $registration_open, 'total_users' => $this->config->get('nodeinfo', 'total_users'), 'active_users_halfyear' => $this->config->get('nodeinfo', 'active_users_halfyear'), diff --git a/src/Network/HTTPClient/Factory/HttpClient.php b/src/Network/HTTPClient/Factory/HttpClient.php index 29ef3c09e..713933222 100644 --- a/src/Network/HTTPClient/Factory/HttpClient.php +++ b/src/Network/HTTPClient/Factory/HttpClient.php @@ -86,9 +86,9 @@ class HttpClient extends BaseFactory $logger->notice('Curl redirect.', ['url' => $request->getUri(), 'to' => $uri, 'method' => $request->getMethod()]); }; - $userAgent = FRIENDICA_PLATFORM . " '" . - FRIENDICA_CODENAME . "' " . - FRIENDICA_VERSION . '-' . + $userAgent = App::PLATFORM . " '" . + App::CODENAME . "' " . + App::VERSION . '-' . DB_UPDATE_VERSION . '; ' . $this->baseUrl->get(); diff --git a/src/Object/Api/Mastodon/Instance.php b/src/Object/Api/Mastodon/Instance.php index 0ae96c972..45fc4bf89 100644 --- a/src/Object/Api/Mastodon/Instance.php +++ b/src/Object/Api/Mastodon/Instance.php @@ -21,11 +21,11 @@ namespace Friendica\Object\Api\Mastodon; +use Friendica\App; use Friendica\App\BaseURL; use Friendica\BaseDataTransferObject; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Database\Database; -use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\User; use Friendica\Module\Register; @@ -87,7 +87,7 @@ class Instance extends BaseDataTransferObject $this->title = $config->get('config', 'sitename'); $this->short_description = $this->description = $config->get('config', 'info'); $this->email = $config->get('config', 'admin_email'); - $this->version = '2.8.0 (compatible; Friendica ' . FRIENDICA_VERSION . ')'; + $this->version = '2.8.0 (compatible; Friendica ' . App::VERSION . ')'; $this->urls = null; // Not supported $this->stats = new Stats($config, $database); $this->thumbnail = $baseUrl->get() . ($config->get('system', 'shortcut_icon') ?? 'images/friendica-32.png'); diff --git a/src/Protocol/ActivityPub/Transmitter.php b/src/Protocol/ActivityPub/Transmitter.php index 8b9571e55..11a64504b 100644 --- a/src/Protocol/ActivityPub/Transmitter.php +++ b/src/Protocol/ActivityPub/Transmitter.php @@ -21,6 +21,7 @@ namespace Friendica\Protocol\ActivityPub; +use Friendica\App; use Friendica\Content\Feature; use Friendica\Content\Text\BBCode; use Friendica\Core\Cache\Enum\Duration; @@ -416,7 +417,7 @@ class Transmitter { return [ 'type' => 'Service', - 'name' => FRIENDICA_PLATFORM . " '" . FRIENDICA_CODENAME . "' " . FRIENDICA_VERSION . '-' . DB_UPDATE_VERSION, + 'name' => App::PLATFORM . " '" . App::CODENAME . "' " . App::VERSION . '-' . DB_UPDATE_VERSION, 'url' => DI::baseUrl()->get() ]; } diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index 47637bc2e..7e92f1292 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -25,6 +25,7 @@ use DOMDocument; use DOMElement; use DOMNode; use DOMXPath; +use Friendica\App; use Friendica\Content\Text\BBCode; use Friendica\Core\Logger; use Friendica\Core\Protocol; @@ -369,8 +370,8 @@ class DFRN XML::addElement($doc, $root, 'id', DI::baseUrl() . '/profile/' . $owner['nick']); XML::addElement($doc, $root, 'title', $owner['name']); - $attributes = ['uri' => 'https://friendi.ca', 'version' => FRIENDICA_VERSION . '-' . DB_UPDATE_VERSION]; - XML::addElement($doc, $root, 'generator', FRIENDICA_PLATFORM, $attributes); + $attributes = ['uri' => 'https://friendi.ca', 'version' => App::VERSION . '-' . DB_UPDATE_VERSION]; + XML::addElement($doc, $root, 'generator', App::PLATFORM, $attributes); $attributes = ['rel' => 'license', 'href' => 'http://creativecommons.org/licenses/by/3.0/']; XML::addElement($doc, $root, 'link', '', $attributes); diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index f1521ac2d..907dfd8b9 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -24,6 +24,7 @@ namespace Friendica\Protocol; use DOMDocument; use DOMElement; use DOMXPath; +use Friendica\App; use Friendica\Content\PageInfo; use Friendica\Content\Text\BBCode; use Friendica\Content\Text\HTML; @@ -1035,8 +1036,8 @@ class Feed break; } - $attributes = ['uri' => 'https://friendi.ca', 'version' => FRIENDICA_VERSION . '-' . DB_UPDATE_VERSION]; - XML::addElement($doc, $root, 'generator', FRIENDICA_PLATFORM, $attributes); + $attributes = ['uri' => 'https://friendi.ca', 'version' => App::VERSION . '-' . DB_UPDATE_VERSION]; + XML::addElement($doc, $root, 'generator', App::PLATFORM, $attributes); XML::addElement($doc, $root, 'id', DI::baseUrl() . '/profile/' . $owner['nick']); XML::addElement($doc, $root, 'title', $title); XML::addElement($doc, $root, 'subtitle', sprintf("Updates from %s on %s", $owner['name'], DI::config()->get('config', 'sitename'))); diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php index bd6002392..d01f467ad 100644 --- a/src/Protocol/OStatus.php +++ b/src/Protocol/OStatus.php @@ -24,6 +24,7 @@ namespace Friendica\Protocol; use DOMDocument; use DOMElement; use DOMXPath; +use Friendica\App; use Friendica\Content\Text\BBCode; use Friendica\Content\Text\HTML; use Friendica\Core\Cache\Enum\Duration; @@ -1061,9 +1062,9 @@ class OStatus $attributes = [ 'uri' => 'https://friendi.ca', - 'version' => FRIENDICA_VERSION . '-' . DB_UPDATE_VERSION, + 'version' => App::VERSION . '-' . DB_UPDATE_VERSION, ]; - XML::addElement($doc, $root, 'generator', FRIENDICA_PLATFORM, $attributes); + XML::addElement($doc, $root, 'generator', App::PLATFORM, $attributes); XML::addElement($doc, $root, 'id', DI::baseUrl() . '/profile/' . $owner['nick']); XML::addElement($doc, $root, 'title', $title); XML::addElement($doc, $root, 'subtitle', sprintf("Updates from %s on %s", $owner['name'], DI::config()->get('config', 'sitename'))); diff --git a/src/Util/EMailer/MailBuilder.php b/src/Util/EMailer/MailBuilder.php index 321bdc9e6..2aadf955a 100644 --- a/src/Util/EMailer/MailBuilder.php +++ b/src/Util/EMailer/MailBuilder.php @@ -22,6 +22,7 @@ namespace Friendica\Util\EMailer; use Exception; +use Friendica\App; use Friendica\App\BaseURL; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\L10n; @@ -79,8 +80,8 @@ abstract class MailBuilder $this->headers = [ 'Precedence' => ['list'], 'X-Friendica-Host' => [$hostname], - 'X-Friendica-Platform' => [FRIENDICA_PLATFORM], - 'X-Friendica-Version' => [FRIENDICA_VERSION], + 'X-Friendica-Platform' => [App::PLATFORM], + 'X-Friendica-Version' => [App::VERSION], 'List-ID' => [''], 'List-Archive' => ['<' . $baseUrl->get() . '/notifications/system>'], ]; @@ -257,7 +258,7 @@ abstract class MailBuilder $tpl = Renderer::getMarkupTemplate('email/html.tpl'); $msgHtml = Renderer::replaceMacros($tpl, [ '$title' => $this->l10n->t('Friendica Notification'), - '$product' => FRIENDICA_PLATFORM, + '$product' => App::PLATFORM, '$htmlversion' => $msgHtml, '$sitename' => $this->config->get('config', 'sitename'), '$banner' => $this->config->get('system', 'email_banner', diff --git a/src/Util/Writer/DbaDefinitionSqlWriter.php b/src/Util/Writer/DbaDefinitionSqlWriter.php index f5e41847f..9f6d4701b 100644 --- a/src/Util/Writer/DbaDefinitionSqlWriter.php +++ b/src/Util/Writer/DbaDefinitionSqlWriter.php @@ -22,6 +22,7 @@ namespace Friendica\Util\Writer; use Exception; +use Friendica\App; use Friendica\Database\Definition\DbaDefinition; /** @@ -41,7 +42,7 @@ class DbaDefinitionSqlWriter public static function create(DbaDefinition $definition): string { $sqlString = "-- ------------------------------------------\n"; - $sqlString .= "-- " . FRIENDICA_PLATFORM . " " . FRIENDICA_VERSION . " (" . FRIENDICA_CODENAME . ")\n"; + $sqlString .= "-- " . App::PLATFORM . " " . App::VERSION . " (" . App::CODENAME . ")\n"; $sqlString .= "-- DB_UPDATE_VERSION " . DB_UPDATE_VERSION . "\n"; $sqlString .= "-- ------------------------------------------\n\n\n"; diff --git a/tests/src/Module/NodeInfoTest.php b/tests/src/Module/NodeInfoTest.php index ac3916faf..a7766d247 100644 --- a/tests/src/Module/NodeInfoTest.php +++ b/tests/src/Module/NodeInfoTest.php @@ -21,12 +21,12 @@ namespace Friendica\Test\src\Module; +use Friendica\App; use Friendica\Capabilities\ICanCreateResponses; use Friendica\DI; use Friendica\Module\NodeInfo110; use Friendica\Module\NodeInfo120; use Friendica\Module\NodeInfo210; -use Friendica\Module\Response; use Friendica\Test\FixtureTest; class NodeInfoTest extends FixtureTest @@ -44,7 +44,7 @@ class NodeInfoTest extends FixtureTest self::assertEquals('1.0', $json->version); self::assertEquals('friendica', $json->software->name); - self::assertEquals(FRIENDICA_VERSION . '-' . DB_UPDATE_VERSION, $json->software->version); + self::assertEquals(App::VERSION . '-' . DB_UPDATE_VERSION, $json->software->version); self::assertIsArray($json->protocols->inbound); self::assertIsArray($json->protocols->outbound); @@ -65,7 +65,7 @@ class NodeInfoTest extends FixtureTest self::assertEquals('2.0', $json->version); self::assertEquals('friendica', $json->software->name); - self::assertEquals(FRIENDICA_VERSION . '-' . DB_UPDATE_VERSION, $json->software->version); + self::assertEquals(App::VERSION . '-' . DB_UPDATE_VERSION, $json->software->version); self::assertIsArray($json->protocols); self::assertIsArray($json->services->inbound); @@ -85,7 +85,7 @@ class NodeInfoTest extends FixtureTest self::assertEquals('1.0', $json->version); self::assertEquals('friendica', $json->server->software); - self::assertEquals(FRIENDICA_VERSION . '-' . DB_UPDATE_VERSION, $json->server->version); + self::assertEquals(App::VERSION . '-' . DB_UPDATE_VERSION, $json->server->version); self::assertIsArray($json->protocols); self::assertIsArray($json->services->inbound); From 4ff7c37f85cdedb3f033bec92228c8ef22def574 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 17 Oct 2022 11:27:32 +0000 Subject: [PATCH 19/27] Replace "notice" calls --- mod/cal.php | 8 ++++---- mod/editpost.php | 6 +++--- mod/events.php | 8 ++++---- mod/follow.php | 16 ++++++++-------- mod/item.php | 12 ++++++------ mod/lostpass.php | 6 +++--- mod/match.php | 2 +- mod/message.php | 22 +++++++++++----------- mod/notes.php | 2 +- src/Module/Delegation.php | 2 +- 10 files changed, 42 insertions(+), 42 deletions(-) diff --git a/mod/cal.php b/mod/cal.php index 3f249da0a..ec6df1f16 100644 --- a/mod/cal.php +++ b/mod/cal.php @@ -119,7 +119,7 @@ function cal_content(App $a) $is_owner = local_user() == $owner['uid']; if ($owner['hidewall'] && !$is_owner && !$remote_contact) { - notice(DI::l10n()->t('Access to this profile has been restricted.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Access to this profile has been restricted.')); return; } @@ -262,7 +262,7 @@ function cal_content(App $a) if ($mode == 'export') { if (!$owner_uid) { - notice(DI::l10n()->t('User not found')); + DI::sysmsg()->addNotice(DI::l10n()->t('User not found')); return; } @@ -271,9 +271,9 @@ function cal_content(App $a) if (!$evexport["success"]) { if ($evexport["content"]) { - notice(DI::l10n()->t('This calendar format is not supported')); + DI::sysmsg()->addNotice(DI::l10n()->t('This calendar format is not supported')); } else { - notice(DI::l10n()->t('No exportable data found')); + DI::sysmsg()->addNotice(DI::l10n()->t('No exportable data found')); } // If it the own calendar return to the events page diff --git a/mod/editpost.php b/mod/editpost.php index 3fb8c80ec..8d2160fde 100644 --- a/mod/editpost.php +++ b/mod/editpost.php @@ -35,14 +35,14 @@ function editpost_content(App $a) $o = ''; if (!local_user()) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); return; } $post_id = ((DI::args()->getArgc() > 1) ? intval(DI::args()->getArgv()[1]) : 0); if (!$post_id) { - notice(DI::l10n()->t('Item not found')); + DI::sysmsg()->addNotice(DI::l10n()->t('Item not found')); return; } @@ -52,7 +52,7 @@ function editpost_content(App $a) $item = Post::selectFirstForUser(local_user(), $fields, ['id' => $post_id, 'uid' => local_user()]); if (!DBA::isResult($item)) { - notice(DI::l10n()->t('Item not found')); + DI::sysmsg()->addNotice(DI::l10n()->t('Item not found')); return; } diff --git a/mod/events.php b/mod/events.php index eead66c01..f1d8a7ca6 100644 --- a/mod/events.php +++ b/mod/events.php @@ -121,7 +121,7 @@ function events_post(App $a) $onerror_path = 'events/' . $action . '?' . http_build_query($params, '', '&', PHP_QUERY_RFC3986); if (strcmp($finish, $start) < 0 && !$nofinish) { - notice(DI::l10n()->t('Event can not end before it has started.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Event can not end before it has started.')); if (intval($_REQUEST['preview'])) { System::httpExit(DI::l10n()->t('Event can not end before it has started.')); } @@ -129,7 +129,7 @@ function events_post(App $a) } if (!$summary || ($start === DBA::NULL_DATETIME)) { - notice(DI::l10n()->t('Event title and start time are required.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Event title and start time are required.')); if (intval($_REQUEST['preview'])) { System::httpExit(DI::l10n()->t('Event title and start time are required.')); } @@ -214,7 +214,7 @@ function events_post(App $a) function events_content(App $a) { if (!local_user()) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); return Login::form(); } @@ -531,7 +531,7 @@ function events_content(App $a) } if (Post::exists(['id' => $ev[0]['itemid']])) { - notice(DI::l10n()->t('Failed to remove event')); + DI::sysmsg()->addNotice(DI::l10n()->t('Failed to remove event')); } DI::baseUrl()->redirect('events'); diff --git a/mod/follow.php b/mod/follow.php index 818a1ae5e..b6ffe2ef0 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -53,7 +53,7 @@ function follow_content(App $a) $return_path = 'contact'; if (!local_user()) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); DI::baseUrl()->redirect($return_path); // NOTREACHED } @@ -81,7 +81,7 @@ function follow_content(App $a) if (DBA::isResult($user_contact)) { if ($user_contact['pending']) { - notice(DI::l10n()->t('You already added this contact.')); + DI::sysmsg()->addNotice(DI::l10n()->t('You already added this contact.')); $submit = ''; } } @@ -97,7 +97,7 @@ function follow_content(App $a) // Possibly it is a remote item and not an account follow_remote_item($url); - notice(DI::l10n()->t("The network type couldn't be detected. Contact can't be added.")); + DI::sysmsg()->addNotice(DI::l10n()->t("The network type couldn't be detected. Contact can't be added.")); $submit = ''; $contact = ['url' => $url, 'network' => Protocol::PHANTOM, 'name' => $url, 'keywords' => '']; } @@ -105,12 +105,12 @@ function follow_content(App $a) $protocol = Contact::getProtocol($contact['url'], $contact['network']); if (($protocol == Protocol::DIASPORA) && !DI::config()->get('system', 'diaspora_enabled')) { - notice(DI::l10n()->t("Diaspora support isn't enabled. Contact can't be added.")); + DI::sysmsg()->addNotice(DI::l10n()->t("Diaspora support isn't enabled. Contact can't be added.")); $submit = ''; } if (($protocol == Protocol::OSTATUS) && DI::config()->get('system', 'ostatus_disabled')) { - notice(DI::l10n()->t("OStatus support is disabled. Contact can't be added.")); + DI::sysmsg()->addNotice(DI::l10n()->t("OStatus support is disabled. Contact can't be added.")); $submit = ''; } @@ -127,7 +127,7 @@ function follow_content(App $a) $owner = User::getOwnerDataById($uid); if (empty($owner)) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); DI::baseUrl()->redirect($return_path); // NOTREACHED } @@ -181,14 +181,14 @@ function follow_process(App $a, string $url) follow_remote_item($url); if ($result['message']) { - notice($result['message']); + DI::sysmsg()->addNotice($result['message']); } DI::baseUrl()->redirect($return_path); } elseif ($result['cid']) { DI::baseUrl()->redirect('contact/' . $result['cid']); } - notice(DI::l10n()->t('The contact could not be added.')); + DI::sysmsg()->addNotice(DI::l10n()->t('The contact could not be added.')); DI::baseUrl()->redirect($return_path); } diff --git a/mod/item.php b/mod/item.php index 8f4494ca7..cc8e95385 100644 --- a/mod/item.php +++ b/mod/item.php @@ -129,7 +129,7 @@ function item_post(App $a) { } if (!DBA::isResult($toplevel_item)) { - notice(DI::l10n()->t('Unable to locate original post.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Unable to locate original post.')); if ($return_path) { DI::baseUrl()->redirect($return_path); } @@ -179,7 +179,7 @@ function item_post(App $a) { // Now check that valid personal details have been provided if (!Security::canWriteToUserWall($profile_uid) && !$allow_comment) { Logger::warning('Permission denied.', ['local' => local_user(), 'profile_uid' => $profile_uid, 'toplevel_item_id' => $toplevel_item_id, 'network' => $toplevel_item['network']]); - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); if ($return_path) { DI::baseUrl()->redirect($return_path); } @@ -335,7 +335,7 @@ function item_post(App $a) { System::jsonExit(['preview' => '']); } - notice(DI::l10n()->t('Empty post discarded.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Empty post discarded.')); if ($return_path) { DI::baseUrl()->redirect($return_path); } @@ -685,7 +685,7 @@ function item_post(App $a) { $post_id = Item::insert($datarray); if (!$post_id) { - notice(DI::l10n()->t('Item wasn\'t stored.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Item wasn\'t stored.')); if ($return_path) { DI::baseUrl()->redirect($return_path); } @@ -841,7 +841,7 @@ function drop_item(int $id, string $return = '') $item = Post::selectFirstForUser(local_user(), $fields, ['id' => $id]); if (!DBA::isResult($item)) { - notice(DI::l10n()->t('Item not found.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Item not found.')); DI::baseUrl()->redirect('network'); } @@ -863,7 +863,7 @@ function drop_item(int $id, string $return = '') item_redirect_after_action($item, $return); } else { Logger::warning('Permission denied.', ['local' => local_user(), 'uid' => $item['uid'], 'cid' => $contact_id]); - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); DI::baseUrl()->redirect('display/' . $item['guid']); //NOTREACHED } diff --git a/mod/lostpass.php b/mod/lostpass.php index 6aa76e0cc..150c170d7 100644 --- a/mod/lostpass.php +++ b/mod/lostpass.php @@ -37,7 +37,7 @@ function lostpass_post(App $a) $condition = ['(`email` = ? OR `nickname` = ?) AND `verified` = 1 AND `blocked` = 0', $loginame, $loginame]; $user = DBA::selectFirst('user', ['uid', 'username', 'nickname', 'email', 'language'], $condition); if (!DBA::isResult($user)) { - notice(DI::l10n()->t('No valid account found.')); + DI::sysmsg()->addNotice(DI::l10n()->t('No valid account found.')); DI::baseUrl()->redirect(); } @@ -97,7 +97,7 @@ function lostpass_content(App $a) $user = DBA::selectFirst('user', ['uid', 'username', 'nickname', 'email', 'pwdreset_time', 'language'], ['pwdreset' => hash('sha256', $pwdreset_token)]); if (!DBA::isResult($user)) { - notice(DI::l10n()->t("Request could not be verified. \x28You may have previously submitted it.\x29 Password reset failed.")); + DI::sysmsg()->addNotice(DI::l10n()->t("Request could not be verified. \x28You may have previously submitted it.\x29 Password reset failed.")); return lostpass_form(); } @@ -110,7 +110,7 @@ function lostpass_content(App $a) ]; DBA::update('user', $fields, ['uid' => $user['uid']]); - notice(DI::l10n()->t('Request has expired, please make a new one.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Request has expired, please make a new one.')); return lostpass_form(); } diff --git a/mod/match.php b/mod/match.php index 02ee0c333..5a5d3be93 100644 --- a/mod/match.php +++ b/mod/match.php @@ -59,7 +59,7 @@ function match_content(App $a) return ''; } if (!$profile['pub_keywords'] && (!$profile['prv_keywords'])) { - notice(DI::l10n()->t('No keywords to match. Please add keywords to your profile.')); + DI::sysmsg()->addNotice(DI::l10n()->t('No keywords to match. Please add keywords to your profile.')); return ''; } diff --git a/mod/message.php b/mod/message.php index a07c8b449..d1231b7c5 100644 --- a/mod/message.php +++ b/mod/message.php @@ -66,7 +66,7 @@ function message_init(App $a) function message_post(App $a) { if (!local_user()) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); return; } @@ -80,17 +80,17 @@ function message_post(App $a) switch ($ret) { case -1: - notice(DI::l10n()->t('No recipient selected.')); + DI::sysmsg()->addNotice(DI::l10n()->t('No recipient selected.')); $norecip = true; break; case -2: - notice(DI::l10n()->t('Unable to locate contact information.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Unable to locate contact information.')); break; case -3: - notice(DI::l10n()->t('Message could not be sent.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Message could not be sent.')); break; case -4: - notice(DI::l10n()->t('Message collection failure.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Message collection failure.')); break; } @@ -108,7 +108,7 @@ function message_content(App $a) Nav::setSelected('messages'); if (!local_user()) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); return Login::form(); } @@ -143,12 +143,12 @@ function message_content(App $a) if ($cmd === 'drop') { $message = DBA::selectFirst('mail', ['convid'], ['id' => DI::args()->getArgv()[2], 'uid' => local_user()]); if(!DBA::isResult($message)){ - notice(DI::l10n()->t('Conversation not found.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Conversation not found.')); DI::baseUrl()->redirect('message'); } if (!DBA::delete('mail', ['id' => DI::args()->getArgv()[2], 'uid' => local_user()])) { - notice(DI::l10n()->t('Message was not deleted.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Message was not deleted.')); } $conversation = DBA::selectFirst('mail', ['id'], ['convid' => $message['convid'], 'uid' => local_user()]); @@ -163,7 +163,7 @@ function message_content(App $a) $parent = $parentmail['parent-uri']; if (!DBA::delete('mail', ['parent-uri' => $parent, 'uid' => local_user()])) { - notice(DI::l10n()->t('Conversation was not removed.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Conversation was not removed.')); } } DI::baseUrl()->redirect('message'); @@ -219,7 +219,7 @@ function message_content(App $a) $r = get_messages(local_user(), $pager->getStart(), $pager->getItemsPerPage()); if (!DBA::isResult($r)) { - notice(DI::l10n()->t('No messages.')); + DI::sysmsg()->addNotice(DI::l10n()->t('No messages.')); return $o; } @@ -275,7 +275,7 @@ function message_content(App $a) } if (!DBA::isResult($messages)) { - notice(DI::l10n()->t('Message not available.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Message not available.')); return $o; } diff --git a/mod/notes.php b/mod/notes.php index b5bdbf870..a30d80769 100644 --- a/mod/notes.php +++ b/mod/notes.php @@ -41,7 +41,7 @@ function notes_init(App $a) function notes_content(App $a, $update = false) { if (!local_user()) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); return; } diff --git a/src/Module/Delegation.php b/src/Module/Delegation.php index c14573c8b..146e9382b 100644 --- a/src/Module/Delegation.php +++ b/src/Module/Delegation.php @@ -108,7 +108,7 @@ class Delegation extends BaseModule $ret = []; Hook::callAll('home_init', $ret); - notice($this->t('You are now logged in as %s', $user['username'])); + DI::sysmsg()->addNotice($this->t('You are now logged in as %s', $user['username'])); DI::baseUrl()->redirect('network'); } From e96fd5166a1e16587dc874560b7db218e699c8a7 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 17 Oct 2022 11:28:54 +0000 Subject: [PATCH 20/27] Fix wrong constant --- src/Module/Api/GNUSocial/GNUSocial/Config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Module/Api/GNUSocial/GNUSocial/Config.php b/src/Module/Api/GNUSocial/GNUSocial/Config.php index 6e9a6e9f4..8b38ca896 100644 --- a/src/Module/Api/GNUSocial/GNUSocial/Config.php +++ b/src/Module/Api/GNUSocial/GNUSocial/Config.php @@ -55,7 +55,7 @@ class Config extends BaseApi 'friendica' => [ 'FRIENDICA_PLATFORM' => App::PLATFORM, 'FRIENDICA_VERSION' => App::VERSION, - 'DB_UPDATE_VERSION' => App::VERSION, + 'DB_UPDATE_VERSION' => DB_UPDATE_VERSION, ] ], ]; From fdfa1f8630e320f4a5a1992898cd0efbe8faea53 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 17 Oct 2022 18:55:22 +0000 Subject: [PATCH 21/27] The notice and info have been moved --- boot.php | 30 ------------- mod/lostpass.php | 4 +- mod/match.php | 2 +- mod/ostatus_subscribe.php | 2 +- mod/photos.php | 42 +++++++++---------- mod/repair_ostatus.php | 2 +- mod/settings.php | 10 ++--- mod/uimport.php | 6 +-- mod/unfollow.php | 14 +++---- mod/wall_attach.php | 4 +- mod/wall_upload.php | 4 +- mod/wallmessage.php | 24 +++++------ src/BaseModule.php | 2 +- src/Core/UserImport.php | 14 +++---- src/Model/Group.php | 2 +- src/Model/Profile.php | 2 +- src/Module/Admin/Addons/Details.php | 6 +-- src/Module/Admin/Addons/Index.php | 8 ++-- src/Module/Admin/Blocklist/Contact.php | 8 ++-- src/Module/Admin/DBSync.php | 2 +- src/Module/Admin/Item/Delete.php | 2 +- src/Module/Admin/Logs/Settings.php | 2 +- src/Module/Admin/Storage.php | 8 ++-- src/Module/Admin/Themes/Details.php | 8 ++-- src/Module/Admin/Themes/Embed.php | 2 +- src/Module/Admin/Themes/Index.php | 10 ++--- src/Module/Admin/Users/Active.php | 14 +++---- src/Module/Admin/Users/Blocked.php | 14 +++---- src/Module/Admin/Users/Create.php | 2 +- src/Module/Admin/Users/Index.php | 18 ++++---- src/Module/Admin/Users/Pending.php | 10 ++--- src/Module/Apps.php | 3 +- src/Module/BaseAdmin.php | 2 +- src/Module/BaseSearch.php | 2 +- src/Module/Contact.php | 2 +- src/Module/Contact/Advanced.php | 3 +- src/Module/Contact/Profile.php | 7 ++-- src/Module/Contact/Revoke.php | 3 +- src/Module/Conversation/Community.php | 2 +- src/Module/Conversation/Network.php | 4 +- src/Module/Debug/Feed.php | 3 +- src/Module/Directory.php | 2 +- src/Module/Filer/SaveTag.php | 3 +- src/Module/FollowConfirm.php | 2 +- src/Module/FriendSuggest.php | 7 ++-- src/Module/Group.php | 18 ++++---- src/Module/Invite.php | 8 ++-- src/Module/Notifications/Introductions.php | 3 +- src/Module/Notifications/Notification.php | 3 +- src/Module/Profile/Profile.php | 2 +- src/Module/Profile/Status.php | 2 +- src/Module/Register.php | 38 ++++++++--------- src/Module/RemoteFollow.php | 9 ++-- src/Module/Search/Directory.php | 2 +- src/Module/Search/Index.php | 4 +- src/Module/Search/Saved.php | 7 ++-- src/Module/Security/Logout.php | 3 +- src/Module/Security/OpenID.php | 4 +- src/Module/Security/TwoFactor/Recovery.php | 5 ++- src/Module/Security/TwoFactor/SignOut.php | 9 ++-- src/Module/Security/TwoFactor/Trust.php | 3 +- src/Module/Settings/Account.php | 26 ++++++------ src/Module/Settings/Delegation.php | 12 +++--- src/Module/Settings/Display.php | 2 +- src/Module/Settings/Profile/Index.php | 6 +-- src/Module/Settings/Profile/Photo/Crop.php | 12 +++--- src/Module/Settings/Profile/Photo/Index.php | 10 ++--- src/Module/Settings/TwoFactor/AppSpecific.php | 13 +++--- src/Module/Settings/TwoFactor/Index.php | 4 +- src/Module/Settings/TwoFactor/Recovery.php | 5 ++- src/Module/Settings/TwoFactor/Trusted.php | 7 ++-- src/Module/Settings/TwoFactor/Verify.php | 7 ++-- src/Security/Authentication.php | 10 ++--- 73 files changed, 273 insertions(+), 284 deletions(-) diff --git a/boot.php b/boot.php index 6336c2e41..24486f413 100644 --- a/boot.php +++ b/boot.php @@ -126,33 +126,3 @@ function remote_user() return false; } - -/** - * Show an error message to user. - * - * This function save text in session, to be shown to the user at next page load - * - * @param string $s - Text of notice - * - * @return void - * @deprecated since version 2022.09, use \Friendica\Navigation\SystemMessages instead - */ -function notice(string $s) -{ - \Friendica\DI::sysmsg()->addNotice($s); -} - -/** - * Show an info message to user. - * - * This function save text in session, to be shown to the user at next page load - * - * @param string $s - Text of notice - * - * @return void - * @deprecated since version 2022.09, use \Friendica\Navigation\SystemMessages instead - */ -function info(string $s) -{ - \Friendica\DI::sysmsg()->addInfo($s); -} diff --git a/mod/lostpass.php b/mod/lostpass.php index 150c170d7..62b621b8c 100644 --- a/mod/lostpass.php +++ b/mod/lostpass.php @@ -49,7 +49,7 @@ function lostpass_post(App $a) ]; $result = DBA::update('user', $fields, ['uid' => $user['uid']]); if ($result) { - info(DI::l10n()->t('Password reset request issued. Check your email.')); + DI::sysmsg()->addInfo(DI::l10n()->t('Password reset request issued. Check your email.')); } $sitename = DI::config()->get('config', 'sitename'); @@ -152,7 +152,7 @@ function lostpass_generate_password($user) '$newpass' => $new_password, ]); - info(DI::l10n()->t("Your password has been reset.")); + DI::sysmsg()->addInfo(DI::l10n()->t("Your password has been reset.")); $sitename = DI::config()->get('config', 'sitename'); $preamble = Strings::deindent(DI::l10n()->t(' diff --git a/mod/match.php b/mod/match.php index 5a5d3be93..a1f7be77c 100644 --- a/mod/match.php +++ b/mod/match.php @@ -90,7 +90,7 @@ function match_content(App $a) } if (empty($entries)) { - info(DI::l10n()->t('No matches')); + DI::sysmsg()->addInfo(DI::l10n()->t('No matches')); } $tpl = Renderer::getMarkupTemplate('viewcontact_template.tpl'); diff --git a/mod/ostatus_subscribe.php b/mod/ostatus_subscribe.php index 781de3493..2ecea6016 100644 --- a/mod/ostatus_subscribe.php +++ b/mod/ostatus_subscribe.php @@ -30,7 +30,7 @@ use Friendica\Protocol\ActivityPub; function ostatus_subscribe_content(App $a) { if (!local_user()) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); DI::baseUrl()->redirect('ostatus_subscribe'); // NOTREACHED } diff --git a/mod/photos.php b/mod/photos.php index 6a4596bf2..047328aa5 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -157,14 +157,14 @@ function photos_post(App $a) } if (!$can_post) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); System::exit(); } $owner_record = User::getOwnerDataById($page_owner_uid); if (!$owner_record) { - notice(DI::l10n()->t('Contact information unavailable')); + DI::sysmsg()->addNotice(DI::l10n()->t('Contact information unavailable')); DI::logger()->info('photos_post: unable to locate contact record for page owner. uid=' . $page_owner_uid); System::exit(); } @@ -193,7 +193,7 @@ function photos_post(App $a) $album = hex2bin(DI::args()->getArgv()[3]); if (!DBA::exists('photo', ['album' => $album, 'uid' => $page_owner_uid, 'photo-type' => Photo::DEFAULT])) { - notice(DI::l10n()->t('Album not found.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Album not found.')); DI::baseUrl()->redirect('photos/' . $user['nickname'] . '/album'); return; // NOTREACHED } @@ -247,9 +247,9 @@ function photos_post(App $a) // Update the photo albums cache Photo::clearAlbumCache($page_owner_uid); - notice(DI::l10n()->t('Album successfully deleted')); + DI::sysmsg()->addNotice(DI::l10n()->t('Album successfully deleted')); } else { - notice(DI::l10n()->t('Album was empty.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Album was empty.')); } } @@ -281,7 +281,7 @@ function photos_post(App $a) // Update the photo albums cache Photo::clearAlbumCache($page_owner_uid); } else { - notice(DI::l10n()->t('Failed to delete the photo.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Failed to delete the photo.')); DI::baseUrl()->redirect('photos/' . DI::args()->getArgv()[1] . '/image/' . DI::args()->getArgv()[3]); } @@ -633,21 +633,21 @@ function photos_post(App $a) if ($error !== UPLOAD_ERR_OK) { switch ($error) { case UPLOAD_ERR_INI_SIZE: - notice(DI::l10n()->t('Image exceeds size limit of %s', ini_get('upload_max_filesize'))); + DI::sysmsg()->addNotice(DI::l10n()->t('Image exceeds size limit of %s', ini_get('upload_max_filesize'))); break; case UPLOAD_ERR_FORM_SIZE: - notice(DI::l10n()->t('Image exceeds size limit of %s', Strings::formatBytes($_REQUEST['MAX_FILE_SIZE'] ?? 0))); + DI::sysmsg()->addNotice(DI::l10n()->t('Image exceeds size limit of %s', Strings::formatBytes($_REQUEST['MAX_FILE_SIZE'] ?? 0))); break; case UPLOAD_ERR_PARTIAL: - notice(DI::l10n()->t('Image upload didn\'t complete, please try again')); + DI::sysmsg()->addNotice(DI::l10n()->t('Image upload didn\'t complete, please try again')); break; case UPLOAD_ERR_NO_FILE: - notice(DI::l10n()->t('Image file is missing')); + DI::sysmsg()->addNotice(DI::l10n()->t('Image file is missing')); break; case UPLOAD_ERR_NO_TMP_DIR: case UPLOAD_ERR_CANT_WRITE: case UPLOAD_ERR_EXTENSION: - notice(DI::l10n()->t('Server can\'t accept new file upload at this time, please contact your administrator')); + DI::sysmsg()->addNotice(DI::l10n()->t('Server can\'t accept new file upload at this time, please contact your administrator')); break; } @unlink($src); @@ -663,7 +663,7 @@ function photos_post(App $a) $maximagesize = DI::config()->get('system', 'maximagesize'); if ($maximagesize && ($filesize > $maximagesize)) { - notice(DI::l10n()->t('Image exceeds size limit of %s', Strings::formatBytes($maximagesize))); + DI::sysmsg()->addNotice(DI::l10n()->t('Image exceeds size limit of %s', Strings::formatBytes($maximagesize))); @unlink($src); $foo = 0; Hook::callAll('photo_post_end', $foo); @@ -671,7 +671,7 @@ function photos_post(App $a) } if (!$filesize) { - notice(DI::l10n()->t('Image file is empty.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Image file is empty.')); @unlink($src); $foo = 0; Hook::callAll('photo_post_end', $foo); @@ -686,7 +686,7 @@ function photos_post(App $a) if (!$image->isValid()) { Logger::notice('unable to process image'); - notice(DI::l10n()->t('Unable to process image.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Unable to process image.')); @unlink($src); $foo = 0; Hook::callAll('photo_post_end',$foo); @@ -712,7 +712,7 @@ function photos_post(App $a) if (!$r) { Logger::warning('image store failed'); - notice(DI::l10n()->t('Image upload failed.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Image upload failed.')); return; } @@ -799,12 +799,12 @@ function photos_content(App $a) } if (DI::config()->get('system', 'block_public') && !Session::isAuthenticated()) { - notice(DI::l10n()->t('Public access denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Public access denied.')); return; } if (empty($user)) { - notice(DI::l10n()->t('No photos selected')); + DI::sysmsg()->addNotice(DI::l10n()->t('No photos selected')); return; } @@ -873,7 +873,7 @@ function photos_content(App $a) } if ($user['hidewall'] && (local_user() != $owner_uid) && !$remote_contact) { - notice(DI::l10n()->t('Access to this item is restricted.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Access to this item is restricted.')); return; } @@ -888,7 +888,7 @@ function photos_content(App $a) // Display upload form if ($datatype === 'upload') { if (!$can_post) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); return; } @@ -1088,9 +1088,9 @@ function photos_content(App $a) if (!DBA::isResult($ph)) { if (DBA::exists('photo', ['resource-id' => $datum, 'uid' => $owner_uid])) { - notice(DI::l10n()->t('Permission denied. Access to this item may be restricted.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied. Access to this item may be restricted.')); } else { - notice(DI::l10n()->t('Photo not available')); + DI::sysmsg()->addNotice(DI::l10n()->t('Photo not available')); } return; } diff --git a/mod/repair_ostatus.php b/mod/repair_ostatus.php index b2ca61218..bc2c8bba2 100644 --- a/mod/repair_ostatus.php +++ b/mod/repair_ostatus.php @@ -28,7 +28,7 @@ use Friendica\Model\Contact; function repair_ostatus_content(App $a) { if (!local_user()) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); DI::baseUrl()->redirect('ostatus_repair'); // NOTREACHED } diff --git a/mod/settings.php b/mod/settings.php index 2e21c2682..093572f18 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -37,7 +37,7 @@ use Friendica\Protocol\Email; function settings_init(App $a) { if (!local_user()) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); return; } @@ -47,7 +47,7 @@ function settings_init(App $a) function settings_post(App $a) { if (!$a->isLoggedIn()) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); return; } @@ -119,7 +119,7 @@ function settings_post(App $a) $mbox = Email::connect($mb, $mail_user, $dcrpass); unset($dcrpass); if (!$mbox) { - notice(DI::l10n()->t('Failed to connect with email account using the settings provided.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Failed to connect with email account using the settings provided.')); } } } @@ -148,12 +148,12 @@ function settings_content(App $a) Nav::setSelected('settings'); if (!local_user()) { - //notice(DI::l10n()->t('Permission denied.')); + //DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); return Login::form(); } if (!empty($_SESSION['submanage'])) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); return ''; } diff --git a/mod/uimport.php b/mod/uimport.php index fb1ef25c3..da024a56e 100644 --- a/mod/uimport.php +++ b/mod/uimport.php @@ -30,7 +30,7 @@ use Friendica\DI; function uimport_post(App $a) { if ((DI::config()->get('config', 'register_policy') != \Friendica\Module\Register::OPEN) && !$a->isSiteAdmin()) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); return; } @@ -43,7 +43,7 @@ function uimport_post(App $a) function uimport_content(App $a) { if ((DI::config()->get('config', 'register_policy') != \Friendica\Module\Register::OPEN) && !$a->isSiteAdmin()) { - notice(DI::l10n()->t('User imports on closed servers can only be done by an administrator.')); + DI::sysmsg()->addNotice(DI::l10n()->t('User imports on closed servers can only be done by an administrator.')); return; } @@ -52,7 +52,7 @@ function uimport_content(App $a) $total = DBA::count('user', ["`register_date` > UTC_TIMESTAMP - INTERVAL 1 DAY"]); if ($total >= $max_dailies) { Logger::notice('max daily registrations exceeded.'); - notice(DI::l10n()->t('This site has exceeded the number of allowed daily account registrations. Please try again tomorrow.')); + DI::sysmsg()->addNotice(DI::l10n()->t('This site has exceeded the number of allowed daily account registrations. Please try again tomorrow.')); return; } } diff --git a/mod/unfollow.php b/mod/unfollow.php index 10830bd10..61c88ee9e 100644 --- a/mod/unfollow.php +++ b/mod/unfollow.php @@ -32,7 +32,7 @@ use Friendica\Util\Strings; function unfollow_post(App $a) { if (!local_user()) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); DI::baseUrl()->redirect('login'); // NOTREACHED } @@ -47,7 +47,7 @@ function unfollow_content(App $a) $base_return_path = 'contact'; if (!local_user()) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); DI::baseUrl()->redirect('login'); // NOTREACHED } @@ -62,13 +62,13 @@ function unfollow_content(App $a) $contact = DBA::selectFirst('contact', ['url', 'id', 'uid', 'network', 'addr', 'name'], $condition); if (!DBA::isResult($contact)) { - notice(DI::l10n()->t("You aren't following this contact.")); + DI::sysmsg()->addNotice(DI::l10n()->t("You aren't following this contact.")); DI::baseUrl()->redirect($base_return_path); // NOTREACHED } if (!Protocol::supportsFollow($contact['network'])) { - notice(DI::l10n()->t('Unfollowing is currently not supported by your network.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Unfollowing is currently not supported by your network.')); DI::baseUrl()->redirect($base_return_path . '/' . $contact['id']); // NOTREACHED } @@ -79,7 +79,7 @@ function unfollow_content(App $a) $self = DBA::selectFirst('contact', ['url'], ['uid' => $uid, 'self' => true]); if (!DBA::isResult($self)) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); DI::baseUrl()->redirect($base_return_path); // NOTREACHED } @@ -131,7 +131,7 @@ function unfollow_process(string $url) $contact = DBA::selectFirst('contact', [], $condition); if (!DBA::isResult($contact)) { - notice(DI::l10n()->t("You aren't following this contact.")); + DI::sysmsg()->addNotice(DI::l10n()->t("You aren't following this contact.")); DI::baseUrl()->redirect($base_return_path); // NOTREACHED } @@ -146,6 +146,6 @@ function unfollow_process(string $url) $notice_message = DI::l10n()->t('Unable to unfollow this contact, please contact your administrator'); } - notice($notice_message); + DI::sysmsg()->addNotice($notice_message); DI::baseUrl()->redirect($return_path); } diff --git a/mod/wall_attach.php b/mod/wall_attach.php index 43f4681df..8341d7252 100644 --- a/mod/wall_attach.php +++ b/mod/wall_attach.php @@ -66,7 +66,7 @@ function wall_attach_post(App $a) { if ($r_json) { System::jsonExit(['error' => DI::l10n()->t('Permission denied.')]); } - notice(DI::l10n()->t('Permission denied.') . EOL ); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.') . EOL ); System::exit(); } @@ -95,7 +95,7 @@ function wall_attach_post(App $a) { if ($r_json) { System::jsonExit(['error' => $msg]); } else { - notice($msg); + DI::sysmsg()->addNotice($msg); } System::exit(); } diff --git a/mod/wall_upload.php b/mod/wall_upload.php index 4554c55aa..befb0fceb 100644 --- a/mod/wall_upload.php +++ b/mod/wall_upload.php @@ -88,7 +88,7 @@ function wall_upload_post(App $a, $desktopmode = true) if ($r_json) { System::jsonExit(['error' => DI::l10n()->t('Permission denied.')]); } - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); System::exit(); } @@ -147,7 +147,7 @@ function wall_upload_post(App $a, $desktopmode = true) if ($r_json) { System::jsonExit(['error' => DI::l10n()->t('Invalid request.')]); } - notice(DI::l10n()->t('Invalid request.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Invalid request.')); System::exit(); } diff --git a/mod/wallmessage.php b/mod/wallmessage.php index e8f7d24e3..2b4b8d2a5 100644 --- a/mod/wallmessage.php +++ b/mod/wallmessage.php @@ -34,7 +34,7 @@ function wallmessage_post(App $a) { $replyto = Profile::getMyURL(); if (!$replyto) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); return; } @@ -53,13 +53,13 @@ function wallmessage_post(App $a) { } if (!$user['unkmail']) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); return; } $total = DBA::count('mail', ["`uid` = ? AND `created` > ? AND `unknown`", $user['uid'], DateTimeFormat::utc('now - 1 day')]); if ($total > $user['cntunkmail']) { - notice(DI::l10n()->t('Number of daily wall messages for %s exceeded. Message failed.', $user['username'])); + DI::sysmsg()->addNotice(DI::l10n()->t('Number of daily wall messages for %s exceeded. Message failed.', $user['username'])); return; } @@ -67,16 +67,16 @@ function wallmessage_post(App $a) { switch ($ret) { case -1: - notice(DI::l10n()->t('No recipient selected.')); + DI::sysmsg()->addNotice(DI::l10n()->t('No recipient selected.')); break; case -2: - notice(DI::l10n()->t('Unable to check your home location.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Unable to check your home location.')); break; case -3: - notice(DI::l10n()->t('Message could not be sent.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Message could not be sent.')); break; case -4: - notice(DI::l10n()->t('Message collection failure.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Message collection failure.')); break; } @@ -87,33 +87,33 @@ function wallmessage_post(App $a) { function wallmessage_content(App $a) { if (!Profile::getMyURL()) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); return; } $recipient = ((DI::args()->getArgc() > 1) ? DI::args()->getArgv()[1] : ''); if (!$recipient) { - notice(DI::l10n()->t('No recipient.')); + DI::sysmsg()->addNotice(DI::l10n()->t('No recipient.')); return; } $user = User::getByNickname($recipient); if (empty($user)) { - notice(DI::l10n()->t('No recipient.')); + DI::sysmsg()->addNotice(DI::l10n()->t('No recipient.')); Logger::notice('wallmessage: no recipient'); return; } if (!$user['unkmail']) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); return; } $total = DBA::count('mail', ["`uid` = ? AND `created` > ? AND `unknown`", $user['uid'], DateTimeFormat::utc('now - 1 day')]); if ($total > $user['cntunkmail']) { - notice(DI::l10n()->t('Number of daily wall messages for %s exceeded. Message failed.', $user['username'])); + DI::sysmsg()->addNotice(DI::l10n()->t('Number of daily wall messages for %s exceeded. Message failed.', $user['username'])); return; } diff --git a/src/BaseModule.php b/src/BaseModule.php index 99c297b75..e532b9536 100644 --- a/src/BaseModule.php +++ b/src/BaseModule.php @@ -397,7 +397,7 @@ abstract class BaseModule implements ICanHandleRequests if (!self::checkFormSecurityToken($typename, $formname)) { Logger::notice('checkFormSecurityToken failed: user ' . DI::app()->getLoggedInUserNickname() . ' - form element ' . $typename); Logger::debug('checkFormSecurityToken failed', ['request' => $_REQUEST]); - notice(self::getFormSecurityStandardErrorMessage()); + DI::sysmsg()->addNotice(self::getFormSecurityStandardErrorMessage()); DI::baseUrl()->redirect($err_redirect); } } diff --git a/src/Core/UserImport.php b/src/Core/UserImport.php index f8485fc29..be7bbf0b5 100644 --- a/src/Core/UserImport.php +++ b/src/Core/UserImport.php @@ -123,13 +123,13 @@ class UserImport $account = json_decode(file_get_contents($file['tmp_name']), true); if ($account === null) { - notice(DI::l10n()->t("Error decoding account file")); + DI::sysmsg()->addNotice(DI::l10n()->t("Error decoding account file")); return; } if (empty($account['version'])) { - notice(DI::l10n()->t("Error! No version data in file! This is not a Friendica account file?")); + DI::sysmsg()->addNotice(DI::l10n()->t("Error! No version data in file! This is not a Friendica account file?")); return; } @@ -137,7 +137,7 @@ class UserImport // check if username matches deleted account if (DBA::exists('user', ['nickname' => $account['user']['nickname']]) || DBA::exists('userd', ['username' => $account['user']['nickname']])) { - notice(DI::l10n()->t("User '%s' already exists on this server!", $account['user']['nickname'])); + DI::sysmsg()->addNotice(DI::l10n()->t("User '%s' already exists on this server!", $account['user']['nickname'])); return; } @@ -173,7 +173,7 @@ class UserImport $r = self::dbImportAssoc('user', $account['user']); if ($r === false) { Logger::warning("uimport:insert user : ERROR : " . DBA::errorMessage()); - notice(DI::l10n()->t("User creation error")); + DI::sysmsg()->addNotice(DI::l10n()->t("User creation error")); return; } $newuid = self::lastInsertId(); @@ -218,7 +218,7 @@ class UserImport } } if ($errorcount > 0) { - notice(DI::l10n()->tt("%d contact not imported", "%d contacts not imported", $errorcount)); + DI::sysmsg()->addNotice(DI::l10n()->tt("%d contact not imported", "%d contacts not imported", $errorcount)); } foreach ($account['group'] as &$group) { @@ -271,7 +271,7 @@ class UserImport if ($r === false) { Logger::warning("uimport:insert profile: ERROR : " . DBA::errorMessage()); - notice(DI::l10n()->t("User profile creation error")); + DI::sysmsg()->addNotice(DI::l10n()->t("User profile creation error")); DBA::delete('user', ['uid' => $newuid]); DBA::delete('profile_field', ['uid' => $newuid]); return; @@ -324,7 +324,7 @@ class UserImport // send relocate messages Worker::add(Worker::PRIORITY_HIGH, 'Notifier', Delivery::RELOCATION, $newuid); - info(DI::l10n()->t("Done. You can now login with your username and password")); + DI::sysmsg()->addInfo(DI::l10n()->t("Done. You can now login with your username and password")); DI::baseUrl()->redirect('login'); } } diff --git a/src/Model/Group.php b/src/Model/Group.php index 4dec84c3a..3487ab53d 100644 --- a/src/Model/Group.php +++ b/src/Model/Group.php @@ -102,7 +102,7 @@ class Group $group = DBA::selectFirst('group', ['deleted'], ['id' => $gid]); if (DBA::isResult($group) && $group['deleted']) { DBA::update('group', ['deleted' => 0], ['id' => $gid]); - notice(DI::l10n()->t('A deleted group with this name was revived. Existing item permissions may apply to this group and any future members. If this is not what you intended, please create another group with a different name.')); + DI::sysmsg()->addNotice(DI::l10n()->t('A deleted group with this name was revived. Existing item permissions may apply to this group and any future members. If this is not what you intended, please create another group with a different name.')); } return true; } diff --git a/src/Model/Profile.php b/src/Model/Profile.php index f6d189a10..b58de4efb 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -865,7 +865,7 @@ class Profile $a->setContactId($arr['visitor']['id']); - info(DI::l10n()->t('OpenWebAuth: %1$s welcomes %2$s', DI::baseUrl()->getHostname(), $visitor['name'])); + DI::sysmsg()->addInfo(DI::l10n()->t('OpenWebAuth: %1$s welcomes %2$s', DI::baseUrl()->getHostname(), $visitor['name'])); Logger::info('OpenWebAuth: auth success from ' . $visitor['addr']); } diff --git a/src/Module/Admin/Addons/Details.php b/src/Module/Admin/Addons/Details.php index 28435c545..be0e59e32 100644 --- a/src/Module/Admin/Addons/Details.php +++ b/src/Module/Admin/Addons/Details.php @@ -62,7 +62,7 @@ class Details extends BaseAdmin $addon = Strings::sanitizeFilePathItem($this->parameters['addon']); if (!is_file("addon/$addon/$addon.php")) { - notice(DI::l10n()->t('Addon not found.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Addon not found.')); Addon::uninstall($addon); DI::baseUrl()->redirect('admin/addons'); } @@ -73,10 +73,10 @@ class Details extends BaseAdmin // Toggle addon status if (Addon::isEnabled($addon)) { Addon::uninstall($addon); - info(DI::l10n()->t('Addon %s disabled.', $addon)); + DI::sysmsg()->addInfo(DI::l10n()->t('Addon %s disabled.', $addon)); } else { Addon::install($addon); - info(DI::l10n()->t('Addon %s enabled.', $addon)); + DI::sysmsg()->addInfo(DI::l10n()->t('Addon %s enabled.', $addon)); } DI::baseUrl()->redirect('admin/addons/' . $addon); diff --git a/src/Module/Admin/Addons/Index.php b/src/Module/Admin/Addons/Index.php index b9198ee36..8db0b70ed 100644 --- a/src/Module/Admin/Addons/Index.php +++ b/src/Module/Admin/Addons/Index.php @@ -39,18 +39,18 @@ class Index extends BaseAdmin switch ($_GET['action']) { case 'reload': Addon::reload(); - info(DI::l10n()->t('Addons reloaded')); + DI::sysmsg()->addInfo(DI::l10n()->t('Addons reloaded')); break; case 'toggle' : $addon = $_GET['addon'] ?? ''; if (Addon::isEnabled($addon)) { Addon::uninstall($addon); - info(DI::l10n()->t('Addon %s disabled.', $addon)); + DI::sysmsg()->addInfo(DI::l10n()->t('Addon %s disabled.', $addon)); } elseif (Addon::install($addon)) { - info(DI::l10n()->t('Addon %s enabled.', $addon)); + DI::sysmsg()->addInfo(DI::l10n()->t('Addon %s enabled.', $addon)); } else { - notice(DI::l10n()->t('Addon %s failed to install.', $addon)); + DI::sysmsg()->addNotice(DI::l10n()->t('Addon %s failed to install.', $addon)); } break; diff --git a/src/Module/Admin/Blocklist/Contact.php b/src/Module/Admin/Blocklist/Contact.php index 35a8a151d..85e7f2146 100644 --- a/src/Module/Admin/Blocklist/Contact.php +++ b/src/Module/Admin/Blocklist/Contact.php @@ -46,12 +46,12 @@ class Contact extends BaseAdmin if (!empty($_POST['page_contactblock_block'])) { $contact = Model\Contact::getByURL($contact_url, null, ['id', 'nurl']); if (empty($contact)) { - notice(DI::l10n()->t('Could not find any contact entry for this URL (%s)', $contact_url)); + DI::sysmsg()->addNotice(DI::l10n()->t('Could not find any contact entry for this URL (%s)', $contact_url)); DI::baseUrl()->redirect('admin/blocklist/contact'); } if (Network::isLocalLink($contact['nurl'])) { - notice(DI::l10n()->t('You can\'t block a local contact, please block the user instead')); + DI::sysmsg()->addNotice(DI::l10n()->t('You can\'t block a local contact, please block the user instead')); DI::baseUrl()->redirect('admin/blocklist/contact'); } @@ -63,14 +63,14 @@ class Contact extends BaseAdmin } } - info(DI::l10n()->t('The contact has been blocked from the node')); + DI::sysmsg()->addInfo(DI::l10n()->t('The contact has been blocked from the node')); } if (!empty($_POST['page_contactblock_unblock'])) { foreach ($contacts as $uid) { Model\Contact::unblock($uid); } - info(DI::l10n()->tt('%s contact unblocked', '%s contacts unblocked', count($contacts))); + DI::sysmsg()->addInfo(DI::l10n()->tt('%s contact unblocked', '%s contacts unblocked', count($contacts))); } DI::baseUrl()->redirect('admin/blocklist/contact'); diff --git a/src/Module/Admin/DBSync.php b/src/Module/Admin/DBSync.php index d5a16f9be..bb1fa9033 100644 --- a/src/Module/Admin/DBSync.php +++ b/src/Module/Admin/DBSync.php @@ -48,7 +48,7 @@ class DBSync extends BaseAdmin DI::config()->set('system', 'build', intval($curr) + 1); } - info(DI::l10n()->t('Update has been marked successful')); + DI::sysmsg()->addInfo(DI::l10n()->t('Update has been marked successful')); } break; diff --git a/src/Module/Admin/Item/Delete.php b/src/Module/Admin/Item/Delete.php index e52156051..d291e7b84 100644 --- a/src/Module/Admin/Item/Delete.php +++ b/src/Module/Admin/Item/Delete.php @@ -50,7 +50,7 @@ class Delete extends BaseAdmin Item::markForDeletion(['guid' => $guid]); } - info(DI::l10n()->t('Item marked for deletion.')); + DI::sysmsg()->addInfo(DI::l10n()->t('Item marked for deletion.')); DI::baseUrl()->redirect('admin/item/delete'); } diff --git a/src/Module/Admin/Logs/Settings.php b/src/Module/Admin/Logs/Settings.php index 9dbc8f352..e5324e6f6 100644 --- a/src/Module/Admin/Logs/Settings.php +++ b/src/Module/Admin/Logs/Settings.php @@ -44,7 +44,7 @@ class Settings extends BaseAdmin if (is_file($logfile) && !is_writeable($logfile)) { - notice(DI::l10n()->t('The logfile \'%s\' is not writable. No logging possible', $logfile)); + DI::sysmsg()->addNotice(DI::l10n()->t('The logfile \'%s\' is not writable. No logging possible', $logfile)); return; } diff --git a/src/Module/Admin/Storage.php b/src/Module/Admin/Storage.php index f54344f47..207553437 100644 --- a/src/Module/Admin/Storage.php +++ b/src/Module/Admin/Storage.php @@ -43,7 +43,7 @@ class Storage extends BaseAdmin /** @var ICanConfigureStorage|false $newStorageConfig */ $newStorageConfig = DI::storageManager()->getConfigurationByName($storagebackend); } catch (InvalidClassStorageException $storageException) { - notice(DI::l10n()->t('Storage backend, %s is invalid.', $storagebackend)); + DI::sysmsg()->addNotice(DI::l10n()->t('Storage backend, %s is invalid.', $storagebackend)); DI::baseUrl()->redirect('admin/storage'); } @@ -70,7 +70,7 @@ class Storage extends BaseAdmin $storage_form_errors = $newStorageConfig->saveOptions($storage_opts_data); if (count($storage_form_errors)) { foreach ($storage_form_errors as $name => $err) { - notice(DI::l10n()->t('Storage backend %s error: %s', $storage_opts[$name][1], $err)); + DI::sysmsg()->addNotice(DI::l10n()->t('Storage backend %s error: %s', $storage_opts[$name][1], $err)); } DI::baseUrl()->redirect('admin/storage'); } @@ -81,10 +81,10 @@ class Storage extends BaseAdmin $newstorage = DI::storageManager()->getWritableStorageByName($storagebackend); if (!DI::storageManager()->setBackend($newstorage)) { - notice(DI::l10n()->t('Invalid storage backend setting value.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Invalid storage backend setting value.')); } } catch (InvalidClassStorageException $storageException) { - notice(DI::l10n()->t('Invalid storage backend setting value.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Invalid storage backend setting value.')); } } diff --git a/src/Module/Admin/Themes/Details.php b/src/Module/Admin/Themes/Details.php index dc6bf5818..45573cbe6 100644 --- a/src/Module/Admin/Themes/Details.php +++ b/src/Module/Admin/Themes/Details.php @@ -36,7 +36,7 @@ class Details extends BaseAdmin $theme = Strings::sanitizeFilePathItem($this->parameters['theme']); if (!is_dir("view/theme/$theme")) { - notice(DI::l10n()->t("Item not found.")); + DI::sysmsg()->addNotice(DI::l10n()->t("Item not found.")); return ''; } @@ -54,11 +54,11 @@ class Details extends BaseAdmin if ($isEnabled) { Theme::uninstall($theme); - info(DI::l10n()->t('Theme %s disabled.', $theme)); + DI::sysmsg()->addInfo(DI::l10n()->t('Theme %s disabled.', $theme)); } elseif (Theme::install($theme)) { - info(DI::l10n()->t('Theme %s successfully enabled.', $theme)); + DI::sysmsg()->addInfo(DI::l10n()->t('Theme %s successfully enabled.', $theme)); } else { - notice(DI::l10n()->t('Theme %s failed to install.', $theme)); + DI::sysmsg()->addNotice(DI::l10n()->t('Theme %s failed to install.', $theme)); } DI::baseUrl()->redirect('admin/themes/' . $theme); diff --git a/src/Module/Admin/Themes/Embed.php b/src/Module/Admin/Themes/Embed.php index 439e78e64..756b90afa 100644 --- a/src/Module/Admin/Themes/Embed.php +++ b/src/Module/Admin/Themes/Embed.php @@ -77,7 +77,7 @@ class Embed extends BaseAdmin $theme = Strings::sanitizeFilePathItem($this->parameters['theme']); if (!is_dir("view/theme/$theme")) { - notice($this->t('Unknown theme.')); + DI::sysmsg()->addNotice($this->t('Unknown theme.')); return ''; } diff --git a/src/Module/Admin/Themes/Index.php b/src/Module/Admin/Themes/Index.php index cf0ddcfc6..4dde4f856 100644 --- a/src/Module/Admin/Themes/Index.php +++ b/src/Module/Admin/Themes/Index.php @@ -48,7 +48,7 @@ class Index extends BaseAdmin } Theme::setAllowedList($allowed_themes); - info(DI::l10n()->t('Themes reloaded')); + DI::sysmsg()->addInfo(DI::l10n()->t('Themes reloaded')); break; case 'toggle' : @@ -56,17 +56,17 @@ class Index extends BaseAdmin if ($theme) { $theme = Strings::sanitizeFilePathItem($theme); if (!is_dir("view/theme/$theme")) { - notice(DI::l10n()->t('Item not found.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Item not found.')); return ''; } if (in_array($theme, Theme::getAllowedList())) { Theme::uninstall($theme); - info(DI::l10n()->t('Theme %s disabled.', $theme)); + DI::sysmsg()->addInfo(DI::l10n()->t('Theme %s disabled.', $theme)); } elseif (Theme::install($theme)) { - info(DI::l10n()->t('Theme %s successfully enabled.', $theme)); + DI::sysmsg()->addInfo(DI::l10n()->t('Theme %s successfully enabled.', $theme)); } else { - notice(DI::l10n()->t('Theme %s failed to install.', $theme)); + DI::sysmsg()->addNotice(DI::l10n()->t('Theme %s failed to install.', $theme)); } } diff --git a/src/Module/Admin/Users/Active.php b/src/Module/Admin/Users/Active.php index eac12063e..2188d4a59 100644 --- a/src/Module/Admin/Users/Active.php +++ b/src/Module/Admin/Users/Active.php @@ -42,7 +42,7 @@ class Active extends BaseUsers foreach ($users as $uid) { User::block($uid); } - info(DI::l10n()->tt('%s user blocked', '%s users blocked', count($users))); + DI::sysmsg()->addInfo(DI::l10n()->tt('%s user blocked', '%s users blocked', count($users))); } if (!empty($_POST['page_users_delete'])) { @@ -50,11 +50,11 @@ class Active extends BaseUsers if (local_user() != $uid) { User::remove($uid); } else { - notice(DI::l10n()->t('You can\'t remove yourself')); + DI::sysmsg()->addNotice(DI::l10n()->t('You can\'t remove yourself')); } } - info(DI::l10n()->tt('%s user deleted', '%s users deleted', count($users))); + DI::sysmsg()->addInfo(DI::l10n()->tt('%s user deleted', '%s users deleted', count($users))); } DI::baseUrl()->redirect(DI::args()->getQueryString()); @@ -70,7 +70,7 @@ class Active extends BaseUsers if ($uid) { $user = User::getById($uid, ['username', 'blocked']); if (!DBA::isResult($user)) { - notice(DI::l10n()->t('User not found')); + DI::sysmsg()->addNotice(DI::l10n()->t('User not found')); DI::baseUrl()->redirect('admin/users'); return ''; // NOTREACHED } @@ -83,9 +83,9 @@ class Active extends BaseUsers // delete user User::remove($uid); - notice(DI::l10n()->t('User "%s" deleted', $user['username'])); + DI::sysmsg()->addNotice(DI::l10n()->t('User "%s" deleted', $user['username'])); } else { - notice(DI::l10n()->t('You can\'t remove yourself')); + DI::sysmsg()->addNotice(DI::l10n()->t('You can\'t remove yourself')); } DI::baseUrl()->redirect('admin/users/active'); @@ -93,7 +93,7 @@ class Active extends BaseUsers case 'block': self::checkFormSecurityTokenRedirectOnError('admin/users/active', 'admin_users_active', 't'); User::block($uid); - notice(DI::l10n()->t('User "%s" blocked', $user['username'])); + DI::sysmsg()->addNotice(DI::l10n()->t('User "%s" blocked', $user['username'])); DI::baseUrl()->redirect('admin/users/active'); break; } diff --git a/src/Module/Admin/Users/Blocked.php b/src/Module/Admin/Users/Blocked.php index 63294f17c..e8434d5e0 100644 --- a/src/Module/Admin/Users/Blocked.php +++ b/src/Module/Admin/Users/Blocked.php @@ -43,7 +43,7 @@ class Blocked extends BaseUsers foreach ($users as $uid) { User::block($uid, false); } - info(DI::l10n()->tt('%s user unblocked', '%s users unblocked', count($users))); + DI::sysmsg()->addInfo(DI::l10n()->tt('%s user unblocked', '%s users unblocked', count($users))); } if (!empty($_POST['page_users_delete'])) { @@ -51,11 +51,11 @@ class Blocked extends BaseUsers if (local_user() != $uid) { User::remove($uid); } else { - notice(DI::l10n()->t('You can\'t remove yourself')); + DI::sysmsg()->addNotice(DI::l10n()->t('You can\'t remove yourself')); } } - info(DI::l10n()->tt('%s user deleted', '%s users deleted', count($users))); + DI::sysmsg()->addInfo(DI::l10n()->tt('%s user deleted', '%s users deleted', count($users))); } DI::baseUrl()->redirect('admin/users/blocked'); @@ -71,7 +71,7 @@ class Blocked extends BaseUsers if ($uid) { $user = User::getById($uid, ['username', 'blocked']); if (!DBA::isResult($user)) { - notice(DI::l10n()->t('User not found')); + DI::sysmsg()->addNotice(DI::l10n()->t('User not found')); DI::baseUrl()->redirect('admin/users'); return ''; // NOTREACHED } @@ -84,16 +84,16 @@ class Blocked extends BaseUsers // delete user User::remove($uid); - notice(DI::l10n()->t('User "%s" deleted', $user['username'])); + DI::sysmsg()->addNotice(DI::l10n()->t('User "%s" deleted', $user['username'])); } else { - notice(DI::l10n()->t('You can\'t remove yourself')); + DI::sysmsg()->addNotice(DI::l10n()->t('You can\'t remove yourself')); } DI::baseUrl()->redirect('admin/users/blocked'); break; case 'unblock': self::checkFormSecurityTokenRedirectOnError('/admin/users/blocked', 'admin_users_blocked', 't'); User::block($uid, false); - notice(DI::l10n()->t('User "%s" unblocked', $user['username'])); + DI::sysmsg()->addNotice(DI::l10n()->t('User "%s" unblocked', $user['username'])); DI::baseUrl()->redirect('admin/users/blocked'); break; } diff --git a/src/Module/Admin/Users/Create.php b/src/Module/Admin/Users/Create.php index 5ab443b14..29dbf5d7e 100644 --- a/src/Module/Admin/Users/Create.php +++ b/src/Module/Admin/Users/Create.php @@ -44,7 +44,7 @@ class Create extends BaseUsers User::createMinimal($nu_name, $nu_email, $nu_nickname, $nu_language); DI::baseUrl()->redirect('admin/users'); } catch (\Exception $ex) { - notice($ex->getMessage()); + DI::sysmsg()->addNotice($ex->getMessage()); } } diff --git a/src/Module/Admin/Users/Index.php b/src/Module/Admin/Users/Index.php index 8dfac5057..e8356720d 100644 --- a/src/Module/Admin/Users/Index.php +++ b/src/Module/Admin/Users/Index.php @@ -42,14 +42,14 @@ class Index extends BaseUsers foreach ($users as $uid) { User::block($uid); } - info(DI::l10n()->tt('%s user blocked', '%s users blocked', count($users))); + DI::sysmsg()->addInfo(DI::l10n()->tt('%s user blocked', '%s users blocked', count($users))); } if (!empty($_POST['page_users_unblock'])) { foreach ($users as $uid) { User::block($uid, false); } - info(DI::l10n()->tt('%s user unblocked', '%s users unblocked', count($users))); + DI::sysmsg()->addInfo(DI::l10n()->tt('%s user unblocked', '%s users unblocked', count($users))); } if (!empty($_POST['page_users_delete'])) { @@ -57,11 +57,11 @@ class Index extends BaseUsers if (local_user() != $uid) { User::remove($uid); } else { - notice(DI::l10n()->t('You can\'t remove yourself')); + DI::sysmsg()->addNotice(DI::l10n()->t('You can\'t remove yourself')); } } - info(DI::l10n()->tt('%s user deleted', '%s users deleted', count($users))); + DI::sysmsg()->addInfo(DI::l10n()->tt('%s user deleted', '%s users deleted', count($users))); } DI::baseUrl()->redirect(DI::args()->getQueryString()); @@ -77,7 +77,7 @@ class Index extends BaseUsers if ($uid) { $user = User::getById($uid, ['username', 'blocked']); if (!DBA::isResult($user)) { - notice(DI::l10n()->t('User not found')); + DI::sysmsg()->addNotice(DI::l10n()->t('User not found')); DI::baseUrl()->redirect('admin/users'); return ''; // NOTREACHED } @@ -90,9 +90,9 @@ class Index extends BaseUsers // delete user User::remove($uid); - notice(DI::l10n()->t('User "%s" deleted', $user['username'])); + DI::sysmsg()->addNotice(DI::l10n()->t('User "%s" deleted', $user['username'])); } else { - notice(DI::l10n()->t('You can\'t remove yourself')); + DI::sysmsg()->addNotice(DI::l10n()->t('You can\'t remove yourself')); } DI::baseUrl()->redirect('admin/users'); @@ -100,13 +100,13 @@ class Index extends BaseUsers case 'block': self::checkFormSecurityTokenRedirectOnError('admin/users', 'admin_users', 't'); User::block($uid); - notice(DI::l10n()->t('User "%s" blocked', $user['username'])); + DI::sysmsg()->addNotice(DI::l10n()->t('User "%s" blocked', $user['username'])); DI::baseUrl()->redirect('admin/users'); break; case 'unblock': self::checkFormSecurityTokenRedirectOnError('admin/users', 'admin_users', 't'); User::block($uid, false); - notice(DI::l10n()->t('User "%s" unblocked', $user['username'])); + DI::sysmsg()->addNotice(DI::l10n()->t('User "%s" unblocked', $user['username'])); DI::baseUrl()->redirect('admin/users'); break; } diff --git a/src/Module/Admin/Users/Pending.php b/src/Module/Admin/Users/Pending.php index b5b164bb5..484a128eb 100644 --- a/src/Module/Admin/Users/Pending.php +++ b/src/Module/Admin/Users/Pending.php @@ -45,14 +45,14 @@ class Pending extends BaseUsers foreach ($pending as $hash) { User::allow($hash); } - info(DI::l10n()->tt('%s user approved', '%s users approved', count($pending))); + DI::sysmsg()->addInfo(DI::l10n()->tt('%s user approved', '%s users approved', count($pending))); } if (!empty($_POST['page_users_deny'])) { foreach ($pending as $hash) { User::deny($hash); } - info(DI::l10n()->tt('%s registration revoked', '%s registrations revoked', count($pending))); + DI::sysmsg()->addInfo(DI::l10n()->tt('%s registration revoked', '%s registrations revoked', count($pending))); } DI::baseUrl()->redirect('admin/users/pending'); @@ -68,7 +68,7 @@ class Pending extends BaseUsers if ($uid) { $user = User::getById($uid, ['username', 'blocked']); if (!DBA::isResult($user)) { - notice(DI::l10n()->t('User not found')); + DI::sysmsg()->addNotice(DI::l10n()->t('User not found')); DI::baseUrl()->redirect('admin/users'); return ''; // NOTREACHED } @@ -78,13 +78,13 @@ class Pending extends BaseUsers case 'allow': self::checkFormSecurityTokenRedirectOnError('/admin/users/pending', 'admin_users_pending', 't'); User::allow(Register::getPendingForUser($uid)['hash'] ?? ''); - notice(DI::l10n()->t('Account approved.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Account approved.')); DI::baseUrl()->redirect('admin/users/pending'); break; case 'deny': self::checkFormSecurityTokenRedirectOnError('/admin/users/pending', 'admin_users_pending', 't'); User::deny(Register::getPendingForUser($uid)['hash'] ?? ''); - notice(DI::l10n()->t('Registration revoked')); + DI::sysmsg()->addNotice(DI::l10n()->t('Registration revoked')); DI::baseUrl()->redirect('admin/users/pending'); break; } diff --git a/src/Module/Apps.php b/src/Module/Apps.php index db5636bf9..9ef4268de 100644 --- a/src/Module/Apps.php +++ b/src/Module/Apps.php @@ -28,6 +28,7 @@ use Friendica\Content\Nav; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\L10n; use Friendica\Core\Renderer; +use Friendica\DI; use Friendica\Util\Profiler; use Psr\Log\LoggerInterface; @@ -51,7 +52,7 @@ class Apps extends BaseModule $apps = Nav::getAppMenu(); if (count($apps) == 0) { - notice($this->t('No installed applications.')); + DI::sysmsg()->addNotice($this->t('No installed applications.')); } $tpl = Renderer::getMarkupTemplate('apps.tpl'); diff --git a/src/Module/BaseAdmin.php b/src/Module/BaseAdmin.php index 713c44cc2..dd4e108e7 100644 --- a/src/Module/BaseAdmin.php +++ b/src/Module/BaseAdmin.php @@ -54,7 +54,7 @@ abstract class BaseAdmin extends BaseModule { if (!local_user()) { if ($interactive) { - notice(DI::l10n()->t('Please login to continue.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Please login to continue.')); Session::set('return_path', DI::args()->getQueryString()); DI::baseUrl()->redirect('login'); } else { diff --git a/src/Module/BaseSearch.php b/src/Module/BaseSearch.php index 276598131..f14a93b0f 100644 --- a/src/Module/BaseSearch.php +++ b/src/Module/BaseSearch.php @@ -116,7 +116,7 @@ class BaseSearch extends BaseModule protected static function printResult(ResultList $results, Pager $pager, string $header = ''): string { if ($results->getTotal() == 0) { - notice(DI::l10n()->t('No matches')); + DI::sysmsg()->addNotice(DI::l10n()->t('No matches')); return ''; } diff --git a/src/Module/Contact.php b/src/Module/Contact.php index 4f565a871..97f4b7e25 100644 --- a/src/Module/Contact.php +++ b/src/Module/Contact.php @@ -85,7 +85,7 @@ class Contact extends BaseModule } } if ($count_actions > 0) { - info(DI::l10n()->tt('%d contact edited.', '%d contacts edited.', $count_actions)); + DI::sysmsg()->addInfo(DI::l10n()->tt('%d contact edited.', '%d contacts edited.', $count_actions)); } DI::baseUrl()->redirect($redirectUrl); diff --git a/src/Module/Contact/Advanced.php b/src/Module/Contact/Advanced.php index bbb1d59e0..d722691ff 100644 --- a/src/Module/Contact/Advanced.php +++ b/src/Module/Contact/Advanced.php @@ -30,6 +30,7 @@ use Friendica\Core\Protocol; use Friendica\Core\Renderer; use Friendica\Core\Session; use Friendica\Database\Database; +use Friendica\DI; use Friendica\Model; use Friendica\Module\Contact; use Friendica\Module\Response; @@ -96,7 +97,7 @@ class Advanced extends BaseModule } if (!$r) { - notice($this->t('Contact update failed.')); + DI::sysmsg()->addNotice($this->t('Contact update failed.')); } } diff --git a/src/Module/Contact/Profile.php b/src/Module/Contact/Profile.php index 793d0fa4a..3af591a06 100644 --- a/src/Module/Contact/Profile.php +++ b/src/Module/Contact/Profile.php @@ -35,6 +35,7 @@ use Friendica\Core\L10n; use Friendica\Core\Protocol; use Friendica\Core\Renderer; use Friendica\Database\DBA; +use Friendica\DI; use Friendica\Model\Contact; use Friendica\Model\Group; use Friendica\Module; @@ -124,7 +125,7 @@ class Profile extends BaseModule } if (!Contact::update($fields, ['id' => $cdata['user'], 'uid' => local_user()])) { - notice($this->t('Failed to update contact record.')); + DI::sysmsg()->addNotice($this->t('Failed to update contact record.')); } } @@ -182,7 +183,7 @@ class Profile extends BaseModule } // @TODO: add $this->localRelationship->save($localRelationship); - info($message); + DI::sysmsg()->addInfo($message); } if ($cmd === 'ignore') { @@ -198,7 +199,7 @@ class Profile extends BaseModule } // @TODO: add $this->localRelationship->save($localRelationship); - info($message); + DI::sysmsg()->addInfo($message); } $this->baseUrl->redirect('contact/' . $contact['id']); diff --git a/src/Module/Contact/Revoke.php b/src/Module/Contact/Revoke.php index 35cb48149..4ade2b146 100644 --- a/src/Module/Contact/Revoke.php +++ b/src/Module/Contact/Revoke.php @@ -28,6 +28,7 @@ use Friendica\Core\L10n; use Friendica\Core\Protocol; use Friendica\Core\Renderer; use Friendica\Database\Database; +use Friendica\DI; use Friendica\Model; use Friendica\Module\Contact; use Friendica\Module\Response; @@ -87,7 +88,7 @@ class Revoke extends BaseModule Model\Contact::revokeFollow($this->contact); - notice($this->t('Follow was successfully revoked.')); + DI::sysmsg()->addNotice($this->t('Follow was successfully revoked.')); $this->baseUrl->redirect('contact/' . $this->parameters['id']); } diff --git a/src/Module/Conversation/Community.php b/src/Module/Conversation/Community.php index 3ba95e1ef..a5bfe4190 100644 --- a/src/Module/Conversation/Community.php +++ b/src/Module/Conversation/Community.php @@ -155,7 +155,7 @@ class Community extends BaseModule $items = self::getItems(); if (!DBA::isResult($items)) { - notice(DI::l10n()->t('No results.')); + DI::sysmsg()->addNotice(DI::l10n()->t('No results.')); return $o; } diff --git a/src/Module/Conversation/Network.php b/src/Module/Conversation/Network.php index c36876b34..cc6146a89 100644 --- a/src/Module/Conversation/Network.php +++ b/src/Module/Conversation/Network.php @@ -170,7 +170,7 @@ class Network extends BaseModule if (self::$groupId) { $group = DBA::selectFirst('group', ['name'], ['id' => self::$groupId, 'uid' => local_user()]); if (!DBA::isResult($group)) { - notice(DI::l10n()->t('No such group')); + DI::sysmsg()->addNotice(DI::l10n()->t('No such group')); } $o = Renderer::replaceMacros(Renderer::getMarkupTemplate('section_title.tpl'), [ @@ -184,7 +184,7 @@ class Network extends BaseModule 'id' => DI::args()->get(0), ]) . $o; } else { - notice(DI::l10n()->t('Invalid contact.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Invalid contact.')); } } elseif (!DI::config()->get('theme', 'hide_eventlist')) { $o .= Profile::getBirthdays(); diff --git a/src/Module/Debug/Feed.php b/src/Module/Debug/Feed.php index 46ded4236..fc9f95f07 100644 --- a/src/Module/Debug/Feed.php +++ b/src/Module/Debug/Feed.php @@ -25,6 +25,7 @@ use Friendica\App; use Friendica\BaseModule; use Friendica\Core\L10n; use Friendica\Core\Renderer; +use Friendica\DI; use Friendica\Model; use Friendica\Module\Response; use Friendica\Network\HTTPClient\Capability\ICanSendHttpRequests; @@ -48,7 +49,7 @@ class Feed extends BaseModule $this->httpClient = $httpClient; if (!local_user()) { - notice($this->t('You must be logged in to use this module')); + DI::sysmsg()->addNotice($this->t('You must be logged in to use this module')); $baseUrl->redirect(); } } diff --git a/src/Module/Directory.php b/src/Module/Directory.php index 9fac9db30..f48e2bf7e 100644 --- a/src/Module/Directory.php +++ b/src/Module/Directory.php @@ -72,7 +72,7 @@ class Directory extends BaseModule $profiles = Profile::searchProfiles($pager->getStart(), $pager->getItemsPerPage(), $search); if ($profiles['total'] === 0) { - notice(DI::l10n()->t('No entries (some entries may be hidden).')); + DI::sysmsg()->addNotice(DI::l10n()->t('No entries (some entries may be hidden).')); } else { foreach ($profiles['entries'] as $entry) { $contact = Model\Contact::getByURLForUser($entry['url'], local_user()); diff --git a/src/Module/Filer/SaveTag.php b/src/Module/Filer/SaveTag.php index 3dfd7877c..c3b9acadd 100644 --- a/src/Module/Filer/SaveTag.php +++ b/src/Module/Filer/SaveTag.php @@ -26,6 +26,7 @@ use Friendica\BaseModule; use Friendica\Core\L10n; use Friendica\Core\Renderer; use Friendica\Database\DBA; +use Friendica\DI; use Friendica\Model; use Friendica\Module\Response; use Friendica\Network\HTTPException; @@ -43,7 +44,7 @@ class SaveTag extends BaseModule parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); if (!local_user()) { - notice($this->t('You must be logged in to use this module')); + DI::sysmsg()->addNotice($this->t('You must be logged in to use this module')); $baseUrl->redirect(); } } diff --git a/src/Module/FollowConfirm.php b/src/Module/FollowConfirm.php index b61cfd432..0254bfae3 100644 --- a/src/Module/FollowConfirm.php +++ b/src/Module/FollowConfirm.php @@ -35,7 +35,7 @@ class FollowConfirm extends BaseModule parent::post($request); $uid = local_user(); if (!$uid) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); return; } diff --git a/src/Module/FriendSuggest.php b/src/Module/FriendSuggest.php index d8a42d8de..815c4e1ec 100644 --- a/src/Module/FriendSuggest.php +++ b/src/Module/FriendSuggest.php @@ -28,6 +28,7 @@ use Friendica\Core\Protocol; use Friendica\Core\Renderer; use Friendica\Core\Worker; use Friendica\Database\Database; +use Friendica\DI; use Friendica\Model\Contact as ContactModel; use Friendica\Network\HTTPException\ForbiddenException; use Friendica\Network\HTTPException\NotFoundException; @@ -78,7 +79,7 @@ class FriendSuggest extends BaseModule // We do query the "uid" as well to ensure that it is our contact $contact = $this->dba->selectFirst('contact', ['name', 'url', 'request', 'avatar'], ['id' => $suggest_contact_id, 'uid' => local_user()]); if (empty($contact)) { - notice($this->t('Suggested contact not found.')); + DI::sysmsg()->addNotice($this->t('Suggested contact not found.')); return; } @@ -96,7 +97,7 @@ class FriendSuggest extends BaseModule Worker::add(Worker::PRIORITY_HIGH, 'Notifier', Delivery::SUGGESTION, $suggest->id); - info($this->t('Friend suggestion sent.')); + DI::sysmsg()->addInfo($this->t('Friend suggestion sent.')); } protected function content(array $request = []): string @@ -105,7 +106,7 @@ class FriendSuggest extends BaseModule $contact = $this->dba->selectFirst('contact', [], ['id' => $cid, 'uid' => local_user()]); if (empty($contact)) { - notice($this->t('Contact not found.')); + DI::sysmsg()->addNotice($this->t('Contact not found.')); $this->baseUrl->redirect(); } diff --git a/src/Module/Group.php b/src/Module/Group.php index cd07e9781..06ee555a7 100644 --- a/src/Module/Group.php +++ b/src/Module/Group.php @@ -39,7 +39,7 @@ class Group extends BaseModule } if (!local_user()) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); DI::baseUrl()->redirect(); } @@ -55,7 +55,7 @@ class Group extends BaseModule DI::baseUrl()->redirect('group/' . $r); } } else { - notice(DI::l10n()->t('Could not create group.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Could not create group.')); } DI::baseUrl()->redirect('group'); } @@ -66,13 +66,13 @@ class Group extends BaseModule $group = DBA::selectFirst('group', ['id', 'name'], ['id' => DI::args()->getArgv()[1], 'uid' => local_user()]); if (!DBA::isResult($group)) { - notice(DI::l10n()->t('Group not found.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Group not found.')); DI::baseUrl()->redirect('contact'); } $groupname = trim($_POST['groupname']); if (strlen($groupname) && ($groupname != $group['name'])) { if (!Model\Group::update($group['id'], $groupname)) { - notice(DI::l10n()->t('Group name was not changed.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Group name was not changed.')); } } } @@ -132,10 +132,10 @@ class Group extends BaseModule throw new \Exception(DI::l10n()->t('Bad request.'), 400); } - info($message); + DI::sysmsg()->addInfo($message); System::jsonExit(['status' => 'OK', 'message' => $message]); } catch (\Exception $e) { - notice($e->getMessage()); + DI::sysmsg()->addNotice($e->getMessage()); System::jsonError($e->getCode(), ['status' => 'error', 'message' => $e->getMessage()]); } } @@ -212,12 +212,12 @@ class Group extends BaseModule // @TODO: Replace with parameter from router if (intval(DI::args()->getArgv()[2])) { if (!Model\Group::exists(DI::args()->getArgv()[2], local_user())) { - notice(DI::l10n()->t('Group not found.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Group not found.')); DI::baseUrl()->redirect('contact'); } if (!Model\Group::remove(DI::args()->getArgv()[2])) { - notice(DI::l10n()->t('Unable to remove group.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Unable to remove group.')); } } DI::baseUrl()->redirect('group'); @@ -236,7 +236,7 @@ class Group extends BaseModule if ((DI::args()->getArgc() > 1) && intval(DI::args()->getArgv()[1])) { $group = DBA::selectFirst('group', ['id', 'name'], ['id' => DI::args()->getArgv()[1], 'uid' => local_user(), 'deleted' => false]); if (!DBA::isResult($group)) { - notice(DI::l10n()->t('Group not found.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Group not found.')); DI::baseUrl()->redirect('contact'); } diff --git a/src/Module/Invite.php b/src/Module/Invite.php index 77a7585bd..c36a8ad7d 100644 --- a/src/Module/Invite.php +++ b/src/Module/Invite.php @@ -79,7 +79,7 @@ class Invite extends BaseModule $recipient = trim($recipient); if (!filter_var($recipient, FILTER_VALIDATE_EMAIL)) { - notice(DI::l10n()->t('%s : Not a valid email address.', $recipient)); + DI::sysmsg()->addNotice(DI::l10n()->t('%s : Not a valid email address.', $recipient)); continue; } @@ -114,15 +114,15 @@ class Invite extends BaseModule $current_invites++; DI::pConfig()->set(local_user(), 'system', 'sent_invites', $current_invites); if ($current_invites > $max_invites) { - notice(DI::l10n()->t('Invitation limit exceeded. Please contact your site administrator.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Invitation limit exceeded. Please contact your site administrator.')); return; } } else { - notice(DI::l10n()->t('%s : Message delivery failed.', $recipient)); + DI::sysmsg()->addNotice(DI::l10n()->t('%s : Message delivery failed.', $recipient)); } } - info(DI::l10n()->tt('%d message sent.', '%d messages sent.', $total)); + DI::sysmsg()->addInfo(DI::l10n()->tt('%d message sent.', '%d messages sent.', $total)); } protected function content(array $request = []): string diff --git a/src/Module/Notifications/Introductions.php b/src/Module/Notifications/Introductions.php index 42ec3b6f7..ffe5d212f 100644 --- a/src/Module/Notifications/Introductions.php +++ b/src/Module/Notifications/Introductions.php @@ -30,6 +30,7 @@ use Friendica\Content\Text\BBCode; use Friendica\Core\L10n; use Friendica\Core\Protocol; use Friendica\Core\Renderer; +use Friendica\DI; use Friendica\Model\User; use Friendica\Module\BaseNotifications; use Friendica\Module\Response; @@ -211,7 +212,7 @@ class Introductions extends BaseNotifications } if (count($notifications['notifications']) == 0) { - notice($this->t('No introductions.')); + DI::sysmsg()->addNotice($this->t('No introductions.')); $notificationNoContent = $this->t('No more %s notifications.', $notifications['ident']); } diff --git a/src/Module/Notifications/Notification.php b/src/Module/Notifications/Notification.php index a28b5d6f6..cacf57ec0 100644 --- a/src/Module/Notifications/Notification.php +++ b/src/Module/Notifications/Notification.php @@ -27,6 +27,7 @@ use Friendica\Contact\Introduction\Repository\Introduction; use Friendica\Core\L10n; use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues; use Friendica\Core\System; +use Friendica\DI; use Friendica\Model\Contact; use Friendica\Module\Response; use Friendica\Module\Security\Login; @@ -131,7 +132,7 @@ class Notification extends BaseModule protected function content(array $request = []): string { if (!local_user()) { - notice($this->l10n->t('You must be logged in to show this page.')); + DI::sysmsg()->addNotice($this->l10n->t('You must be logged in to show this page.')); return Login::form(); } diff --git a/src/Module/Profile/Profile.php b/src/Module/Profile/Profile.php index ccc3208b6..f5e904544 100644 --- a/src/Module/Profile/Profile.php +++ b/src/Module/Profile/Profile.php @@ -106,7 +106,7 @@ class Profile extends BaseProfile $o = self::getTabsHTML($a, 'profile', $is_owner, $profile['nickname'], $profile['hide-friends']); if (!empty($profile['hidewall']) && !$is_owner && !$remote_contact_id) { - notice(DI::l10n()->t('Access to this profile has been restricted.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Access to this profile has been restricted.')); return ''; } diff --git a/src/Module/Profile/Status.php b/src/Module/Profile/Status.php index d851d5f47..99f5fe6ba 100644 --- a/src/Module/Profile/Status.php +++ b/src/Module/Profile/Status.php @@ -107,7 +107,7 @@ class Status extends BaseProfile $last_updated_key = "profile:" . $profile['uid'] . ":" . local_user() . ":" . $remote_contact; if (!empty($profile['hidewall']) && !$is_owner && !$remote_contact) { - notice(DI::l10n()->t('Access to this profile has been restricted.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Access to this profile has been restricted.')); return ''; } diff --git a/src/Module/Register.php b/src/Module/Register.php index 95cea1458..35faaa7df 100644 --- a/src/Module/Register.php +++ b/src/Module/Register.php @@ -74,20 +74,20 @@ class Register extends BaseModule $block = DI::config()->get('system', 'block_extended_register'); if (local_user() && $block) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); return ''; } if (local_user()) { $user = DBA::selectFirst('user', ['parent-uid'], ['uid' => local_user()]); if (!empty($user['parent-uid'])) { - notice(DI::l10n()->t('Only parent users can create additional accounts.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Only parent users can create additional accounts.')); return ''; } } if (!local_user() && (intval(DI::config()->get('config', 'register_policy')) === self::CLOSED)) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); return ''; } @@ -96,7 +96,7 @@ class Register extends BaseModule $count = DBA::count('user', ['`register_date` > UTC_TIMESTAMP - INTERVAL 1 day']); if ($count >= $max_dailies) { Logger::notice('max daily registrations exceeded.'); - notice(DI::l10n()->t('This site has exceeded the number of allowed daily account registrations. Please try again tomorrow.')); + DI::sysmsg()->addNotice(DI::l10n()->t('This site has exceeded the number of allowed daily account registrations. Please try again tomorrow.')); return ''; } } @@ -203,19 +203,19 @@ class Register extends BaseModule $additional_account = false; if (!local_user() && !empty($arr['post']['parent_password'])) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); return; } elseif (local_user() && !empty($arr['post']['parent_password'])) { try { Model\User::getIdFromPasswordAuthentication(local_user(), $arr['post']['parent_password']); } catch (\Exception $ex) { - notice(DI::l10n()->t("Password doesn't match.")); + DI::sysmsg()->addNotice(DI::l10n()->t("Password doesn't match.")); $regdata = ['nickname' => $arr['post']['nickname'], 'username' => $arr['post']['username']]; DI::baseUrl()->redirect('register?' . http_build_query($regdata)); } $additional_account = true; } elseif (local_user()) { - notice(DI::l10n()->t('Please enter your password.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Please enter your password.')); $regdata = ['nickname' => $arr['post']['nickname'], 'username' => $arr['post']['username']]; DI::baseUrl()->redirect('register?' . http_build_query($regdata)); } @@ -242,7 +242,7 @@ class Register extends BaseModule case self::CLOSED: default: if (empty($_SESSION['authenticated']) && empty($_SESSION['administrator'])) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); return; } $blocked = 1; @@ -257,14 +257,14 @@ class Register extends BaseModule // Is there text in the tar pit? if (!empty($arr['email'])) { Logger::info('Tar pit', $arr); - notice(DI::l10n()->t('You have entered too much information.')); + DI::sysmsg()->addNotice(DI::l10n()->t('You have entered too much information.')); DI::baseUrl()->redirect('register/'); } if ($additional_account) { $user = DBA::selectFirst('user', ['email'], ['uid' => local_user()]); if (!DBA::isResult($user)) { - notice(DI::l10n()->t('User not found.')); + DI::sysmsg()->addNotice(DI::l10n()->t('User not found.')); DI::baseUrl()->redirect('register'); } @@ -280,7 +280,7 @@ class Register extends BaseModule if ($arr['email'] != $arr['repeat']) { Logger::info('Mail mismatch', $arr); - notice(DI::l10n()->t('Please enter the identical mail address in the second field.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Please enter the identical mail address in the second field.')); $regdata = ['email' => $arr['email'], 'nickname' => $arr['nickname'], 'username' => $arr['username']]; DI::baseUrl()->redirect('register?' . http_build_query($regdata)); } @@ -292,7 +292,7 @@ class Register extends BaseModule try { $result = Model\User::create($arr); } catch (\Exception $e) { - notice($e->getMessage()); + DI::sysmsg()->addNotice($e->getMessage()); return; } @@ -307,7 +307,7 @@ class Register extends BaseModule if ($additional_account) { DBA::update('user', ['parent-uid' => local_user()], ['uid' => $user['uid']]); - info(DI::l10n()->t('The additional account was created.')); + DI::sysmsg()->addInfo(DI::l10n()->t('The additional account was created.')); DI::baseUrl()->redirect('delegation'); } @@ -332,28 +332,28 @@ class Register extends BaseModule ); if ($res) { - info(DI::l10n()->t('Registration successful. Please check your email for further instructions.')); + DI::sysmsg()->addInfo(DI::l10n()->t('Registration successful. Please check your email for further instructions.')); DI::baseUrl()->redirect(); } else { - notice( + DI::sysmsg()->addNotice( DI::l10n()->t('Failed to send email message. Here your accout details:
login: %s
password: %s

You can change your password after login.', $user['email'], $result['password']) ); } } else { - info(DI::l10n()->t('Registration successful.')); + DI::sysmsg()->addInfo(DI::l10n()->t('Registration successful.')); DI::baseUrl()->redirect(); } } elseif (intval(DI::config()->get('config', 'register_policy')) === self::APPROVE) { if (!strlen(DI::config()->get('config', 'admin_email'))) { - notice(DI::l10n()->t('Your registration can not be processed.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Your registration can not be processed.')); DI::baseUrl()->redirect(); } // Check if the note to the admin is actually filled out if (empty($_POST['permonlybox'])) { - notice(DI::l10n()->t('You have to leave a request note for the admin.') + DI::sysmsg()->addNotice(DI::l10n()->t('You have to leave a request note for the admin.') . DI::l10n()->t('Your registration can not be processed.')); DI::baseUrl()->redirect('register/'); @@ -399,7 +399,7 @@ class Register extends BaseModule $result['password'] ); - info(DI::l10n()->t('Your registration is pending approval by the site owner.')); + DI::sysmsg()->addInfo(DI::l10n()->t('Your registration is pending approval by the site owner.')); DI::baseUrl()->redirect(); } diff --git a/src/Module/RemoteFollow.php b/src/Module/RemoteFollow.php index 130c76319..05239440d 100644 --- a/src/Module/RemoteFollow.php +++ b/src/Module/RemoteFollow.php @@ -31,6 +31,7 @@ use Friendica\Core\Protocol; use Friendica\Core\Renderer; use Friendica\Core\Search; use Friendica\Core\System; +use Friendica\DI; use Friendica\Model\Contact; use Friendica\Model\Profile; use Friendica\Model\User; @@ -68,25 +69,25 @@ class RemoteFollow extends BaseModule } if (empty($this->owner)) { - notice($this->t('Profile unavailable.')); + DI::sysmsg()->addNotice($this->t('Profile unavailable.')); return; } $url = Probe::cleanURI($_POST['dfrn_url']); if (!strlen($url)) { - notice($this->t("Invalid locator")); + DI::sysmsg()->addNotice($this->t("Invalid locator")); return; } // Detect the network, make sure the provided URL is valid $data = Contact::getByURL($url); if (!$data) { - notice($this->t("The provided profile link doesn't seem to be valid")); + DI::sysmsg()->addNotice($this->t("The provided profile link doesn't seem to be valid")); return; } if (empty($data['subscribe'])) { - notice($this->t("Remote subscription can't be done for your network. Please subscribe directly on your system.")); + DI::sysmsg()->addNotice($this->t("Remote subscription can't be done for your network. Please subscribe directly on your system.")); return; } diff --git a/src/Module/Search/Directory.php b/src/Module/Search/Directory.php index 496a3e098..a088282cb 100644 --- a/src/Module/Search/Directory.php +++ b/src/Module/Search/Directory.php @@ -34,7 +34,7 @@ class Directory extends BaseSearch protected function content(array $request = []): string { if (!local_user()) { - notice(DI::l10n()->t('Permission denied.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); return Login::form(); } diff --git a/src/Module/Search/Index.php b/src/Module/Search/Index.php index db20dd0a3..7dfdca39b 100644 --- a/src/Module/Search/Index.php +++ b/src/Module/Search/Index.php @@ -149,7 +149,7 @@ class Index extends BaseSearch // Tags don't look like an URL and the fulltext search does only work with natural words if (parse_url($search, PHP_URL_SCHEME) && parse_url($search, PHP_URL_HOST)) { Logger::info('Skipping tag and fulltext search since the search looks like a URL.', ['q' => $search]); - notice(DI::l10n()->t('No results.')); + DI::sysmsg()->addNotice(DI::l10n()->t('No results.')); return $o; } @@ -191,7 +191,7 @@ class Index extends BaseSearch if (empty($items)) { if (empty($last_uriid)) { - notice(DI::l10n()->t('No results.')); + DI::sysmsg()->addNotice(DI::l10n()->t('No results.')); } return $o; } diff --git a/src/Module/Search/Saved.php b/src/Module/Search/Saved.php index 4256ffcd4..cea0a9b1a 100644 --- a/src/Module/Search/Saved.php +++ b/src/Module/Search/Saved.php @@ -26,6 +26,7 @@ use Friendica\BaseModule; use Friendica\Core\L10n; use Friendica\Core\Search; use Friendica\Database\Database; +use Friendica\DI; use Friendica\Module\Response; use Friendica\Util\Profiler; use Psr\Log\LoggerInterface; @@ -55,16 +56,16 @@ class Saved extends BaseModule $fields = ['uid' => local_user(), 'term' => $search]; if (!$this->dba->exists('search', $fields)) { if (!$this->dba->insert('search', $fields)) { - notice($this->t('Search term was not saved.')); + DI::sysmsg()->addNotice($this->t('Search term was not saved.')); } } else { - notice($this->t('Search term already saved.')); + DI::sysmsg()->addNotice($this->t('Search term already saved.')); } break; case 'remove': if (!$this->dba->delete('search', ['uid' => local_user(), 'term' => $search])) { - notice($this->t('Search term was not removed.')); + DI::sysmsg()->addNotice($this->t('Search term was not removed.')); } break; } diff --git a/src/Module/Security/Logout.php b/src/Module/Security/Logout.php index 004292cb5..82c176feb 100644 --- a/src/Module/Security/Logout.php +++ b/src/Module/Security/Logout.php @@ -28,6 +28,7 @@ use Friendica\Core\Hook; use Friendica\Core\L10n; use Friendica\Core\Session\Capability\IHandleSessions; use Friendica\Core\System; +use Friendica\DI; use Friendica\Model\Profile; use Friendica\Model\User\Cookie; use Friendica\Module\Response; @@ -80,7 +81,7 @@ class Logout extends BaseModule if ($visitor_home) { System::externalRedirect($visitor_home); } else { - info($this->t('Logged out.')); + DI::sysmsg()->addInfo($this->t('Logged out.')); $this->baseUrl->redirect(); } } diff --git a/src/Module/Security/OpenID.php b/src/Module/Security/OpenID.php index 7dbb765c6..2675f1fec 100644 --- a/src/Module/Security/OpenID.php +++ b/src/Module/Security/OpenID.php @@ -87,9 +87,9 @@ class OpenID extends BaseModule $session->set('openid_server', $open_id_obj->discover($open_id_obj->identity)); if (intval(DI::config()->get('config', 'register_policy')) === \Friendica\Module\Register::CLOSED) { - notice($l10n->t('Account not found. Please login to your existing account to add the OpenID to it.')); + DI::sysmsg()->addNotice($l10n->t('Account not found. Please login to your existing account to add the OpenID to it.')); } else { - notice($l10n->t('Account not found. Please register a new account or login to your existing account to add the OpenID to it.')); + DI::sysmsg()->addNotice($l10n->t('Account not found. Please register a new account or login to your existing account to add the OpenID to it.')); } DI::baseUrl()->redirect('login'); diff --git a/src/Module/Security/TwoFactor/Recovery.php b/src/Module/Security/TwoFactor/Recovery.php index 6d8d91dbe..38b341dad 100644 --- a/src/Module/Security/TwoFactor/Recovery.php +++ b/src/Module/Security/TwoFactor/Recovery.php @@ -26,6 +26,7 @@ use Friendica\BaseModule; use Friendica\Core\L10n; use Friendica\Core\Renderer; use Friendica\Core\Session\Capability\IHandleSessions; +use Friendica\DI; use Friendica\Model\User; use Friendica\Module\Response; use Friendica\Security\Authentication; @@ -70,13 +71,13 @@ class Recovery extends BaseModule if (RecoveryCode::existsForUser(local_user(), $recovery_code)) { RecoveryCode::markUsedForUser(local_user(), $recovery_code); $this->session->set('2fa', true); - info($this->t('Remaining recovery codes: %d', RecoveryCode::countValidForUser(local_user()))); + DI::sysmsg()->addInfo($this->t('Remaining recovery codes: %d', RecoveryCode::countValidForUser(local_user()))); $this->auth->setForUser($this->app, User::getById($this->app->getLoggedInUserId()), true, true); $this->baseUrl->redirect($this->session->pop('return_path', '')); } else { - notice($this->t('Invalid code, please retry.')); + DI::sysmsg()->addNotice($this->t('Invalid code, please retry.')); } } } diff --git a/src/Module/Security/TwoFactor/SignOut.php b/src/Module/Security/TwoFactor/SignOut.php index 75efc9e60..ac6e9321f 100644 --- a/src/Module/Security/TwoFactor/SignOut.php +++ b/src/Module/Security/TwoFactor/SignOut.php @@ -26,6 +26,7 @@ use Friendica\BaseModule; use Friendica\Core\L10n; use Friendica\Core\Renderer; use Friendica\Core\Session\Capability\IHandleSessions; +use Friendica\DI; use Friendica\Model\User\Cookie; use Friendica\Module\Response; use Friendica\Network\HTTPException\NotFoundException; @@ -75,7 +76,7 @@ class SignOut extends BaseModule $this->cookie->reset(['2fa_cookie_hash' => $trusted]); $this->session->clear(); - info($this->t('Logged out.')); + DI::sysmsg()->addInfo($this->t('Logged out.')); $this->baseUrl->redirect(); break; case 'sign_out': @@ -83,7 +84,7 @@ class SignOut extends BaseModule $this->cookie->clear(); $this->session->clear(); - info($this->t('Logged out.')); + DI::sysmsg()->addInfo($this->t('Logged out.')); $this->baseUrl->redirect(); break; default: @@ -105,14 +106,14 @@ class SignOut extends BaseModule $this->cookie->reset(['2fa_cookie_hash' => $trusted]); $this->session->clear(); - info($this->t('Logged out.')); + DI::sysmsg()->addInfo($this->t('Logged out.')); $this->baseUrl->redirect(); } } catch (TwoFactor\Exception\TrustedBrowserNotFoundException $exception) { $this->cookie->clear(); $this->session->clear(); - info($this->t('Logged out.')); + DI::sysmsg()->addInfo($this->t('Logged out.')); $this->baseUrl->redirect(); } diff --git a/src/Module/Security/TwoFactor/Trust.php b/src/Module/Security/TwoFactor/Trust.php index 1f5fb7418..ed24c6b14 100644 --- a/src/Module/Security/TwoFactor/Trust.php +++ b/src/Module/Security/TwoFactor/Trust.php @@ -26,6 +26,7 @@ use Friendica\BaseModule; use Friendica\Core\L10n; use Friendica\Core\Renderer; use Friendica\Core\Session\Capability\IHandleSessions; +use Friendica\DI; use Friendica\Model\User; use Friendica\Model\User\Cookie; use Friendica\Module\Response; @@ -92,7 +93,7 @@ class Trust extends BaseModule // The string is sent to the browser to be sent back with each request if (!$this->cookie->set('2fa_cookie_hash', $trustedBrowser->cookie_hash)) { - notice($this->t('Couldn\'t save browser to Cookie.')); + DI::sysmsg()->addNotice($this->t('Couldn\'t save browser to Cookie.')); }; } catch (TrustedBrowserPersistenceException $exception) { $this->logger->warning('Unexpected error when saving the trusted browser.', ['trustedBrowser' => $trustedBrowser, 'exception' => $exception]); diff --git a/src/Module/Settings/Account.php b/src/Module/Settings/Account.php index 62ad08a4c..bb262ab1a 100644 --- a/src/Module/Settings/Account.php +++ b/src/Module/Settings/Account.php @@ -75,10 +75,10 @@ class Account extends BaseSettings throw new Exception(DI::l10n()->t('Password update failed. Please try again.')); } - info(DI::l10n()->t('Password changed.')); + DI::sysmsg()->addInfo(DI::l10n()->t('Password changed.')); } catch (Exception $e) { - notice($e->getMessage()); - notice(DI::l10n()->t('Password unchanged.')); + DI::sysmsg()->addNotice($e->getMessage()); + DI::sysmsg()->addNotice(DI::l10n()->t('Password unchanged.')); } DI::baseUrl()->redirect($redirectUrl); @@ -123,7 +123,7 @@ class Account extends BaseSettings } if (strlen($err)) { - notice($err); + DI::sysmsg()->addNotice($err); return; } @@ -146,7 +146,7 @@ class Account extends BaseSettings } if (!User::update($fields, local_user())) { - notice(DI::l10n()->t('Settings were not updated.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Settings were not updated.')); } // clear session language @@ -198,7 +198,7 @@ class Account extends BaseSettings ]; if (!User::update($fields, local_user()) || !Profile::update($profile_fields, local_user())) { - notice(DI::l10n()->t('Settings were not updated.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Settings were not updated.')); } DI::baseUrl()->redirect($redirectUrl); @@ -218,7 +218,7 @@ class Account extends BaseSettings DI::pConfig()->set(local_user(), 'expire', 'network_only', $expire_network_only); if (!User::update(['expire' => $expire], local_user())) { - notice(DI::l10n()->t('Settings were not updated.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Settings were not updated.')); } DI::baseUrl()->redirect($redirectUrl); @@ -302,7 +302,7 @@ class Account extends BaseSettings ]; if (!User::update($fields, local_user())) { - notice(DI::l10n()->t('Settings were not updated.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Settings were not updated.')); } DI::baseUrl()->redirect($redirectUrl); @@ -351,7 +351,7 @@ class Account extends BaseSettings ]); if (!User::update($fields, local_user()) || !empty($profile_fields) && !Profile::update($profile_fields, local_user())) { - notice(DI::l10n()->t('Settings were not updated.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Settings were not updated.')); } DI::baseUrl()->redirect($redirectUrl); @@ -363,7 +363,7 @@ class Account extends BaseSettings // was there an error if ($_FILES['importcontact-filename']['error'] > 0) { Logger::notice('Contact CSV file upload error', ['error' => $_FILES['importcontact-filename']['error']]); - notice(DI::l10n()->t('Contact CSV file upload error')); + DI::sysmsg()->addNotice(DI::l10n()->t('Contact CSV file upload error')); } else { $csvArray = array_map('str_getcsv', file($_FILES['importcontact-filename']['tmp_name'])); Logger::notice('Import started', ['lines' => count($csvArray)]); @@ -382,7 +382,7 @@ class Account extends BaseSettings } Logger::notice('Import done'); - info(DI::l10n()->t('Importing Contacts done')); + DI::sysmsg()->addInfo(DI::l10n()->t('Importing Contacts done')); // delete temp file unlink($_FILES['importcontact-filename']['tmp_name']); } @@ -395,7 +395,7 @@ class Account extends BaseSettings if (!empty($request['relocate-submit'])) { Worker::add(Worker::PRIORITY_HIGH, 'Notifier', Delivery::RELOCATION, local_user()); - info(DI::l10n()->t("Relocate message has been send to your contacts")); + DI::sysmsg()->addInfo(DI::l10n()->t("Relocate message has been send to your contacts")); DI::baseUrl()->redirect($redirectUrl); } @@ -412,7 +412,7 @@ class Account extends BaseSettings $profile = DBA::selectFirst('profile', [], ['uid' => local_user()]); if (!DBA::isResult($profile)) { - notice(DI::l10n()->t('Unable to find your profile. Please contact your admin.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Unable to find your profile. Please contact your admin.')); return ''; } diff --git a/src/Module/Settings/Delegation.php b/src/Module/Settings/Delegation.php index 75e683e60..aeada0871 100644 --- a/src/Module/Settings/Delegation.php +++ b/src/Module/Settings/Delegation.php @@ -50,13 +50,13 @@ class Delegation extends BaseSettings if ($parent_uid != 0) { try { User::getIdFromPasswordAuthentication($parent_uid, $parent_password); - info(DI::l10n()->t('Delegation successfully granted.')); + DI::sysmsg()->addInfo(DI::l10n()->t('Delegation successfully granted.')); } catch (\Exception $ex) { - notice(DI::l10n()->t('Parent user not found, unavailable or password doesn\'t match.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Parent user not found, unavailable or password doesn\'t match.')); return; } } else { - info(DI::l10n()->t('Delegation successfully revoked.')); + DI::sysmsg()->addInfo(DI::l10n()->t('Delegation successfully revoked.')); } DBA::update('user', ['parent-uid' => $parent_uid], ['uid' => local_user()]); @@ -78,7 +78,7 @@ class Delegation extends BaseSettings if ($action === 'add' && $user_id) { if (Session::get('submanage')) { - notice(DI::l10n()->t('Delegated administrators can view but not change delegation permissions.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Delegated administrators can view but not change delegation permissions.')); DI::baseUrl()->redirect('settings/delegation'); } @@ -92,7 +92,7 @@ class Delegation extends BaseSettings DBA::insert('manage', ['uid' => $user_id, 'mid' => local_user()]); } } else { - notice(DI::l10n()->t('Delegate user not found.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Delegate user not found.')); } DI::baseUrl()->redirect('settings/delegation'); @@ -100,7 +100,7 @@ class Delegation extends BaseSettings if ($action === 'remove' && $user_id) { if (Session::get('submanage')) { - notice(DI::l10n()->t('Delegated administrators can view but not change delegation permissions.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Delegated administrators can view but not change delegation permissions.')); DI::baseUrl()->redirect('settings/delegation'); } diff --git a/src/Module/Settings/Display.php b/src/Module/Settings/Display.php index 4670bf500..fe42b8718 100644 --- a/src/Module/Settings/Display.php +++ b/src/Module/Settings/Display.php @@ -104,7 +104,7 @@ class Display extends BaseSettings DBA::update('user', ['theme' => $theme], ['uid' => local_user()]); } } else { - notice(DI::l10n()->t('The theme you chose isn\'t available.')); + DI::sysmsg()->addNotice(DI::l10n()->t('The theme you chose isn\'t available.')); } Hook::callAll('display_settings_post', $_POST); diff --git a/src/Module/Settings/Profile/Index.php b/src/Module/Settings/Profile/Index.php index 49130e8c5..eec7468d0 100644 --- a/src/Module/Settings/Profile/Index.php +++ b/src/Module/Settings/Profile/Index.php @@ -80,7 +80,7 @@ class Index extends BaseSettings $name = trim($_POST['name'] ?? ''); if (!strlen($name)) { - notice(DI::l10n()->t('Profile Name is required.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Profile Name is required.')); return; } @@ -128,7 +128,7 @@ class Index extends BaseSettings ); if (!$result) { - notice(DI::l10n()->t('Profile couldn\'t be updated.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Profile couldn\'t be updated.')); return; } @@ -138,7 +138,7 @@ class Index extends BaseSettings protected function content(array $request = []): string { if (!local_user()) { - notice(DI::l10n()->t('You must be logged in to use this module')); + DI::sysmsg()->addNotice(DI::l10n()->t('You must be logged in to use this module')); return Login::form(); } diff --git a/src/Module/Settings/Profile/Photo/Crop.php b/src/Module/Settings/Profile/Photo/Crop.php index ee9ac3246..5afab9503 100644 --- a/src/Module/Settings/Profile/Photo/Crop.php +++ b/src/Module/Settings/Profile/Photo/Crop.php @@ -105,7 +105,7 @@ class Crop extends BaseSettings Photo::USER_AVATAR ); if ($r === false) { - notice(DI::l10n()->t('Image size reduction [%s] failed.', '300')); + DI::sysmsg()->addNotice(DI::l10n()->t('Image size reduction [%s] failed.', '300')); } else { Photo::update(['profile' => true], array_merge($condition, ['scale' => 4])); } @@ -123,7 +123,7 @@ class Crop extends BaseSettings Photo::USER_AVATAR ); if ($r === false) { - notice(DI::l10n()->t('Image size reduction [%s] failed.', '80')); + DI::sysmsg()->addNotice(DI::l10n()->t('Image size reduction [%s] failed.', '80')); } else { Photo::update(['profile' => true], array_merge($condition, ['scale' => 5])); } @@ -141,19 +141,19 @@ class Crop extends BaseSettings Photo::USER_AVATAR ); if ($r === false) { - notice(DI::l10n()->t('Image size reduction [%s] failed.', '48')); + DI::sysmsg()->addNotice(DI::l10n()->t('Image size reduction [%s] failed.', '48')); } else { Photo::update(['profile' => true], array_merge($condition, ['scale' => 6])); } Contact::updateSelfFromUserID(local_user(), true); - info(DI::l10n()->t('Shift-reload the page or clear browser cache if the new photo does not display immediately.')); + DI::sysmsg()->addInfo(DI::l10n()->t('Shift-reload the page or clear browser cache if the new photo does not display immediately.')); // Update global directory in background Profile::publishUpdate(local_user()); } else { - notice(DI::l10n()->t('Unable to process image')); + DI::sysmsg()->addNotice(DI::l10n()->t('Unable to process image')); } } @@ -194,7 +194,7 @@ class Crop extends BaseSettings // Update global directory in background Profile::publishUpdate(local_user()); - info(DI::l10n()->t('Profile picture successfully updated.')); + DI::sysmsg()->addInfo(DI::l10n()->t('Profile picture successfully updated.')); DI::baseUrl()->redirect('profile/' . DI::app()->getLoggedInUserNickname()); } diff --git a/src/Module/Settings/Profile/Photo/Index.php b/src/Module/Settings/Profile/Photo/Index.php index ff2a239b5..4f0b5ddad 100644 --- a/src/Module/Settings/Profile/Photo/Index.php +++ b/src/Module/Settings/Profile/Photo/Index.php @@ -43,7 +43,7 @@ class Index extends BaseSettings self::checkFormSecurityTokenRedirectOnError('/settings/profile/photo', 'settings_profile_photo'); if (empty($_FILES['userfile'])) { - notice(DI::l10n()->t('Missing uploaded image.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Missing uploaded image.')); return; } @@ -57,7 +57,7 @@ class Index extends BaseSettings $maximagesize = DI::config()->get('system', 'maximagesize', 0); if ($maximagesize && $filesize > $maximagesize) { - notice(DI::l10n()->t('Image exceeds size limit of %s', Strings::formatBytes($maximagesize))); + DI::sysmsg()->addNotice(DI::l10n()->t('Image exceeds size limit of %s', Strings::formatBytes($maximagesize))); @unlink($src); return; } @@ -66,7 +66,7 @@ class Index extends BaseSettings $Image = new Image($imagedata, $filetype); if (!$Image->isValid()) { - notice(DI::l10n()->t('Unable to process image.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Unable to process image.')); @unlink($src); return; } @@ -93,13 +93,13 @@ class Index extends BaseSettings $filename = ''; if (!Photo::store($Image, local_user(), 0, $resource_id, $filename, DI::l10n()->t(Photo::PROFILE_PHOTOS), 0, Photo::USER_AVATAR)) { - notice(DI::l10n()->t('Image upload failed.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Image upload failed.')); } if ($width > 640 || $height > 640) { $Image->scaleDown(640); if (!Photo::store($Image, local_user(), 0, $resource_id, $filename, DI::l10n()->t(Photo::PROFILE_PHOTOS), 1, Photo::USER_AVATAR)) { - notice(DI::l10n()->t('Image size reduction [%s] failed.', '640')); + DI::sysmsg()->addNotice(DI::l10n()->t('Image size reduction [%s] failed.', '640')); } } diff --git a/src/Module/Settings/TwoFactor/AppSpecific.php b/src/Module/Settings/TwoFactor/AppSpecific.php index 5fc513393..69b509131 100644 --- a/src/Module/Settings/TwoFactor/AppSpecific.php +++ b/src/Module/Settings/TwoFactor/AppSpecific.php @@ -25,6 +25,7 @@ use Friendica\App; use Friendica\Core\L10n; use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues; use Friendica\Core\Renderer; +use Friendica\DI; use Friendica\Module\Response; use Friendica\Security\TwoFactor\Model\AppSpecificPassword; use Friendica\Module\BaseSettings; @@ -61,7 +62,7 @@ class AppSpecific extends BaseSettings } if (!self::checkFormSecurityToken('settings_2fa_password', 't')) { - notice($this->t('Please enter your password to access this page.')); + DI::sysmsg()->addNotice($this->t('Please enter your password to access this page.')); $this->baseUrl->redirect('settings/2fa'); } } @@ -79,20 +80,20 @@ class AppSpecific extends BaseSettings case 'generate': $description = $_POST['description'] ?? ''; if (empty($description)) { - notice($this->t('App-specific password generation failed: The description is empty.')); + DI::sysmsg()->addNotice($this->t('App-specific password generation failed: The description is empty.')); $this->baseUrl->redirect('settings/2fa/app_specific?t=' . self::getFormSecurityToken('settings_2fa_password')); } elseif (AppSpecificPassword::checkDuplicateForUser(local_user(), $description)) { - notice($this->t('App-specific password generation failed: This description already exists.')); + DI::sysmsg()->addNotice($this->t('App-specific password generation failed: This description already exists.')); $this->baseUrl->redirect('settings/2fa/app_specific?t=' . self::getFormSecurityToken('settings_2fa_password')); } else { $this->appSpecificPassword = AppSpecificPassword::generateForUser(local_user(), $_POST['description'] ?? ''); - info($this->t('New app-specific password generated.')); + DI::sysmsg()->addInfo($this->t('New app-specific password generated.')); } break; case 'revoke_all' : AppSpecificPassword::deleteAllForUser(local_user()); - info($this->t('App-specific passwords successfully revoked.')); + DI::sysmsg()->addInfo($this->t('App-specific passwords successfully revoked.')); $this->baseUrl->redirect('settings/2fa/app_specific?t=' . self::getFormSecurityToken('settings_2fa_password')); break; } @@ -102,7 +103,7 @@ class AppSpecific extends BaseSettings self::checkFormSecurityTokenRedirectOnError('settings/2fa/app_specific', 'settings_2fa_app_specific'); if (AppSpecificPassword::deleteForUser(local_user(), $_POST['revoke_id'])) { - info($this->t('App-specific password successfully revoked.')); + DI::sysmsg()->addInfo($this->t('App-specific password successfully revoked.')); } $this->baseUrl->redirect('settings/2fa/app_specific?t=' . self::getFormSecurityToken('settings_2fa_password')); diff --git a/src/Module/Settings/TwoFactor/Index.php b/src/Module/Settings/TwoFactor/Index.php index 0da49f317..be3d8d232 100644 --- a/src/Module/Settings/TwoFactor/Index.php +++ b/src/Module/Settings/TwoFactor/Index.php @@ -66,7 +66,7 @@ class Index extends BaseSettings DI::pConfig()->delete(local_user(), '2fa', 'verified'); Session::remove('2fa'); - info(DI::l10n()->t('Two-factor authentication successfully disabled.')); + DI::sysmsg()->addInfo(DI::l10n()->t('Two-factor authentication successfully disabled.')); DI::baseUrl()->redirect('settings/2fa'); } break; @@ -98,7 +98,7 @@ class Index extends BaseSettings } catch (FoundException $exception) { // Nothing to do here } catch (\Exception $e) { - notice(DI::l10n()->t($e->getMessage())); + DI::sysmsg()->addNotice(DI::l10n()->t($e->getMessage())); } } diff --git a/src/Module/Settings/TwoFactor/Recovery.php b/src/Module/Settings/TwoFactor/Recovery.php index 9d453d5a2..04749f2f8 100644 --- a/src/Module/Settings/TwoFactor/Recovery.php +++ b/src/Module/Settings/TwoFactor/Recovery.php @@ -25,6 +25,7 @@ use Friendica\App; use Friendica\Core\L10n; use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues; use Friendica\Core\Renderer; +use Friendica\DI; use Friendica\Module\Response; use Friendica\Security\TwoFactor\Model\RecoveryCode; use Friendica\Module\BaseSettings; @@ -59,7 +60,7 @@ class Recovery extends BaseSettings } if (!self::checkFormSecurityToken('settings_2fa_password', 't')) { - notice($this->t('Please enter your password to access this page.')); + DI::sysmsg()->addNotice($this->t('Please enter your password to access this page.')); $this->baseUrl->redirect('settings/2fa'); } } @@ -75,7 +76,7 @@ class Recovery extends BaseSettings if ($_POST['action'] == 'regenerate') { RecoveryCode::regenerateForUser(local_user()); - info($this->t('New recovery codes successfully generated.')); + DI::sysmsg()->addInfo($this->t('New recovery codes successfully generated.')); $this->baseUrl->redirect('settings/2fa/recovery?t=' . self::getFormSecurityToken('settings_2fa_password')); } } diff --git a/src/Module/Settings/TwoFactor/Trusted.php b/src/Module/Settings/TwoFactor/Trusted.php index 140394e07..61f97dbd1 100644 --- a/src/Module/Settings/TwoFactor/Trusted.php +++ b/src/Module/Settings/TwoFactor/Trusted.php @@ -25,6 +25,7 @@ use Friendica\App; use Friendica\Core\L10n; use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues; use Friendica\Core\Renderer; +use Friendica\DI; use Friendica\Module\BaseSettings; use Friendica\Module\Response; use Friendica\Security\TwoFactor; @@ -62,7 +63,7 @@ class Trusted extends BaseSettings } if (!self::checkFormSecurityToken('settings_2fa_password', 't')) { - notice($this->t('Please enter your password to access this page.')); + DI::sysmsg()->addNotice($this->t('Please enter your password to access this page.')); $this->baseUrl->redirect('settings/2fa'); } } @@ -79,7 +80,7 @@ class Trusted extends BaseSettings switch ($_POST['action']) { case 'remove_all': $this->trustedBrowserRepo->removeAllForUser(local_user()); - info($this->t('Trusted browsers successfully removed.')); + DI::sysmsg()->addInfo($this->t('Trusted browsers successfully removed.')); $this->baseUrl->redirect('settings/2fa/trusted?t=' . self::getFormSecurityToken('settings_2fa_password')); break; } @@ -89,7 +90,7 @@ class Trusted extends BaseSettings self::checkFormSecurityTokenRedirectOnError('settings/2fa/trusted', 'settings_2fa_trusted'); if ($this->trustedBrowserRepo->removeForUser(local_user(), $_POST['remove_id'])) { - info($this->t('Trusted browser successfully removed.')); + DI::sysmsg()->addInfo($this->t('Trusted browser successfully removed.')); } $this->baseUrl->redirect('settings/2fa/trusted?t=' . self::getFormSecurityToken('settings_2fa_password')); diff --git a/src/Module/Settings/TwoFactor/Verify.php b/src/Module/Settings/TwoFactor/Verify.php index 7b5bea385..3d7db0118 100644 --- a/src/Module/Settings/TwoFactor/Verify.php +++ b/src/Module/Settings/TwoFactor/Verify.php @@ -30,6 +30,7 @@ use Friendica\Core\L10n; use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues; use Friendica\Core\Renderer; use Friendica\Core\Session; +use Friendica\DI; use Friendica\Module\BaseSettings; use Friendica\Module\Response; use Friendica\Module\Security\Login; @@ -65,7 +66,7 @@ class Verify extends BaseSettings } if (!self::checkFormSecurityToken('settings_2fa_password', 't')) { - notice($this->t('Please enter your password to access this page.')); + DI::sysmsg()->addNotice($this->t('Please enter your password to access this page.')); $this->baseUrl->redirect('settings/2fa'); } } @@ -87,11 +88,11 @@ class Verify extends BaseSettings $this->pConfig->set(local_user(), '2fa', 'verified', true); Session::set('2fa', true); - info($this->t('Two-factor authentication successfully activated.')); + DI::sysmsg()->addInfo($this->t('Two-factor authentication successfully activated.')); $this->baseUrl->redirect('settings/2fa'); } else { - notice($this->t('Invalid code, please retry.')); + DI::sysmsg()->addNotice($this->t('Invalid code, please retry.')); } } } diff --git a/src/Security/Authentication.php b/src/Security/Authentication.php index 42dc02340..3cd7b76bc 100644 --- a/src/Security/Authentication.php +++ b/src/Security/Authentication.php @@ -223,7 +223,7 @@ class Authentication // if it's an email address or doesn't resolve to a URL, fail. if ($noid || strpos($openid_url, '@') || !Network::isUrlValid($openid_url)) { - notice($this->l10n->t('Login failed.')); + DI::sysmsg()->addNotice($this->l10n->t('Login failed.')); $this->baseUrl->redirect(); } @@ -237,7 +237,7 @@ class Authentication $openid->optional = ['namePerson/friendly', 'contact/email', 'namePerson', 'namePerson/first', 'media/image/aspect11', 'media/image/default']; System::externalRedirect($openid->authUrl()); } catch (Exception $e) { - notice($this->l10n->t('We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID.') . '

' . $this->l10n->t('The error message was:') . ' ' . $e->getMessage()); + DI::sysmsg()->addNotice($this->l10n->t('We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID.') . '

' . $this->l10n->t('The error message was:') . ' ' . $e->getMessage()); } } @@ -268,7 +268,7 @@ class Authentication ); } catch (Exception $e) { $this->logger->warning('authenticate: failed login attempt', ['action' => 'login', 'username' => $username, 'ip' => $this->remoteAddress]); - notice($this->l10n->t('Login failed. Please check your credentials.')); + DI::sysmsg()->addNotice($this->l10n->t('Login failed. Please check your credentials.')); $this->baseUrl->redirect(); } @@ -379,8 +379,8 @@ class Authentication if ($interactive) { if ($user_record['login_date'] <= DBA::NULL_DATETIME) { - info($this->l10n->t('Welcome %s', $user_record['username'])); - info($this->l10n->t('Please upload a profile photo.')); + DI::sysmsg()->addInfo($this->l10n->t('Welcome %s', $user_record['username'])); + DI::sysmsg()->addInfo($this->l10n->t('Please upload a profile photo.')); $this->baseUrl->redirect('settings/profile/photo/new'); } } From 497fc4e43216b72deca14b3213244e25eed4108b Mon Sep 17 00:00:00 2001 From: Philipp Date: Mon, 17 Oct 2022 21:25:04 +0200 Subject: [PATCH 22/27] Move Monolog to Addons --- bin/console.php | 3 + composer.json | 2 +- composer.lock | 84 +------- doc/Addons.md | 4 + doc/de/Addons.md | 4 + src/Core/Logger/Factory/Logger.php | 179 +++++++----------- .../Logger/Type/Monolog/DevelopHandler.php | 76 -------- .../Type/Monolog/IntrospectionProcessor.php | 62 ------ src/Core/Logger/Type/README.md | 1 - src/Database/Database.php | 7 +- tests/src/Core/Cache/DatabaseCacheTest.php | 3 +- .../src/Core/Storage/DatabaseStorageTest.php | 3 +- .../Storage/Repository/StorageManagerTest.php | 2 +- 13 files changed, 92 insertions(+), 338 deletions(-) delete mode 100644 src/Core/Logger/Type/Monolog/DevelopHandler.php delete mode 100644 src/Core/Logger/Type/Monolog/IntrospectionProcessor.php diff --git a/bin/console.php b/bin/console.php index 3e588acd6..41e017248 100755 --- a/bin/console.php +++ b/bin/console.php @@ -26,6 +26,7 @@ if (php_sapi_name() !== 'cli') { } use Dice\Dice; +use Friendica\DI; use Psr\Log\LoggerInterface; require dirname(__DIR__) . '/vendor/autoload.php'; @@ -33,6 +34,8 @@ require dirname(__DIR__) . '/vendor/autoload.php'; $dice = (new Dice())->addRules(include __DIR__ . '/../static/dependencies.config.php'); $dice = $dice->addRule(LoggerInterface::class,['constructParams' => ['console']]); +/// @fixme Necessary until Hooks inside the Logger can get loaded without the DI-class +DI::init($dice); \Friendica\Core\Logger\Handler\ErrorHandler::register($dice->create(\Psr\Log\LoggerInterface::class)); (new Friendica\Core\Console($dice, $argv))->execute(); diff --git a/composer.json b/composer.json index cc3a0db5f..959e8de31 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,6 @@ "michelf/php-markdown": "^1.7", "minishlink/web-push": "^6.0", "mobiledetect/mobiledetectlib": "^2.8", - "monolog/monolog": "^1.25", "nikic/fast-route": "^1.3", "paragonie/hidden-string": "^1.0", "patrickschur/language-detection": "^5.0.0", @@ -50,6 +49,7 @@ "pragmarx/google2fa": "^5.0", "pragmarx/recovery": "^0.2", "psr/container": "^1.0", + "psr/log": "^1.1", "seld/cli-prompt": "^1.0", "smarty/smarty": "^4", "ua-parser/uap-php": "^3.9", diff --git a/composer.lock b/composer.lock index 9de7fd696..96949561b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f5922f03b367e68a5930df6ed80c5c2f", + "content-hash": "c851fbba46ed090d0fbaf68e9b3b94df", "packages": [ { "name": "asika/simple-console", @@ -1543,88 +1543,6 @@ ], "time": "2022-02-17T19:24:25+00:00" }, - { - "name": "monolog/monolog", - "version": "1.27.1", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "904713c5929655dc9b97288b69cfeedad610c9a1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/904713c5929655dc9b97288b69cfeedad610c9a1", - "reference": "904713c5929655dc9b97288b69cfeedad610c9a1", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "psr/log": "~1.0" - }, - "provide": { - "psr/log-implementation": "1.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "^2.4.9 || ^3.0", - "doctrine/couchdb": "~1.0@dev", - "graylog2/gelf-php": "~1.0", - "php-amqplib/php-amqplib": "~2.4", - "php-console/php-console": "^3.1.3", - "phpstan/phpstan": "^0.12.59", - "phpunit/phpunit": "~4.5", - "ruflin/elastica": ">=0.90 <3.0", - "sentry/sentry": "^0.13", - "swiftmailer/swiftmailer": "^5.3|^6.0" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-mongo": "Allow sending log messages to a MongoDB server", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "php-console/php-console": "Allow sending log messages to Google Chrome", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server", - "sentry/sentry": "Allow sending log messages to a Sentry server" - }, - "type": "library", - "autoload": { - "psr-4": { - "Monolog\\": "src/Monolog" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "http://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ], - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", - "type": "tidelift" - } - ], - "time": "2022-06-09T08:53:42+00:00" - }, { "name": "nikic/fast-route", "version": "v1.3.0", diff --git a/doc/Addons.md b/doc/Addons.md index bbc0ed61c..91765ec48 100644 --- a/doc/Addons.md +++ b/doc/Addons.md @@ -919,6 +919,10 @@ Here is a complete list of all hook callbacks with file locations (as of 24-Sep- Hook::callAll('block', $hook_data); Hook::callAll('unblock', $hook_data); +### src/Core/Logger/Factory.php + + Hook::callAll('logger_instance', $data); + ### src/Core/StorageManager Hook::callAll('storage_instance', $data); diff --git a/doc/de/Addons.md b/doc/de/Addons.md index 5a4ca98a0..342dd1b81 100644 --- a/doc/de/Addons.md +++ b/doc/de/Addons.md @@ -405,6 +405,10 @@ Eine komplette Liste aller Hook-Callbacks mit den zugehörigen Dateien (am 01-Ap Hook::callAll('block', $hook_data); Hook::callAll('unblock', $hook_data); +### src/Core/Logger/Factory.php + + Hook::callAll('logger_instance', $data); + ### src/Core/StorageManager Hook::callAll('storage_instance', $data); diff --git a/src/Core/Logger/Factory/Logger.php b/src/Core/Logger/Factory/Logger.php index 954784c95..4df7d8eca 100644 --- a/src/Core/Logger/Factory/Logger.php +++ b/src/Core/Logger/Factory/Logger.php @@ -22,19 +22,16 @@ namespace Friendica\Core\Logger\Factory; use Friendica\Core\Config\Capability\IManageConfigValues; -use Friendica\Core\Logger\Exception\LoggerException; use Friendica\Core; use Friendica\Core\Logger\Exception\LogLevelException; use Friendica\Database\Database; +use Friendica\Network\HTTPException\InternalServerErrorException; use Friendica\Util\FileSystem; use Friendica\Core\Logger\Util\Introspection; -use Friendica\Core\Logger\Type\Monolog\DevelopHandler; -use Friendica\Core\Logger\Type\Monolog\IntrospectionProcessor; use Friendica\Core\Logger\Type\ProfilerLogger; use Friendica\Core\Logger\Type\StreamLogger; use Friendica\Core\Logger\Type\SyslogLogger; use Friendica\Util\Profiler; -use Monolog; use Psr\Log\LoggerInterface; use Psr\Log\LogLevel; use Psr\Log\NullLogger; @@ -60,9 +57,15 @@ class Logger /** @var string The log-channel (app, worker, ...) */ private $channel; - public function __construct(string $channel) + public function __construct(string $channel, bool $includeAddon = true) { $this->channel = $channel; + + /// @fixme clean solution = Making Addon & Hook dynamic and load them inside the constructor, so there's no custom load logic necessary anymore + if ($includeAddon) { + Core\Addon::loadAddons(); + Core\Hook::loadHooks(); + } } /** @@ -88,35 +91,9 @@ class Logger $minLevel = $minLevel ?? $config->get('system', 'loglevel'); $loglevel = self::mapLegacyConfigDebugLevel((string)$minLevel); - switch ($config->get('system', 'logger_config', 'stream')) { - case 'monolog': - $loggerTimeZone = new \DateTimeZone('UTC'); - Monolog\Logger::setTimezone($loggerTimeZone); - - $logger = new Monolog\Logger($this->channel); - $logger->pushProcessor(new Monolog\Processor\PsrLogMessageProcessor()); - $logger->pushProcessor(new Monolog\Processor\ProcessIdProcessor()); - $logger->pushProcessor(new Monolog\Processor\UidProcessor()); - $logger->pushProcessor(new IntrospectionProcessor($introspection, LogLevel::DEBUG)); - - $stream = $config->get('system', 'logfile'); - - // just add a stream in case it's either writable or not file - if (!is_file($stream) || is_writable($stream)) { - try { - static::addStreamHandler($logger, $stream, $loglevel); - } catch (\Throwable $e) { - // No Logger .. - try { - $logger = new SyslogLogger($this->channel, $introspection, $loglevel); - } catch (\Throwable $e) { - // No logger ... - $logger = new NullLogger(); - } - } - } - break; + $name = $config->get('system', 'logger_config', 'stream'); + switch ($name) { case 'syslog': try { $logger = new SyslogLogger($this->channel, $introspection, $loglevel, $config->get('system', 'syslog_flags', SyslogLogger::DEFAULT_FLAGS), $config->get('system', 'syslog_facility', SyslogLogger::DEFAULT_FACILITY)); @@ -132,29 +109,48 @@ class Logger case 'stream': default: - $stream = $config->get('system', 'logfile'); - // just add a stream in case it's either writable or not file - if (!is_file($stream) || is_writable($stream)) { - try { - $logger = new StreamLogger($this->channel, $stream, $introspection, $fileSystem, $loglevel); - } catch (LogLevelException $exception) { - // If there's a wrong config value for loglevel, try again with standard - $logger = $this->create($database, $config, $profiler, $fileSystem, LogLevel::NOTICE); - $logger->warning('Invalid loglevel set in config.', ['loglevel' => $loglevel]); - } catch (\Throwable $t) { - // No logger ... - $logger = new NullLogger(); - } - } else { - try { - $logger = new SyslogLogger($this->channel, $introspection, $loglevel); - } catch (LogLevelException $exception) { - // If there's a wrong config value for loglevel, try again with standard - $logger = $this->create($database, $config, $profiler, $fileSystem, LogLevel::NOTICE); - $logger->warning('Invalid loglevel set in config.', ['loglevel' => $loglevel]); - } catch (\Throwable $e) { - // No logger ... - $logger = new NullLogger(); + $data = [ + 'name' => $name, + 'channel' => $this->channel, + 'introspection' => $introspection, + 'loglevel' => $loglevel, + 'logger' => null, + ]; + try { + Core\Hook::callAll('logger_instance', $data); + } catch (InternalServerErrorException $exception) { + $data['logger'] = null; + } + + if (($data['logger'] ?? null) instanceof LoggerInterface) { + $logger = $data['logger']; + } + + if (empty($logger)) { + $stream = $config->get('system', 'logfile'); + // just add a stream in case it's either writable or not file + if (!is_file($stream) || is_writable($stream)) { + try { + $logger = new StreamLogger($this->channel, $stream, $introspection, $fileSystem, $loglevel); + } catch (LogLevelException $exception) { + // If there's a wrong config value for loglevel, try again with standard + $logger = $this->create($database, $config, $profiler, $fileSystem, LogLevel::NOTICE); + $logger->warning('Invalid loglevel set in config.', ['loglevel' => $loglevel]); + } catch (\Throwable $t) { + // No logger ... + $logger = new NullLogger(); + } + } else { + try { + $logger = new SyslogLogger($this->channel, $introspection, $loglevel); + } catch (LogLevelException $exception) { + // If there's a wrong config value for loglevel, try again with standard + $logger = $this->create($database, $config, $profiler, $fileSystem, LogLevel::NOTICE); + $logger->warning('Invalid loglevel set in config.', ['loglevel' => $loglevel]); + } catch (\Throwable $e) { + // No logger ... + $logger = new NullLogger(); + } } } break; @@ -197,27 +193,11 @@ class Logger return new NullLogger(); } - $loggerTimeZone = new \DateTimeZone('UTC'); - Monolog\Logger::setTimezone($loggerTimeZone); - $introspection = new Introspection(self::$ignoreClassList); - switch ($config->get('system', 'logger_config', 'stream')) { + $name = $config->get('system', 'logger_config', 'stream'); - case 'monolog': - $loggerTimeZone = new \DateTimeZone('UTC'); - Monolog\Logger::setTimezone($loggerTimeZone); - - $logger = new Monolog\Logger(self::DEV_CHANNEL); - $logger->pushProcessor(new Monolog\Processor\PsrLogMessageProcessor()); - $logger->pushProcessor(new Monolog\Processor\ProcessIdProcessor()); - $logger->pushProcessor(new Monolog\Processor\UidProcessor()); - $logger->pushProcessor(new IntrospectionProcessor($introspection, LogLevel::DEBUG)); - - $logger->pushHandler(new DevelopHandler($developerIp)); - - static::addStreamHandler($logger, $stream, LogLevel::DEBUG); - break; + switch ($name) { case 'syslog': $logger = new SyslogLogger(self::DEV_CHANNEL, $introspection, LogLevel::DEBUG); @@ -225,6 +205,23 @@ class Logger case 'stream': default: + $data = [ + 'name' => $name, + 'channel' => self::DEV_CHANNEL, + 'introspection' => $introspection, + 'loglevel' => LogLevel::DEBUG, + 'logger' => null, + ]; + try { + Core\Hook::callAll('logger_instance', $data); + } catch (InternalServerErrorException $exception) { + $data['logger'] = null; + } + + if (($data['logger'] ?? null) instanceof LoggerInterface) { + return $data['logger']; + } + $logger = new StreamLogger(self::DEV_CHANNEL, $stream, $introspection, $fileSystem, LogLevel::DEBUG); break; } @@ -273,38 +270,4 @@ class Logger return $level; } } - - /** - * Adding a handler to a given logger instance - * - * @param LoggerInterface $logger The logger instance - * @param mixed $stream The stream which handles the logger output - * @param string $level The level, for which this handler at least should handle logging - * - * @return void - * - * @throws LoggerException - */ - public static function addStreamHandler(LoggerInterface $logger, $stream, string $level = LogLevel::NOTICE) - { - if ($logger instanceof Monolog\Logger) { - $loglevel = Monolog\Logger::toMonologLevel($level); - - // fallback to notice if an invalid loglevel is set - if (!is_int($loglevel)) { - $loglevel = LogLevel::NOTICE; - } - - try { - $fileHandler = new Monolog\Handler\StreamHandler($stream, $loglevel); - - $formatter = new Monolog\Formatter\LineFormatter("%datetime% %channel% [%level_name%]: %message% %context% %extra%\n"); - $fileHandler->setFormatter($formatter); - - $logger->pushHandler($fileHandler); - } catch (\Exception $exception) { - throw new LoggerException('Cannot create Monolog Logger.', $exception); - } - } - } } diff --git a/src/Core/Logger/Type/Monolog/DevelopHandler.php b/src/Core/Logger/Type/Monolog/DevelopHandler.php deleted file mode 100644 index febb8d6cd..000000000 --- a/src/Core/Logger/Type/Monolog/DevelopHandler.php +++ /dev/null @@ -1,76 +0,0 @@ -. - * - */ - -namespace Friendica\Core\Logger\Type\Monolog; - -use Friendica\App\Request; -use Monolog\Handler; -use Monolog\Logger; - -/** - * Simple handler for Friendica developers to use for deeper logging - * - * If you want to debug only interactions from your IP or the IP of a remote server for federation debug, - * you'll use Logger::develop() for the duration of your work, and you clean it up when you're done before submitting your PR. - */ -class DevelopHandler extends Handler\AbstractHandler -{ - /** - * @var string The IP of the developer who wants to debug - */ - private $developerIp; - - /** - * @var string The IP of the current request - */ - private $remoteAddress; - - /** - * @param Request $request The current http request - * @param string $developerIp The IP of the developer who wants to debug - * @param int $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct(Request $request, $developerIp, int $level = Logger::DEBUG, bool $bubble = true) - { - parent::__construct($level, $bubble); - - $this->developerIp = $developerIp; - $this->remoteAddress = $request->getRemoteAddress(); - } - - /** - * {@inheritdoc} - */ - public function handle(array $record): bool - { - if (!$this->isHandling($record)) { - return false; - } - - /// Just in case the remote IP is the same as the developer IP log the output - if (!is_null($this->developerIp) && $this->remoteAddress != $this->developerIp) { - return false; - } - - return false === $this->bubble; - } -} diff --git a/src/Core/Logger/Type/Monolog/IntrospectionProcessor.php b/src/Core/Logger/Type/Monolog/IntrospectionProcessor.php deleted file mode 100644 index 99a9defaf..000000000 --- a/src/Core/Logger/Type/Monolog/IntrospectionProcessor.php +++ /dev/null @@ -1,62 +0,0 @@ -. - * - */ - -namespace Friendica\Core\Logger\Type\Monolog; - -use Friendica\Core\Logger\Util\Introspection; -use Monolog\Logger; -use Monolog\Processor\ProcessorInterface; - -/** - * Injects line/file//function where the log message came from - */ -class IntrospectionProcessor implements ProcessorInterface -{ - private $level; - - private $introspection; - - /** - * @param Introspection $introspection Holds the Introspection of the current call - * @param string|int $level The minimum logging level at which this Processor will be triggered - */ - public function __construct(Introspection $introspection, $level = Logger::DEBUG) - { - $this->level = Logger::toMonologLevel($level); - $introspection->addClasses(['Monolog\\']); - $this->introspection = $introspection; - } - - public function __invoke(array $record): array - { - // return if the level is not high enough - if ($record['level'] < $this->level) { - return $record; - } - // we should have the call source now - $record['extra'] = array_merge( - $record['extra'], - $this->introspection->getRecord() - ); - - return $record; - } -} diff --git a/src/Core/Logger/Type/README.md b/src/Core/Logger/Type/README.md index 449403194..b204353c0 100644 --- a/src/Core/Logger/Type/README.md +++ b/src/Core/Logger/Type/README.md @@ -5,7 +5,6 @@ This namespace contains the different implementations of a Logger. ### Configuration guideline The following settings are possible for `logger_config`: -- `monolog`: A Logging framework with lots of additions (see [Monolog](https://github.com/Seldaek/monolog/)). There are just Friendica additions inside the Monolog directory - [`stream`](StreamLogger.php): A small logger for files or streams - [`syslog`](SyslogLogger.php): Prints the logging output into the syslog diff --git a/src/Database/Database.php b/src/Database/Database.php index fde5bd9f1..79c39e9af 100644 --- a/src/Database/Database.php +++ b/src/Database/Database.php @@ -36,6 +36,7 @@ use PDO; use PDOException; use PDOStatement; use Psr\Log\LoggerInterface; +use Psr\Log\NullLogger; /** * This class is for the low level database stuff that does driver specific things. @@ -80,15 +81,17 @@ class Database /** @var ViewDefinition */ protected $viewDefinition; - public function __construct(Cache $configCache, Profiler $profiler, DbaDefinition $dbaDefinition, ViewDefinition $viewDefinition, LoggerInterface $logger) + public function __construct(Cache $configCache, Profiler $profiler, DbaDefinition $dbaDefinition, ViewDefinition $viewDefinition) { // We are storing these values for being able to perform a reconnect $this->configCache = $configCache; $this->profiler = $profiler; - $this->logger = $logger; $this->dbaDefinition = $dbaDefinition; $this->viewDefinition = $viewDefinition; + // Temporary NullLogger until we can fetch the logger class from the config + $this->logger = new NullLogger(); + $this->connect(); } diff --git a/tests/src/Core/Cache/DatabaseCacheTest.php b/tests/src/Core/Cache/DatabaseCacheTest.php index 71b488bcb..e0d47c264 100644 --- a/tests/src/Core/Cache/DatabaseCacheTest.php +++ b/tests/src/Core/Cache/DatabaseCacheTest.php @@ -48,7 +48,6 @@ class DatabaseCacheTest extends CacheTest protected function getInstance() { - $logger = new NullLogger(); $profiler = Mockery::mock(Profiler::class); $profiler->shouldReceive('startRecording'); $profiler->shouldReceive('stopRecording'); @@ -62,7 +61,7 @@ class DatabaseCacheTest extends CacheTest $dbaDefinition = (new DbaDefinition($configCache->get('system', 'basepath')))->load(); $viewDefinition = (new ViewDefinition($configCache->get('system', 'basepath')))->load(); - $dba = new StaticDatabase($configCache, $profiler, $dbaDefinition, $viewDefinition, $logger); + $dba = new StaticDatabase($configCache, $profiler, $dbaDefinition, $viewDefinition); $this->cache = new Cache\Type\DatabaseCache('database', $dba); return $this->cache; diff --git a/tests/src/Core/Storage/DatabaseStorageTest.php b/tests/src/Core/Storage/DatabaseStorageTest.php index 75bbc4239..2933fab52 100644 --- a/tests/src/Core/Storage/DatabaseStorageTest.php +++ b/tests/src/Core/Storage/DatabaseStorageTest.php @@ -47,7 +47,6 @@ class DatabaseStorageTest extends StorageTest protected function getInstance() { - $logger = new NullLogger(); $profiler = \Mockery::mock(Profiler::class); $profiler->shouldReceive('startRecording'); $profiler->shouldReceive('stopRecording'); @@ -61,7 +60,7 @@ class DatabaseStorageTest extends StorageTest $dbaDefinition = (new DbaDefinition($configCache->get('system', 'basepath')))->load(); $viewDefinition = (new ViewDefinition($configCache->get('system', 'basepath')))->load(); - $dba = new StaticDatabase($configCache, $profiler, $dbaDefinition, $viewDefinition, $logger); + $dba = new StaticDatabase($configCache, $profiler, $dbaDefinition, $viewDefinition); return new Database($dba); } diff --git a/tests/src/Core/Storage/Repository/StorageManagerTest.php b/tests/src/Core/Storage/Repository/StorageManagerTest.php index 99dee27a6..27af7f837 100644 --- a/tests/src/Core/Storage/Repository/StorageManagerTest.php +++ b/tests/src/Core/Storage/Repository/StorageManagerTest.php @@ -87,7 +87,7 @@ class StorageManagerTest extends DatabaseTest $dbaDefinition = (new DbaDefinition($configCache->get('system', 'basepath')))->load(); $viewDefinition = (new ViewDefinition($configCache->get('system', 'basepath')))->load(); - $this->dba = new StaticDatabase($configCache, $profiler, $dbaDefinition, $viewDefinition, $this->logger); + $this->dba = new StaticDatabase($configCache, $profiler, $dbaDefinition, $viewDefinition); $configModel = new Repository\Config($this->dba, new Mode(Mode::DBCONFIGAVAILABLE)); $this->config = new PreloadConfig($configCache, $configModel); From 33ac39c33547984a9f32115155e435df1abc59c1 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 17 Oct 2022 21:11:00 +0000 Subject: [PATCH 23/27] The user related functions moved to the session class --- boot.php | 50 +++-------------------------------- src/BaseModule.php | 2 +- src/Core/Session.php | 62 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 47 deletions(-) diff --git a/boot.php b/boot.php index 24486f413..32a1494c6 100644 --- a/boot.php +++ b/boot.php @@ -27,7 +27,7 @@ * easily as email does today. */ -use Friendica\Model\Contact; +use Friendica\Core\Session; /** * Constant with a HTML line break. @@ -55,22 +55,6 @@ if (!defined('SIGTERM')) { define('SIGTERM', 15); } -/** - * Depending on the PHP version this constant does exist - or not. - * See here: http://php.net/manual/en/curl.constants.php#117928 - */ -if (!defined('CURLE_OPERATION_TIMEDOUT')) { - define('CURLE_OPERATION_TIMEDOUT', CURLE_OPERATION_TIMEOUTED); -} - -if (!function_exists('exif_imagetype')) { - function exif_imagetype($file) - { - $size = getimagesize($file); - return $size[2]; - } -} - /** * Returns the user id of locally logged in user or false. * @@ -78,11 +62,7 @@ if (!function_exists('exif_imagetype')) { */ function local_user() { - if (!empty($_SESSION['authenticated']) && !empty($_SESSION['uid'])) { - return intval($_SESSION['uid']); - } - - return false; + return Session::getLocalUser(); } /** @@ -92,21 +72,7 @@ function local_user() */ function public_contact() { - static $public_contact_id = false; - - if (!$public_contact_id && !empty($_SESSION['authenticated'])) { - if (!empty($_SESSION['my_address'])) { - // Local user - $public_contact_id = intval(Contact::getIdForURL($_SESSION['my_address'], 0, false)); - } elseif (!empty($_SESSION['visitor_home'])) { - // Remote user - $public_contact_id = intval(Contact::getIdForURL($_SESSION['visitor_home'], 0, false)); - } - } elseif (empty($_SESSION['authenticated'])) { - $public_contact_id = false; - } - - return $public_contact_id; + return Session::getPublicContact(); } /** @@ -116,13 +82,5 @@ function public_contact() */ function remote_user() { - if (empty($_SESSION['authenticated'])) { - return false; - } - - if (!empty($_SESSION['visitor_id'])) { - return intval($_SESSION['visitor_id']); - } - - return false; + return Session::getRemoteUser(); } diff --git a/src/BaseModule.php b/src/BaseModule.php index e532b9536..09107f047 100644 --- a/src/BaseModule.php +++ b/src/BaseModule.php @@ -389,7 +389,7 @@ abstract class BaseModule implements ICanHandleRequests public static function getFormSecurityStandardErrorMessage(): string { - return DI::l10n()->t("The form security token was not correct. This probably happened because the form has been opened for too long \x28>3 hours\x29 before submitting it.") . EOL; + return DI::l10n()->t("The form security token was not correct. This probably happened because the form has been opened for too long \x28>3 hours\x29 before submitting it."); } public static function checkFormSecurityTokenRedirectOnError(string $err_redirect, string $typename = '', string $formname = 'form_security_token') diff --git a/src/Core/Session.php b/src/Core/Session.php index 059cd499c..859dd8aa2 100644 --- a/src/Core/Session.php +++ b/src/Core/Session.php @@ -69,6 +69,68 @@ class Session DI::session()->clear(); } + /** + * Returns the user id of locally logged in user or false. + * + * @return int|bool user id or false + */ + public static function getLocalUser() + { + $session = DI::session(); + + if (!empty($session->get('authenticated')) && !empty($session->get('uid'))) { + return intval($session->get('uid')); + } + + return false; + } + + /** + * Returns the public contact id of logged in user or false. + * + * @return int|bool public contact id or false + */ + public static function getPublicContact() + { + static $public_contact_id = false; + + $session = DI::session(); + + if (!$public_contact_id && !empty($session->get('authenticated'))) { + if (!empty($session->get('my_address'))) { + // Local user + $public_contact_id = intval(Contact::getIdForURL($session->get('my_address'), 0, false)); + } elseif (!empty($session->get('visitor_home'))) { + // Remote user + $public_contact_id = intval(Contact::getIdForURL($session->get('visitor_home'), 0, false)); + } + } elseif (empty($session->get('authenticated'))) { + $public_contact_id = false; + } + + return $public_contact_id; + } + + /** + * Returns public contact id of authenticated site visitor or false + * + * @return int|bool visitor_id or false + */ + public static function getRemoteUser() + { + $session = DI::session(); + + if (empty($session->get('authenticated'))) { + return false; + } + + if (!empty($session->get('visitor_id'))) { + return intval($session->get('visitor_id')); + } + + return false; + } + /** * Return the user contact ID of a visitor for the given user ID they are visiting * From 27e9f2b223176e4d26c00e98f9741eca82f4bb63 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 18 Oct 2022 04:35:06 +0000 Subject: [PATCH 24/27] SIGTERM moved --- boot.php | 7 +------ src/App.php | 5 +++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/boot.php b/boot.php index 32a1494c6..d43ef8b0d 100644 --- a/boot.php +++ b/boot.php @@ -36,7 +36,7 @@ use Friendica\Core\Session; * feed for the source. * This can be used in HTML and JavaScript where needed a line break. */ -define('EOL', "
\r\n"); +define('EOL', "
\r\n"); /** * @name Gravity @@ -50,11 +50,6 @@ define('GRAVITY_COMMENT', 6); define('GRAVITY_UNKNOWN', 9); /* @}*/ -// Normally this constant is defined - but not if "pcntl" isn't installed -if (!defined('SIGTERM')) { - define('SIGTERM', 15); -} - /** * Returns the user id of locally logged in user or false. * diff --git a/src/App.php b/src/App.php index d46f69843..55b3e72e0 100644 --- a/src/App.php +++ b/src/App.php @@ -351,6 +351,11 @@ class App { set_time_limit(0); + // Normally this constant is defined - but not if "pcntl" isn't installed + if (!defined('SIGTERM')) { + define('SIGTERM', 15); + } + // Ensure that all "strtotime" operations do run timezone independent date_default_timezone_set('UTC'); From 810ea228f0cbcecf19d64ead7e39997976cff15c Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Tue, 18 Oct 2022 07:57:59 +0200 Subject: [PATCH 25/27] Apply suggestions from code review Co-authored-by: Hypolite Petovan --- boot.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/boot.php b/boot.php index d43ef8b0d..36a0745d6 100644 --- a/boot.php +++ b/boot.php @@ -54,6 +54,7 @@ define('GRAVITY_UNKNOWN', 9); * Returns the user id of locally logged in user or false. * * @return int|bool user id or false + * @deprecated since version 2022.12, use Core\Session::getLocalUser() instead */ function local_user() { @@ -64,6 +65,7 @@ function local_user() * Returns the public contact id of logged in user or false. * * @return int|bool public contact id or false + * @deprecated since version 2022.12, use Core\Session:: getPublicContact() instead */ function public_contact() { @@ -74,6 +76,7 @@ function public_contact() * Returns public contact id of authenticated site visitor or false * * @return int|bool visitor_id or false + * @deprecated since version 2022.12, use Core\Session:: getRemoteUser() instead */ function remote_user() { From d43122c6d8eb7ef59b36299f1e1296c81f6a2799 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 18 Oct 2022 08:02:55 +0000 Subject: [PATCH 26/27] Check the readability before acessing /proc/loadavg --- src/Core/System.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Core/System.php b/src/Core/System.php index 0c1e499d9..8a8f273a8 100644 --- a/src/Core/System.php +++ b/src/Core/System.php @@ -442,10 +442,13 @@ class System */ public static function getLoadAvg(): array { - $content = @file_get_contents('/proc/loadavg'); - if (empty($content)) { - $content = shell_exec('cat /proc/loadavg'); + if (is_readable('/proc/loadavg')) { + $content = @file_get_contents('/proc/loadavg'); + if (empty($content)) { + $content = shell_exec('cat /proc/loadavg'); + } } + if (empty($content) || !preg_match("#([.\d]+)\s([.\d]+)\s([.\d]+)\s(\d+)/(\d+)#", $content, $matches)) { $load_arr = sys_getloadavg(); if (empty($load_arr)) { From 6f68679375616a28634115cb63f9f22928419055 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 18 Oct 2022 12:29:50 +0000 Subject: [PATCH 27/27] The EOL constant is removed --- boot.php | 9 --------- mod/wall_attach.php | 8 ++++---- mod/wall_upload.php | 6 +++--- src/Content/Conversation.php | 2 +- src/Core/Installer.php | 32 ++++++++++++++++---------------- src/Database/DBStructure.php | 2 +- src/Model/Contact.php | 18 +++++++++--------- src/Model/User.php | 2 +- src/Module/Install.php | 2 +- src/Object/EMail/ItemCCEMail.php | 4 ++-- 10 files changed, 38 insertions(+), 47 deletions(-) diff --git a/boot.php b/boot.php index 36a0745d6..1716956fa 100644 --- a/boot.php +++ b/boot.php @@ -29,15 +29,6 @@ use Friendica\Core\Session; -/** - * Constant with a HTML line break. - * - * Contains a HTML line break (br) element and a real carriage return with line - * feed for the source. - * This can be used in HTML and JavaScript where needed a line break. - */ -define('EOL', "
\r\n"); - /** * @name Gravity * diff --git a/mod/wall_attach.php b/mod/wall_attach.php index 8341d7252..8a3ed7606 100644 --- a/mod/wall_attach.php +++ b/mod/wall_attach.php @@ -66,7 +66,7 @@ function wall_attach_post(App $a) { if ($r_json) { System::jsonExit(['error' => DI::l10n()->t('Permission denied.')]); } - DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.') . EOL ); + DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.')); System::exit(); } @@ -90,7 +90,7 @@ function wall_attach_post(App $a) { */ if ($filesize <= 0) { - $msg = DI::l10n()->t('Sorry, maybe your upload is bigger than the PHP configuration allows') . EOL .(DI::l10n()->t('Or - did you try to upload an empty file?')); + $msg = DI::l10n()->t('Sorry, maybe your upload is bigger than the PHP configuration allows') . '
' . (DI::l10n()->t('Or - did you try to upload an empty file?')); @unlink($src); if ($r_json) { System::jsonExit(['error' => $msg]); @@ -106,7 +106,7 @@ function wall_attach_post(App $a) { if ($r_json) { System::jsonExit(['error' => $msg]); } else { - echo $msg . EOL; + echo $msg . '
'; } System::exit(); } @@ -120,7 +120,7 @@ function wall_attach_post(App $a) { if ($r_json) { System::jsonExit(['error' => $msg]); } else { - echo $msg . EOL; + echo $msg . '
'; } System::exit(); } diff --git a/mod/wall_upload.php b/mod/wall_upload.php index befb0fceb..efea196fd 100644 --- a/mod/wall_upload.php +++ b/mod/wall_upload.php @@ -165,7 +165,7 @@ function wall_upload_post(App $a, $desktopmode = true) if ($r_json) { System::jsonExit(['error' => $msg]); } else { - echo $msg. EOL; + echo $msg . '
'; } System::exit(); } @@ -203,7 +203,7 @@ function wall_upload_post(App $a, $desktopmode = true) if ($r_json) { System::jsonExit(['error' => $msg]); } else { - echo $msg. EOL; + echo $msg . '
'; } System::exit(); } @@ -227,7 +227,7 @@ function wall_upload_post(App $a, $desktopmode = true) if ($r_json) { System::jsonExit(['error' => $msg]); } else { - echo $msg. EOL; + echo $msg . '
'; } System::exit(); } diff --git a/src/Content/Conversation.php b/src/Content/Conversation.php index 84f75cff3..a38182849 100644 --- a/src/Content/Conversation.php +++ b/src/Content/Conversation.php @@ -261,7 +261,7 @@ class Conversation break; } - $expanded .= "\t" . ''; + $expanded .= "\t" . ''; } $o .= Renderer::replaceMacros(Renderer::getMarkupTemplate('voting_fakelink.tpl'), [ diff --git a/src/Core/Installer.php b/src/Core/Installer.php index 9a9bdfb5f..1d29a5cf9 100644 --- a/src/Core/Installer.php +++ b/src/Core/Installer.php @@ -197,7 +197,7 @@ class Installer $result = DBStructure::install(); if ($result) { - $txt = DI::l10n()->t('You may need to import the file "database.sql" manually using phpmyadmin or mysql.') . EOL; + $txt = DI::l10n()->t('You may need to import the file "database.sql" manually using phpmyadmin or mysql.') . '
'; $txt .= DI::l10n()->t('Please see the file "doc/INSTALL.md".'); $this->addCheck($txt, false, true, htmlentities($result, ENT_COMPAT, 'UTF-8')); @@ -259,9 +259,9 @@ class Installer $help = ""; if (!$passed) { - $help .= DI::l10n()->t('Could not find a command line version of PHP in the web server PATH.') . EOL; - $help .= DI::l10n()->t("If you don't have a command line version of PHP installed on your server, you will not be able to run the background processing. See 'Setup the worker'") . EOL; - $help .= EOL . EOL; + $help .= DI::l10n()->t('Could not find a command line version of PHP in the web server PATH.') . '
'; + $help .= DI::l10n()->t("If you don't have a command line version of PHP installed on your server, you will not be able to run the background processing. See 'Setup the worker'") . '
'; + $help .= '

'; $tpl = Renderer::getMarkupTemplate('field_input.tpl'); /// @todo Separate backend Installer class and presentation layer/view $help .= Renderer::replaceMacros($tpl, [ @@ -279,7 +279,7 @@ class Installer [$result] = explode("\n", $result); $help = ""; if (!$passed2) { - $help .= DI::l10n()->t("PHP executable is not the php cli binary \x28could be cgi-fgci version\x29") . EOL; + $help .= DI::l10n()->t("PHP executable is not the php cli binary \x28could be cgi-fgci version\x29") . '
'; $help .= DI::l10n()->t('Found PHP version: ') . "$result"; } $this->addCheck(DI::l10n()->t('PHP cli binary'), $passed2, true, $help); @@ -295,7 +295,7 @@ class Installer $passed3 = $result == $str; $help = ""; if (!$passed3) { - $help .= DI::l10n()->t('The command line version of PHP on your system does not have "register_argc_argv" enabled.') . EOL; + $help .= DI::l10n()->t('The command line version of PHP on your system does not have "register_argc_argv" enabled.') . '
'; $help .= DI::l10n()->t('This is required for message delivery to work.'); } else { $this->phppath = $phppath; @@ -333,7 +333,7 @@ class Installer // Get private key if (!$res) { - $help .= DI::l10n()->t('Error: the "openssl_pkey_new" function on this system is not able to generate encryption keys') . EOL; + $help .= DI::l10n()->t('Error: the "openssl_pkey_new" function on this system is not able to generate encryption keys') . '
'; $help .= DI::l10n()->t('If running under Windows, please see "http://www.php.net/manual/en/openssl.installation.php".'); $status = false; } @@ -511,10 +511,10 @@ class Installer (!file_exists('config/local.config.php') && !is_writable('.'))) { $status = false; - $help = DI::l10n()->t('The web installer needs to be able to create a file called "local.config.php" in the "config" folder of your web server and it is unable to do so.') . EOL; - $help .= DI::l10n()->t('This is most often a permission setting, as the web server may not be able to write files in your folder - even if you can.') . EOL; - $help .= DI::l10n()->t('At the end of this procedure, we will give you a text to save in a file named local.config.php in your Friendica "config" folder.') . EOL; - $help .= DI::l10n()->t('You can alternatively skip this procedure and perform a manual installation. Please see the file "doc/INSTALL.md" for instructions.') . EOL; + $help = DI::l10n()->t('The web installer needs to be able to create a file called "local.config.php" in the "config" folder of your web server and it is unable to do so.') . '
'; + $help .= DI::l10n()->t('This is most often a permission setting, as the web server may not be able to write files in your folder - even if you can.') . '
'; + $help .= DI::l10n()->t('At the end of this procedure, we will give you a text to save in a file named local.config.php in your Friendica "config" folder.') . '
'; + $help .= DI::l10n()->t('You can alternatively skip this procedure and perform a manual installation. Please see the file "doc/INSTALL.md" for instructions.') . '
'; } $this->addCheck(DI::l10n()->t('config/local.config.php is writable'), $status, false, $help); @@ -537,10 +537,10 @@ class Installer if (!is_writable('view/smarty3')) { $status = false; - $help = DI::l10n()->t('Friendica uses the Smarty3 template engine to render its web views. Smarty3 compiles templates to PHP to speed up rendering.') . EOL; - $help .= DI::l10n()->t('In order to store these compiled templates, the web server needs to have write access to the directory view/smarty3/ under the Friendica top level folder.') . EOL; - $help .= DI::l10n()->t("Please ensure that the user that your web server runs as \x28e.g. www-data\x29 has write access to this folder.") . EOL; - $help .= DI::l10n()->t("Note: as a security measure, you should give the web server write access to view/smarty3/ only--not the template files \x28.tpl\x29 that it contains.") . EOL; + $help = DI::l10n()->t('Friendica uses the Smarty3 template engine to render its web views. Smarty3 compiles templates to PHP to speed up rendering.') . '
'; + $help .= DI::l10n()->t('In order to store these compiled templates, the web server needs to have write access to the directory view/smarty3/ under the Friendica top level folder.') . '
'; + $help .= DI::l10n()->t("Please ensure that the user that your web server runs as \x28e.g. www-data\x29 has write access to this folder.") . '
'; + $help .= DI::l10n()->t("Note: as a security measure, you should give the web server write access to view/smarty3/ only--not the template files \x28.tpl\x29 that it contains.") . '
'; } $this->addCheck(DI::l10n()->t('view/smarty3 is writable'), $status, true, $help); @@ -571,7 +571,7 @@ class Installer if ($fetchResult->getReturnCode() != 204) { $status = false; - $help = DI::l10n()->t('Url rewrite in .htaccess seems not working. Make sure you copied .htaccess-dist to .htaccess.') . EOL; + $help = DI::l10n()->t('Url rewrite in .htaccess seems not working. Make sure you copied .htaccess-dist to .htaccess.') . '
'; $help .= DI::l10n()->t('In some circumstances (like running inside containers), you can skip this error.'); $error_msg = []; $error_msg['head'] = DI::l10n()->t('Error message from Curl when fetching'); diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index d14e791e2..74bd5b423 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -150,7 +150,7 @@ class DBStructure echo DI::l10n()->t("\nError %d occurred during database update:\n%s\n", DBA::errorNo(), DBA::errorMessage()); - return DI::l10n()->t('Errors encountered performing database changes: ') . $message . EOL; + return DI::l10n()->t('Errors encountered performing database changes: ') . $message . '
'; } /** diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 434c2b1f6..ca23c09f6 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -2853,30 +2853,30 @@ class Contact // do we have enough information? if (empty($protocol) || ($protocol == Protocol::PHANTOM) || (empty($ret['url']) && empty($ret['addr']))) { - $result['message'] .= DI::l10n()->t('The profile address specified does not provide adequate information.') . EOL; + $result['message'] .= DI::l10n()->t('The profile address specified does not provide adequate information.') . '
'; if (empty($ret['poll'])) { - $result['message'] .= DI::l10n()->t('No compatible communication protocols or feeds were discovered.') . EOL; + $result['message'] .= DI::l10n()->t('No compatible communication protocols or feeds were discovered.') . '
'; } if (empty($ret['name'])) { - $result['message'] .= DI::l10n()->t('An author or name was not found.') . EOL; + $result['message'] .= DI::l10n()->t('An author or name was not found.') . '
'; } if (empty($ret['url'])) { - $result['message'] .= DI::l10n()->t('No browser URL could be matched to this address.') . EOL; + $result['message'] .= DI::l10n()->t('No browser URL could be matched to this address.') . '
'; } if (strpos($ret['url'], '@') !== false) { - $result['message'] .= DI::l10n()->t('Unable to match @-style Identity Address with a known protocol or email contact.') . EOL; - $result['message'] .= DI::l10n()->t('Use mailto: in front of address to force email check.') . EOL; + $result['message'] .= DI::l10n()->t('Unable to match @-style Identity Address with a known protocol or email contact.') . '
'; + $result['message'] .= DI::l10n()->t('Use mailto: in front of address to force email check.') . '
'; } return $result; } if ($protocol === Protocol::OSTATUS && DI::config()->get('system', 'ostatus_disabled')) { - $result['message'] .= DI::l10n()->t('The profile address specified belongs to a network which has been disabled on this site.') . EOL; + $result['message'] .= DI::l10n()->t('The profile address specified belongs to a network which has been disabled on this site.') . '
'; $ret['notify'] = ''; } if (!$ret['notify']) { - $result['message'] .= DI::l10n()->t('Limited profile. This person will be unable to receive direct/personal notifications from you.') . EOL; + $result['message'] .= DI::l10n()->t('Limited profile. This person will be unable to receive direct/personal notifications from you.') . '
'; } $writeable = ((($protocol === Protocol::OSTATUS) && ($ret['notify'])) ? 1 : 0); @@ -2935,7 +2935,7 @@ class Contact $contact = DBA::selectFirst('contact', [], ['url' => $ret['url'], 'network' => $ret['network'], 'uid' => $uid]); if (!DBA::isResult($contact)) { - $result['message'] .= DI::l10n()->t('Unable to retrieve contact information.') . EOL; + $result['message'] .= DI::l10n()->t('Unable to retrieve contact information.') . '
'; return $result; } diff --git a/src/Model/User.php b/src/Model/User.php index 5bd84466f..005e3bbf3 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -994,7 +994,7 @@ class User try { $authurl = $openid->authUrl(); } catch (Exception $e) { - throw new Exception(DI::l10n()->t('We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID.') . EOL . EOL . DI::l10n()->t('The error message was:') . $e->getMessage(), 0, $e); + throw new Exception(DI::l10n()->t('We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID.') . '
' . DI::l10n()->t('The error message was:') . $e->getMessage(), 0, $e); } System::externalRedirect($authurl); // NOTREACHED diff --git a/src/Module/Install.php b/src/Module/Install.php index 843cee9f1..1631cfe7f 100644 --- a/src/Module/Install.php +++ b/src/Module/Install.php @@ -337,7 +337,7 @@ class Install extends BaseModule if (count($this->installer->getChecks()) == 0) { $txt = '

'; - $txt .= $this->t('Your Friendica site database has been installed.') . EOL; + $txt .= $this->t('Your Friendica site database has been installed.') . '
'; $db_return_text .= $txt; } diff --git a/src/Object/EMail/ItemCCEMail.php b/src/Object/EMail/ItemCCEMail.php index 927a068d7..fd4baa0b9 100644 --- a/src/Object/EMail/ItemCCEMail.php +++ b/src/Object/EMail/ItemCCEMail.php @@ -41,8 +41,8 @@ class ItemCCEMail extends Email $disclaimer = '


' . $l10n->t('This message was sent to you by %s, a member of the Friendica social network.', $user['username']) . '
'; - $disclaimer .= $l10n->t('You may visit them online at %s', $baseUrl . '/profile/' . $a->getLoggedInUserNickname()) . EOL; - $disclaimer .= $l10n->t('Please contact the sender by replying to this post if you do not wish to receive these messages.') . EOL; + $disclaimer .= $l10n->t('You may visit them online at %s', $baseUrl . '/profile/' . $a->getLoggedInUserNickname()) . '
'; + $disclaimer .= $l10n->t('Please contact the sender by replying to this post if you do not wish to receive these messages.') . '
'; if (!$item['title'] == '') { $subject = $item['title']; } else {