From 97d164f69eaf4ec057d5e93e4fbcb73334718259 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 16 Nov 2018 18:54:06 +0100 Subject: [PATCH 01/14] Correct self attribute in ATOM feeds Fix for https://github.com/friendica/friendica/issues/6128#issuecomment-439016471 Special case for DFRN to reduce the risk of unintended side effects --- src/Protocol/OStatus.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php index d656246644..5c9eed96a0 100644 --- a/src/Protocol/OStatus.php +++ b/src/Protocol/OStatus.php @@ -1320,7 +1320,13 @@ class OStatus $attributes = ["href" => System::baseUrl() . "/salmon/" . $owner["nick"], "rel" => "http://salmon-protocol.org/ns/salmon-mention"]; XML::addElement($doc, $root, "link", "", $attributes); - $attributes = ["href" => System::baseUrl() . "/dfrn_poll/" . $owner["nick"], + if (empty($_SERVER['REQUEST_URI']) || strpos($_SERVER['REQUEST_URI'], '/dfrn_poll/') !== false) { + $selfUri = "/dfrn_poll/" . $owner["nick"]; + } else { + $selfUri = $_SERVER['REQUEST_URI']; + } + + $attributes = ["href" => System::baseUrl() . $selfUri, "rel" => "self", "type" => "application/atom+xml"]; XML::addElement($doc, $root, "link", "", $attributes); From d85e26d314239acfc7bb7d775a220d21bac18ad5 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 16 Nov 2018 23:29:26 +0100 Subject: [PATCH 02/14] Refactor header with feed_mode https://github.com/friendica/friendica/pull/6140#issuecomment-439475027 --- src/Protocol/OStatus.php | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php index 5c9eed96a0..0ea6512d1d 100644 --- a/src/Protocol/OStatus.php +++ b/src/Protocol/OStatus.php @@ -1263,10 +1263,11 @@ class OStatus * @param object $doc XML document * @param array $owner Contact data of the poster * @param string $filter The related feed filter (activity, posts or comments) + * @param bool $feed_mode Behave like a regular feed for users if true * * @return object header root element */ - private static function addHeader(DOMDocument $doc, array $owner, $filter) + private static function addHeader(DOMDocument $doc, array $owner, $filter, $feed_mode = false) { $a = get_app(); @@ -1283,10 +1284,19 @@ class OStatus $root->setAttribute("xmlns:mastodon", NAMESPACE_MASTODON); $title = ''; + $selfUri = '/feed/' . $owner["nick"] . '/'; switch ($filter) { - case 'activity': $title = L10n::t('%s\'s timeline', $owner['name']); break; - case 'posts' : $title = L10n::t('%s\'s posts' , $owner['name']); break; - case 'comments': $title = L10n::t('%s\'s comments', $owner['name']); break; + case 'activity': + $title = L10n::t('%s\'s timeline', $owner['name']); + $selfUri .= $filter; + break; + case 'posts': + $title = L10n::t('%s\'s posts', $owner['name']); + break; + case 'comments': + $title = L10n::t('%s\'s comments', $owner['name']); + $selfUri .= $filter; + break; } $attributes = ["uri" => "https://friendi.ca", "version" => FRIENDICA_VERSION . "-" . DB_UPDATE_VERSION]; @@ -1320,14 +1330,10 @@ class OStatus $attributes = ["href" => System::baseUrl() . "/salmon/" . $owner["nick"], "rel" => "http://salmon-protocol.org/ns/salmon-mention"]; XML::addElement($doc, $root, "link", "", $attributes); - if (empty($_SERVER['REQUEST_URI']) || strpos($_SERVER['REQUEST_URI'], '/dfrn_poll/') !== false) { + if (!$feed_mode) { $selfUri = "/dfrn_poll/" . $owner["nick"]; - } else { - $selfUri = $_SERVER['REQUEST_URI']; } - - $attributes = ["href" => System::baseUrl() . $selfUri, - "rel" => "self", "type" => "application/atom+xml"]; + $attributes = ["href" => System::baseUrl() . $selfUri, "rel" => "self", "type" => "application/atom+xml"]; XML::addElement($doc, $root, "link", "", $attributes); if ($owner['account-type'] == Contact::ACCOUNT_TYPE_COMMUNITY) { @@ -2212,7 +2218,7 @@ class OStatus $doc = new DOMDocument('1.0', 'utf-8'); $doc->formatOutput = true; - $root = self::addHeader($doc, $owner, $filter); + $root = self::addHeader($doc, $owner, $filter, $feed_mode); foreach ($items as $item) { if (Config::get('system', 'ostatus_debug')) { From bd19e93c094b85bc2fb40044d972dcb98ce53d7c Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 17 Nov 2018 01:36:54 +0100 Subject: [PATCH 03/14] Minor code relocation https://github.com/friendica/friendica/pull/6144/files#r234385033 --- src/Protocol/OStatus.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php index 0ea6512d1d..a6a5d061c3 100644 --- a/src/Protocol/OStatus.php +++ b/src/Protocol/OStatus.php @@ -1299,6 +1299,10 @@ class OStatus break; } + if (!$feed_mode) { + $selfUri = "/dfrn_poll/" . $owner["nick"]; + } + $attributes = ["uri" => "https://friendi.ca", "version" => FRIENDICA_VERSION . "-" . DB_UPDATE_VERSION]; XML::addElement($doc, $root, "generator", FRIENDICA_PLATFORM, $attributes); XML::addElement($doc, $root, "id", System::baseUrl() . "/profile/" . $owner["nick"]); @@ -1330,9 +1334,6 @@ class OStatus $attributes = ["href" => System::baseUrl() . "/salmon/" . $owner["nick"], "rel" => "http://salmon-protocol.org/ns/salmon-mention"]; XML::addElement($doc, $root, "link", "", $attributes); - if (!$feed_mode) { - $selfUri = "/dfrn_poll/" . $owner["nick"]; - } $attributes = ["href" => System::baseUrl() . $selfUri, "rel" => "self", "type" => "application/atom+xml"]; XML::addElement($doc, $root, "link", "", $attributes); From 5d464c353f2630e2b37a4b4d6afc4565dcd100e6 Mon Sep 17 00:00:00 2001 From: Jonny Tischbein Date: Sun, 18 Nov 2018 12:43:26 +0100 Subject: [PATCH 04/14] Delete comment from its guid and return to parent guid --- include/items.php | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/include/items.php b/include/items.php index 87f0a2d4e0..0fc8fad604 100644 --- a/include/items.php +++ b/include/items.php @@ -352,7 +352,7 @@ function drop_item($id, $return = '') // locate item to be deleted - $fields = ['id', 'uid', 'guid', 'contact-id', 'deleted', 'gravity']; + $fields = ['id', 'uid', 'guid', 'contact-id', 'deleted', 'gravity', parent]; $item = Item::selectFirstForUser(local_user(), $fields, ['id' => $id]); if (!DBA::isResult($item)) { @@ -408,6 +408,11 @@ function drop_item($id, $return = '') } $is_comment = ($item['gravity'] == GRAVITY_COMMENT) ? true : false; + $parentitem = null; + if (!empty($item['parent'])){ + $fields = ['guid']; + $parentitem = Item::selectFirstForUser(local_user(), $fields, ['id' => $item['parent']]); + } // delete the item Item::deleteForUser(['id' => $item['id']], local_user()); @@ -417,14 +422,23 @@ function drop_item($id, $return = '') // removes update_* from return_url to ignore Ajax refresh $return_url = str_replace("update_", "", $return_url); - // if unknown location or top level post called from display - if (empty($return_url) || ((strpos($return_url, 'display') !== false) AND (!$is_comment))) { - $a->internalRedirect('network'); - //NOTREACHED + // Check if delete a comment + if ($is_comment) { + // Return to parent guid + if (!empty($parentitem)) { + $a->internalRedirect('display/' . $parentitem['guid']); + //NOTREACHED + } } else { - $a->internalRedirect($return_url); - //NOTREACHED + // if unknown location or deleting top level post called from display + if (empty($return_url) || strpos($return_url, 'display') !== false) { + $a->internalRedirect('network'); + //NOTREACHED + } else { + $a->internalRedirect($return_url); + //NOTREACHED + } } } else { notice(L10n::t('Permission denied.') . EOL); From a36a780b99a202f6134a9bdf271dbd83e1f5bda9 Mon Sep 17 00:00:00 2001 From: Jonny Tischbein Date: Sun, 18 Nov 2018 12:46:21 +0100 Subject: [PATCH 05/14] Add fallback if comment as no parent --- include/items.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/items.php b/include/items.php index 0fc8fad604..b9e1a0c994 100644 --- a/include/items.php +++ b/include/items.php @@ -429,6 +429,11 @@ function drop_item($id, $return = '') $a->internalRedirect('display/' . $parentitem['guid']); //NOTREACHED } + // In case something goes wrong + else { + $a->internalRedirect('network'); + //NOTREACHED + } } else { // if unknown location or deleting top level post called from display From ad07525a9fc5391d51867c48cfe99771ccf16b36 Mon Sep 17 00:00:00 2001 From: hoergen Date: Sun, 18 Nov 2018 12:50:23 +0100 Subject: [PATCH 06/14] Rearranged and wrote some parts new and more coherent. --- doc/de/Account-Basics.md | 106 ++++++++++++++++++++++----------------- 1 file changed, 59 insertions(+), 47 deletions(-) diff --git a/doc/de/Account-Basics.md b/doc/de/Account-Basics.md index bfeba69ffe..9891ce7aad 100644 --- a/doc/de/Account-Basics.md +++ b/doc/de/Account-Basics.md @@ -4,71 +4,72 @@ Account - Basics * [Zur Startseite der Hilfe](help) -**Registrierung** +## Registrierung -Nicht alle Friendica-Knoten bieten die Möglichkeit zur Registrierung. -Wenn die Registrierung möglich ist, wird ein "Registrieren"-Link unter dem Login-Feld auf der Startseite angezeigt, der zur Registrierungsseite führt. -Die Stärke unseres Netzwerks ist, dass die verschiedenen Knoten komplett kompatibel zueinander sind. -Wenn der Knoten, den Du besuchst, keine Registrierung anbietet, oder wenn Du glaubst, dass Dir eine andere Seite möglicherweise besser gefällt, dann kannst Du hier eine Liste von öffentlichen Servern (Knoten) finden und den Knoten heraus suchen, der am Besten zu Deinen Anforderungen passt. +Viele, aber nicht alle Friendica-Knoten (Server) bieten die Möglichkeit zur Registrierung an. +Falls der Friendica-Knoten, den Du besuchst, keine Registrierung anbietet, oder Du glaubst, dass Dir ein anderer Knoten möglicherweise besser gefällt, dann findest Du hier eine Liste von öffentlichen Friendica-Knoten, aus der Du Dir eine netten Knoten heraussuchen kannst. -Wenn Du Deinen eigenen Server aufsetzen willst, kannst Du das ebenfalls machen. -Besuche die Friendica-Webseite, um den Code mit den Installationsanleitungen herunterzuladen. -Es ist ein einfacher Installationsprozess, den jeder mit ein wenig Erfahrungen im Webseiten-Hosting oder mit grundlegenden Linux-Erfahrungen einfach handhaben kann. +Auf der Startseite des Knotens wird unter dem Login-Feld ein "Registrieren"-Link angezeigt. Dieser Link führt dann direkt auf das Registrierungsformular. +### OpenID -*OpenID* +Falls du keine OpenID-Adresse hast, kannst du diesen Punkt ignorieren. -Das erste Feld auf der Registrierungsseite ist für eine OpenID-Adresse. -Wenn Du keine OpenID-Adresse hast oder nicht wünschst, diese zu nutzen, dann lasse das Feld frei. -Wenn Du einen OpenID-Account hast und diesen nutzen willst, gib die Adresse in das Feld ein und klicke auf "Registrieren". +Solltest du eine OpenID Adresse haben, kannst Du sie im ersten Feld eintragen und "Registrieren" klicken. Friendica wird versuchen, so viele Informationen wie möglich von Deinem OpenID-Provider zu übernehmen, um diese in Dein Profil auf dieser Seite einzutragen. -*Dein vollständiger Name* +### Dein vollständiger Name -Bitte trage Deinen vollständigen Namen **so ein, wie Du ihn im System anzeigen lassen willst**. -Viele Leute nutzen ihren richtigen Namen hierfür, allerdings besteht für dich keine Pflicht, das auch so zu machen. +Bitte trage bei "vollständiger Name" Deinen **gewünschten Namen** ein, wie er über deinen Beiträgen angezeigt werden soll. +Du kannst deinen echten Namen eintragen, kannst Dir aber auch einen Namen ausdenken. Einen Zwang zu dem sogenannten Klarnamen gibt es nicht. -*Email-Adresse* + +### Email-Adresse Bitte trage eine richtige Email-Adresse ein. -Deine Email-Adresse wird **niemals** veröffentlicht. -Wir benötigen diese, um Dir Account-Informationen und die Login-Daten zu schicken. -Du erhältst zudem von Zeit zu Zeit Benachrichtigungen über eingegangene Nachrichten oder Punkte, die Deine Aufmerksamkeit benötigen. -Du hast aber auch die Möglichkeit, diese Nachrichten in Deinen Account-Einstellungen komplett abzuschalten. - -Du musst nicht Deine Haupt-Email-Adresse sein, jedoch wird eine funktionierende Adresse benötigt. -Ohne dieses kannst Du weder Dein Initialpasswort erhalten, noch Dein Passwort zurücksetzen. Dies ist die einzige persönliche Information, die korrekt sein muss. - +Deine Email-Adresse wird **niemals** veröffentlicht. -*Spitzname/Nickname* +Wir benötigen diese, um Dir Account-Informationen, das Initialpasswort und die Login-Daten zu schicken. Oder z.B. Dein Passwort zurückzusetzen. -Der Spitzname wird benötigt, um eine Webadresse für viele Deiner persönlichen Seiten zu erstellen. +Du erhältst zudem von Zeit zu Zeit Benachrichtigungen über eingegangene Nachrichten oder Punkte, die Deine Aufmerksamkeit benötigen. +Diese Nachrichten sind in den Einstellungen jederzeit an- oder abschaltbar. + +### Spitzname/Nickname + +Der Spitzname wird benötigt, um eine Webadresse (Profiladresse) für viele Deiner persönlichen Seiten zu erstellen. Auch wird dieser wie eine Email-Adresse genutzt, wenn eine Verbindung zu anderen Personen hergestellt werden soll. -Durch die Art, wie der Spitzname genutzt wird, gibt es bestimmte Einschränkungen. Er darf nur US-ASCII-Textzeichen und Nummern enthalten und er muss zudem mit einem Buchstaben beginnen. -Er muss außerdem einzigartig im System sein. -Dieser Spitzname wird an vielen Stellen genutzt, um Deinen Account zu identifizieren, und kann daher später nicht mehr geändert werden. +Durch die Art, wie der Spitzname genutzt wird, gibt es bestimmte **Einschränkungen**: + +* **er muss mit einem Buchstaben beginnen** +* **er darf nur US-ASCII-Textzeichen und Nummern enthalten** +* **er muss einzigartig auf diesem Friendica-Knoten sein** +* **er kann später nicht mehr geändert werden** + +Dieser Spitzname wird an vielen Stellen genutzt, um Deinen Account zu identifizieren, daher ist es nicht möglich ihn später zu ändern. -*Verzeichnis-Eintrag* +### Verzeichnis-Eintrag + +Das Registrierungsformular erlaubt es dir, direkt auszuwählen, ob Du im Onlineverzeichnis (Friendica Directory) aufgelistet wirst oder nicht. +Das ist wie ein Telefonbuch und Du entscheidest, ob du darin eingetragen werden möchtest, oder nicht. + +* Wir bitten dich, "Ja" zu wählen, damit Andere Dich finden können, so wie Du sie finden kannst +* Wählst Du "Nein", bist Du für Andere *nicht einfach auffindbar* -Das Registrierungsformular erlaubt es dir, direkt auszuwählen, ob Du im Onlineverzeichnis aufgelistet wirst oder nicht. -Das ist wie ein Telefonbuch und Du kannst entscheiden, nicht aufgeführt zu werden. -Wir bitten dich, "Ja" zu wählen, so dass dich andere Leute (Freunde, Familie etc.) finden können. -Wenn Du "Nein" wählst, wirst Du hauptsächlich unsichtbar sein und nur wenige Möglichkeiten zur Interaktion haben. Was auch immer Du wählst, kann jederzeit nach dem Login in Deinen Account-Einstellungen geändert werden. -*Registrierung* +### Registrierung Sobald Du die nötigen Informationen eingegeben hast, klicke auf "Registrieren". Eine Email mit den Registrierungsdetails und Deinem Initialpasswort wird an die hinterlegte Email-Adresse geschickt. Bitte prüfe den Posteingang (inkl. dem Spam-Ordner). -**Login-Seite** +## Login-Seite Gib auf der "Login"-Seite die Informationen ein, die Du mit der oben genannten Email erhalten hast. Du kannst entweder Deinen Spitznamen oder die Email-Adresse als Login-Namen nutzen. @@ -83,25 +84,29 @@ Das Passwort muss genau so geschrieben werden, wie es in der Email steht; Groß- Falls Du Schwierigkeiten beim Login hast, prüfe bitte, ob z. B. Deine Feststelltaste aktiv ist. -**Passwort ändern** +### Passwort ändern Besuche nach Deinem ersten Login bitte die Einstellungsseite und wechsle das Passwort in eines, dass Du Dir merken kannst. -**Der Anfang** +## Die ersten Schritte + +### Persönliche Daten exportieren + +Du solltest dir als erstes Deinen neu erstellen [Account exportieren](uexport) unter Einstellungen/Persönliche Daten exportieren und an einem sicheren Ort verwahren. +In diesem Export (JSON-Datei) sind enthalten + +* Deine Identität, die mit kryptographischen Schlüsseln ausgestattet ist +* Deine Kontakte + +Dies ist z.B. dann nützlich wenn du mit deinem Account auf einen anderen Friendica Knoten umziehen willst, oder musst. + +### Hilfe für Neulinge Ein ['Tipp für neue Mitglieder'](newmember)-Link zeigt sich in den ersten beiden Wochen auf Deiner Startseite, um Dir erste Informationen zum Start zu bieten. -**Persönliche Daten exportieren** - -Du kannst eine Kopie Deiner persönlichen Daten in einer JSON-Datei exportieren. -Gehe hierzu in Deinen Einstellungen auf "Persönliche Daten exportieren". - -Dies ist z.B. dann nützlich wenn du mit deinem Account auf einen anderen Friendica Knoten umziehen möchstest. -Ein Grund hierfür könnte sein, dass der Server auf dem dieser Friendica Knoten läuft dauerhaft wegen eines Hardware Problems ausfällt. - -**Schau Dir ebenfalls folgende Seiten an** +## Schau Dir ebenfalls folgende Seiten an * [Profile](help/Profiles) @@ -109,3 +114,10 @@ Ein Grund hierfür könnte sein, dass der Server auf dem dieser Friendica Knoten * [Account löschen](help/Remove-Account) +### Der eigene Friendica-Knoten +Wenn Du Deinen eigenen Friendica-Knoten auf einem Server aufsetzen willst, kannst Du das ebenfalls machen. +Besuche die Friendica-Webseite, um den Code mit den Installationsanleitungen herunterzuladen. +Es ist ein einfacher Installationsprozess, den jeder mit ein wenig technischen Erfahrungen im Webseiten-Hosting oder mit grundlegenden Linux-Erfahrungen handhaben kann. + + + From a3fd0e4f7a8079a8ff70921e78b0ecf653ba3390 Mon Sep 17 00:00:00 2001 From: hoergen Date: Sun, 18 Nov 2018 13:13:07 +0100 Subject: [PATCH 07/14] [Doc]removed bold from keyword --- doc/de/Account-Basics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/de/Account-Basics.md b/doc/de/Account-Basics.md index 9891ce7aad..c6b7bd49b3 100644 --- a/doc/de/Account-Basics.md +++ b/doc/de/Account-Basics.md @@ -41,7 +41,7 @@ Diese Nachrichten sind in den Einstellungen jederzeit an- oder abschaltbar. Der Spitzname wird benötigt, um eine Webadresse (Profiladresse) für viele Deiner persönlichen Seiten zu erstellen. Auch wird dieser wie eine Email-Adresse genutzt, wenn eine Verbindung zu anderen Personen hergestellt werden soll. -Durch die Art, wie der Spitzname genutzt wird, gibt es bestimmte **Einschränkungen**: +Durch die Art, wie der Spitzname genutzt wird, gibt es bestimmte Einschränkungen: * **er muss mit einem Buchstaben beginnen** * **er darf nur US-ASCII-Textzeichen und Nummern enthalten** From 0ad71ebbbc7d3ed4b0cb1973c07f7175d5f81bee Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 18 Nov 2018 12:44:01 +0000 Subject: [PATCH 08/14] Networks are now protocols --- src/Content/ContactSelector.php | 2 +- src/Content/Feature.php | 2 +- src/Content/Widget.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Content/ContactSelector.php b/src/Content/ContactSelector.php index a23acecc55..5ba6528ed0 100644 --- a/src/Content/ContactSelector.php +++ b/src/Content/ContactSelector.php @@ -78,7 +78,7 @@ class ContactSelector public static function networkToName($network, $profile = "") { $nets = [ - Protocol::DFRN => L10n::t('Friendica'), + Protocol::DFRN => L10n::t('DFRN'), Protocol::OSTATUS => L10n::t('OStatus'), Protocol::FEED => L10n::t('RSS/Atom'), Protocol::MAIL => L10n::t('Email'), diff --git a/src/Content/Feature.php b/src/Content/Feature.php index fe961db7d3..f6d6480345 100644 --- a/src/Content/Feature.php +++ b/src/Content/Feature.php @@ -96,7 +96,7 @@ class Feature ['archives', L10n::t('Archives'), L10n::t('Ability to select posts by date ranges'), false, Config::get('feature_lock', 'archives', false)], ['forumlist_widget', L10n::t('List Forums'), L10n::t('Enable widget to display the forums your are connected with'), true, Config::get('feature_lock', 'forumlist_widget', false)], ['groups', L10n::t('Group Filter'), L10n::t('Enable widget to display Network posts only from selected group'), false, Config::get('feature_lock', 'groups', false)], - ['networks', L10n::t('Network Filter'), L10n::t('Enable widget to display Network posts only from selected network'), false, Config::get('feature_lock', 'networks', false)], + ['networks', L10n::t('Protocol Filter'), L10n::t('Enable widget to display Network posts only from selected protocols'), false, Config::get('feature_lock', 'networks', false)], ['savedsearch', L10n::t('Saved Searches'), L10n::t('Save search terms for re-use'), false, Config::get('feature_lock', 'savedsearch', false)], ], diff --git a/src/Content/Widget.php b/src/Content/Widget.php index 0ea539dec0..ab9bb88828 100644 --- a/src/Content/Widget.php +++ b/src/Content/Widget.php @@ -155,10 +155,10 @@ class Widget } return Renderer::replaceMacros(Renderer::getMarkupTemplate('nets.tpl'), array( - '$title' => L10n::t('Networks'), + '$title' => L10n::t('Protocols'), '$desc' => '', '$sel_all' => (($selected == '') ? 'selected' : ''), - '$all' => L10n::t('All Networks'), + '$all' => L10n::t('All Protocols'), '$nets' => $nets, '$base' => $baseurl, )); From 6153fd552ba48d3aa11a6044dd5e0dfcda956cc9 Mon Sep 17 00:00:00 2001 From: hoergen Date: Sun, 18 Nov 2018 14:05:46 +0100 Subject: [PATCH 09/14] added linebreak and markdown url --- doc/de/Account-Basics.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/de/Account-Basics.md b/doc/de/Account-Basics.md index c6b7bd49b3..193835f5a9 100644 --- a/doc/de/Account-Basics.md +++ b/doc/de/Account-Basics.md @@ -7,13 +7,14 @@ Account - Basics ## Registrierung Viele, aber nicht alle Friendica-Knoten (Server) bieten die Möglichkeit zur Registrierung an. -Falls der Friendica-Knoten, den Du besuchst, keine Registrierung anbietet, oder Du glaubst, dass Dir ein anderer Knoten möglicherweise besser gefällt, dann findest Du hier eine Liste von öffentlichen Friendica-Knoten, aus der Du Dir eine netten Knoten heraussuchen kannst. +Falls der Friendica-Knoten, den Du besuchst, keine Registrierung anbietet, oder Du glaubst, dass Dir ein anderer Knoten möglicherweise besser gefällt, dann findest Du hier eine [Liste von öffentlichen Friendica-Knoten](https://dir.friendica.social/servers), aus der Du Dir eine netten Knoten heraussuchen kannst. -Auf der Startseite des Knotens wird unter dem Login-Feld ein "Registrieren"-Link angezeigt. Dieser Link führt dann direkt auf das Registrierungsformular. +Auf der Startseite des Knotens wird unter dem Login-Feld ein "Registrieren"-Link angezeigt. +Dieser Link führt dann direkt auf das Registrierungsformular. ### OpenID -Falls du keine OpenID-Adresse hast, kannst du diesen Punkt ignorieren. +Falls du keine [OpenID-Adresse](https://de.wikipedia.org/wiki/OpenID">OpenID-Adresse) hast, kannst du diesen Punkt ignorieren. Solltest du eine OpenID Adresse haben, kannst Du sie im ersten Feld eintragen und "Registrieren" klicken. Friendica wird versuchen, so viele Informationen wie möglich von Deinem OpenID-Provider zu übernehmen, um diese in Dein Profil auf dieser Seite einzutragen. @@ -53,7 +54,7 @@ Dieser Spitzname wird an vielen Stellen genutzt, um Deinen Account zu identifizi ### Verzeichnis-Eintrag -Das Registrierungsformular erlaubt es dir, direkt auszuwählen, ob Du im Onlineverzeichnis (Friendica Directory) aufgelistet wirst oder nicht. +Das Registrierungsformular erlaubt es dir, direkt auszuwählen, ob Du im [Onlineverzeichnis](https://dir.friendica.social/) (Friendica Directory) aufgelistet wirst oder nicht. Das ist wie ein Telefonbuch und Du entscheidest, ob du darin eingetragen werden möchtest, oder nicht. * Wir bitten dich, "Ja" zu wählen, damit Andere Dich finden können, so wie Du sie finden kannst @@ -116,7 +117,7 @@ Ein ['Tipp für neue Mitglieder'](newmember)-Link zeigt sich in den ersten beide ### Der eigene Friendica-Knoten Wenn Du Deinen eigenen Friendica-Knoten auf einem Server aufsetzen willst, kannst Du das ebenfalls machen. -Besuche die Friendica-Webseite, um den Code mit den Installationsanleitungen herunterzuladen. +Besuche die [Friendica-Webseite](https://friendi.ca), um den Code mit den Installationsanleitungen herunterzuladen. Es ist ein einfacher Installationsprozess, den jeder mit ein wenig technischen Erfahrungen im Webseiten-Hosting oder mit grundlegenden Linux-Erfahrungen handhaben kann. From 43079bfaf83b6751f161d8467a433f73ecaa62bf Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 18 Nov 2018 20:13:46 +0000 Subject: [PATCH 10/14] Several default features are now in the core --- include/conversation.php | 4 +-- mod/network.php | 47 +++++++++++++++--------------------- mod/photos.php | 6 ++--- mod/ping.php | 26 +++++++++----------- mod/search.php | 3 --- src/Content/Feature.php | 12 --------- src/Content/ForumManager.php | 4 --- src/Content/Text/HTML.php | 2 +- src/Content/Widget.php | 4 --- src/Object/Post.php | 28 ++++++++++----------- 10 files changed, 48 insertions(+), 88 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index ee286ca983..1b7b34e71a 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -769,7 +769,7 @@ function conversation(App $a, array $items, Pager $pager, $mode, $update, $previ '$mode' => $mode, '$user' => $a->user, '$threads' => $threads, - '$dropping' => ($page_dropping && Feature::isEnabled(local_user(), 'multi_delete') ? L10n::t('Delete Selected Items') : False), + '$dropping' => ($page_dropping ? L10n::t('Delete Selected Items') : False), ]); return $o; @@ -1163,7 +1163,7 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false) '$lockstate' => $x['lockstate'], '$bang' => $x['bang'], '$profile_uid' => $x['profile_uid'], - '$preview' => Feature::isEnabled($x['profile_uid'], 'preview') ? L10n::t('Preview') : '', + '$preview' => L10n::t('Preview'), '$jotplugins' => $jotplugins, '$notes_cid' => $notes_cid, '$sourceapp' => L10n::t($a->sourcename), diff --git a/mod/network.php b/mod/network.php index ba02ee5cc3..58f9484250 100644 --- a/mod/network.php +++ b/mod/network.php @@ -160,9 +160,8 @@ function network_init(App $a) $a->page['aside'] = ''; } - $a->page['aside'] .= (Feature::isEnabled(local_user(), 'groups') ? - Group::sidebarWidget('network/0', 'network', 'standard', $group_id) : ''); - $a->page['aside'] .= (Feature::isEnabled(local_user(), 'forumlist_widget') ? ForumManager::widget(local_user(), $cid) : ''); + $a->page['aside'] .= Group::sidebarWidget('network/0', 'network', 'standard', $group_id); + $a->page['aside'] .= ForumManager::widget(local_user(), $cid); $a->page['aside'] .= posted_date_widget('network', local_user(), false); $a->page['aside'] .= Widget::networks('network', (x($_GET, 'nets') ? $_GET['nets'] : '')); $a->page['aside'] .= saved_searches($search); @@ -171,10 +170,6 @@ function network_init(App $a) function saved_searches($search) { - if (!Feature::isEnabled(local_user(), 'savedsearch')) { - return ''; - } - $a = get_app(); $srchurl = '/network?f=' @@ -993,16 +988,14 @@ function network_tabs(App $a) ], ]; - if (Feature::isEnabled(local_user(), 'personal_tab')) { - $tabs[] = [ - 'label' => L10n::t('Personal'), - 'url' => str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '/?f=') . '&conv=1', - 'sel' => $conv_active, - 'title' => L10n::t('Posts that mention or involve you'), - 'id' => 'personal-tab', - 'accesskey' => 'r', - ]; - } + $tabs[] = [ + 'label' => L10n::t('Personal'), + 'url' => str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '/?f=') . '&conv=1', + 'sel' => $conv_active, + 'title' => L10n::t('Posts that mention or involve you'), + 'id' => 'personal-tab', + 'accesskey' => 'r', + ]; if (Feature::isEnabled(local_user(), 'new_tab')) { $tabs[] = [ @@ -1026,16 +1019,14 @@ function network_tabs(App $a) ]; } - if (Feature::isEnabled(local_user(), 'star_posts')) { - $tabs[] = [ - 'label' => L10n::t('Starred'), - 'url' => str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '/?f=') . '&star=1', - 'sel' => $starred_active, - 'title' => L10n::t('Favourite Posts'), - 'id' => 'starred-posts-tab', - 'accesskey' => 'm', - ]; - } + $tabs[] = [ + 'label' => L10n::t('Starred'), + 'url' => str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '/?f=') . '&star=1', + 'sel' => $starred_active, + 'title' => L10n::t('Favourite Posts'), + 'id' => 'starred-posts-tab', + 'accesskey' => 'm', + ]; // save selected tab, but only if not in file mode if (!x($_GET, 'file')) { @@ -1079,4 +1070,4 @@ function network_infinite_scroll_head(App $a, &$htmlhead) '$reload_uri' => $pager->getBaseQueryString() ]); } -} \ No newline at end of file +} diff --git a/mod/photos.php b/mod/photos.php index f07815c258..65a48c4c3f 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1480,7 +1480,7 @@ function photos_content(App $a) $likebuttons = Renderer::replaceMacros($like_tpl, [ '$id' => $link_item['id'], '$likethis' => L10n::t("I like this \x28toggle\x29"), - '$nolike' => (Feature::isEnabled(local_user(), 'dislike') ? L10n::t("I don't like this \x28toggle\x29") : ''), + '$nolike' => L10n::t("I don't like this \x28toggle\x29"), '$wait' => L10n::t('Please wait'), '$return_path' => $a->query_string, ]); @@ -1607,9 +1607,7 @@ function photos_content(App $a) } } $response_verbs = ['like']; - if (Feature::isEnabled($owner_uid, 'dislike')) { - $response_verbs[] = 'dislike'; - } + $response_verbs[] = 'dislike'; $responses = get_responses($conv_responses, $response_verbs, '', $link_item); $paginate = $pager->renderFull($total); diff --git a/mod/ping.php b/mod/ping.php index 6f5b5b4a98..edc1a11213 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -150,25 +150,21 @@ function ping_init(App $a) } if ($network_count) { - if (intval(Feature::isEnabled(local_user(), 'groups'))) { - // Find out how unseen network posts are spread across groups - $group_counts = Group::countUnseen(); - if (DBA::isResult($group_counts)) { - foreach ($group_counts as $group_count) { - if ($group_count['count'] > 0) { - $groups_unseen[] = $group_count; - } + // Find out how unseen network posts are spread across groups + $group_counts = Group::countUnseen(); + if (DBA::isResult($group_counts)) { + foreach ($group_counts as $group_count) { + if ($group_count['count'] > 0) { + $groups_unseen[] = $group_count; } } } - if (intval(Feature::isEnabled(local_user(), 'forumlist_widget'))) { - $forum_counts = ForumManager::countUnseenItems(); - if (DBA::isResult($forum_counts)) { - foreach ($forum_counts as $forum_count) { - if ($forum_count['count'] > 0) { - $forums_unseen[] = $forum_count; - } + $forum_counts = ForumManager::countUnseenItems(); + if (DBA::isResult($forum_counts)) { + foreach ($forum_counts as $forum_count) { + if ($forum_count['count'] > 0) { + $forums_unseen[] = $forum_count; } } } diff --git a/mod/search.php b/mod/search.php index f552ad43c7..1ada76a9e6 100644 --- a/mod/search.php +++ b/mod/search.php @@ -26,9 +26,6 @@ function search_saved_searches() { $o = ''; $search = ((x($_GET,'search')) ? Strings::escapeTags(trim(rawurldecode($_GET['search']))) : ''); - if (!Feature::isEnabled(local_user(),'savedsearch')) - return $o; - $r = q("SELECT `id`,`term` FROM `search` WHERE `uid` = %d", intval(local_user()) ); diff --git a/src/Content/Feature.php b/src/Content/Feature.php index f6d6480345..446ea2705c 100644 --- a/src/Content/Feature.php +++ b/src/Content/Feature.php @@ -86,7 +86,6 @@ class Feature // Post composition 'composition' => [ L10n::t('Post Composition Features'), - ['preview', L10n::t('Post Preview'), L10n::t('Allow previewing posts and comments before publishing them'), false, Config::get('feature_lock', 'preview', false)], ['aclautomention', L10n::t('Auto-mention Forums'), L10n::t('Add/remove mention when a forum page is selected/deselected in ACL window.'), false, Config::get('feature_lock', 'aclautomention', false)], ], @@ -94,16 +93,12 @@ class Feature 'widgets' => [ L10n::t('Network Sidebar'), ['archives', L10n::t('Archives'), L10n::t('Ability to select posts by date ranges'), false, Config::get('feature_lock', 'archives', false)], - ['forumlist_widget', L10n::t('List Forums'), L10n::t('Enable widget to display the forums your are connected with'), true, Config::get('feature_lock', 'forumlist_widget', false)], - ['groups', L10n::t('Group Filter'), L10n::t('Enable widget to display Network posts only from selected group'), false, Config::get('feature_lock', 'groups', false)], ['networks', L10n::t('Protocol Filter'), L10n::t('Enable widget to display Network posts only from selected protocols'), false, Config::get('feature_lock', 'networks', false)], - ['savedsearch', L10n::t('Saved Searches'), L10n::t('Save search terms for re-use'), false, Config::get('feature_lock', 'savedsearch', false)], ], // Network tabs 'net_tabs' => [ L10n::t('Network Tabs'), - ['personal_tab', L10n::t('Network Personal Tab'), L10n::t('Enable tab to display only Network posts that you\'ve interacted on'), false, Config::get('feature_lock', 'personal_tab', false)], ['new_tab', L10n::t('Network New Tab'), L10n::t("Enable tab to display only new Network posts \x28from the last 12 hours\x29"), false, Config::get('feature_lock', 'new_tab', false)], ['link_tab', L10n::t('Network Shared Links Tab'), L10n::t('Enable tab to display only Network posts with links in them'), false, Config::get('feature_lock', 'link_tab', false)], ], @@ -111,14 +106,7 @@ class Feature // Item tools 'tools' => [ L10n::t('Post/Comment Tools'), - ['multi_delete', L10n::t('Multiple Deletion'), L10n::t('Select and delete multiple posts/comments at once'), false, Config::get('feature_lock', 'multi_delete', false)], - ['edit_posts', L10n::t('Edit Sent Posts'), L10n::t('Edit and correct posts and comments after sending'), false, Config::get('feature_lock', 'edit_posts', false)], - ['commtag', L10n::t('Tagging'), L10n::t('Ability to tag existing posts'), false, Config::get('feature_lock', 'commtag', false)], ['categories', L10n::t('Post Categories'), L10n::t('Add categories to your posts'), false, Config::get('feature_lock', 'categories', false)], - ['filing', L10n::t('Saved Folders'), L10n::t('Ability to file posts under folders'), false, Config::get('feature_lock', 'filing', false)], - ['dislike', L10n::t('Dislike Posts'), L10n::t('Ability to dislike posts/comments'), false, Config::get('feature_lock', 'dislike', false)], - ['star_posts', L10n::t('Star Posts'), L10n::t('Ability to mark special posts with a star indicator'), false, Config::get('feature_lock', 'star_posts', false)], - ['ignore_posts', L10n::t('Mute Post Notifications'), L10n::t('Ability to mute notifications for a thread'), false, Config::get('feature_lock', 'ignore_posts', false)], ], // Advanced Profile Settings diff --git a/src/Content/ForumManager.php b/src/Content/ForumManager.php index 97917cfd2a..7b947359a6 100644 --- a/src/Content/ForumManager.php +++ b/src/Content/ForumManager.php @@ -93,10 +93,6 @@ class ForumManager */ public static function widget($uid, $cid = 0) { - if (! intval(Feature::isEnabled(local_user(), 'forumlist_widget'))) { - return; - } - $o = ''; //sort by last updated item diff --git a/src/Content/Text/HTML.php b/src/Content/Text/HTML.php index 9b73da56df..544811536b 100644 --- a/src/Content/Text/HTML.php +++ b/src/Content/Text/HTML.php @@ -966,7 +966,7 @@ class HTML '$action_url' => $url, '$search_label' => L10n::t('Search'), '$save_label' => $save_label, - '$savedsearch' => local_user() && Feature::isEnabled(local_user(), 'savedsearch'), + '$savedsearch' => 'savedsearch', '$search_hint' => L10n::t('@name, !forum, #tags, content'), '$mode' => $mode ]; diff --git a/src/Content/Widget.php b/src/Content/Widget.php index ab9bb88828..d4d4ff5494 100644 --- a/src/Content/Widget.php +++ b/src/Content/Widget.php @@ -176,10 +176,6 @@ class Widget return ''; } - if (!Feature::isEnabled(local_user(), 'filing')) { - return ''; - } - $saved = PConfig::get(local_user(), 'system', 'filetags'); if (!strlen($saved)) { return; diff --git a/src/Object/Post.php b/src/Object/Post.php index 58b11a723c..8b17a3b85e 100644 --- a/src/Object/Post.php +++ b/src/Object/Post.php @@ -157,6 +157,8 @@ class Post extends BaseObject $shareable = in_array($conv->getProfileOwner(), [0, local_user()]) && $item['private'] != 1; + $edpost = false; + if (local_user()) { if (Strings::compareLink($a->contact['url'], $item['author-link'])) { if ($item["event-id"] != 0) { @@ -166,8 +168,6 @@ class Post extends BaseObject } } $dropping = in_array($item['uid'], [0, local_user()]); - } else { - $edpost = false; } // Editing on items of not subscribed users isn't currently possible @@ -202,7 +202,7 @@ class Post extends BaseObject $drop = [ 'dropping' => $dropping, - 'pagedrop' => ((Feature::isEnabled($conv->getProfileOwner(), 'multi_delete')) ? $item['pagedrop'] : ''), + 'pagedrop' => $item['pagedrop'], 'select' => L10n::t('Select'), 'delete' => $delete, ]; @@ -294,12 +294,10 @@ class Post extends BaseObject 'starred' => L10n::t('starred'), ]; - if (Feature::isEnabled($conv->getProfileOwner(), 'commtag')) { - $tagger = [ - 'add' => L10n::t("add tag"), - 'class' => "", - ]; - } + $tagger = [ + 'add' => L10n::t("add tag"), + 'class' => "", + ]; } } else { $indent = 'comment'; @@ -308,7 +306,7 @@ class Post extends BaseObject if ($conv->isWritable()) { $buttons = [ 'like' => [L10n::t("I like this \x28toggle\x29"), L10n::t("like")], - 'dislike' => Feature::isEnabled($conv->getProfileOwner(), 'dislike') ? [L10n::t("I don't like this \x28toggle\x29"), L10n::t("dislike")] : '', + 'dislike' => [L10n::t("I don't like this \x28toggle\x29"), L10n::t("dislike")], ]; if ($shareable) { $buttons['share'] = [L10n::t('Share this'), L10n::t('share')]; @@ -401,12 +399,12 @@ class Post extends BaseObject 'owner_photo' => $a->removeBaseURL(ProxyUtils::proxifyUrl($item['owner-avatar'], false, ProxyUtils::SIZE_THUMB)), 'owner_name' => htmlentities($owner_name_e), 'plink' => Item::getPlink($item), - 'edpost' => Feature::isEnabled($conv->getProfileOwner(), 'edit_posts') ? $edpost : '', + 'edpost' => $edpost, 'isstarred' => $isstarred, - 'star' => Feature::isEnabled($conv->getProfileOwner(), 'star_posts') ? $star : '', - 'ignore' => Feature::isEnabled($conv->getProfileOwner(), 'ignore_posts') ? $ignore : '', + 'star' => $star, + 'ignore' => $ignore, 'tagger' => $tagger, - 'filer' => Feature::isEnabled($conv->getProfileOwner(), 'filing') ? $filer : '', + 'filer' => $filer, 'drop' => $drop, 'vote' => $buttons, 'like' => $responses['like']['output'], @@ -820,7 +818,7 @@ class Post extends BaseObject '$edurl' => L10n::t('Link'), '$edattach' => L10n::t('Link or Media'), '$prompttext' => L10n::t('Please enter a image/video/audio/webpage URL:'), - '$preview' => ((Feature::isEnabled($conv->getProfileOwner(), 'preview')) ? L10n::t('Preview') : ''), + '$preview' => L10n::t('Preview'), '$indent' => $indent, '$sourceapp' => L10n::t($a->sourcename), '$ww' => $conv->getMode() === 'network' ? $ww : '', From 68936e8fc03a6779a163744686b968a391eb5c2a Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 18 Nov 2018 20:40:10 +0000 Subject: [PATCH 11/14] Possibly fix test --- tests/include/ApiTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/include/ApiTest.php b/tests/include/ApiTest.php index a539eb9447..28c87da199 100644 --- a/tests/include/ApiTest.php +++ b/tests/include/ApiTest.php @@ -94,7 +94,7 @@ class ApiTest extends DatabaseTest $this->assertEquals($this->selfUser['id'], $user['uid']); $this->assertEquals($this->selfUser['id'], $user['cid']); $this->assertEquals(1, $user['self']); - $this->assertEquals('Friendica', $user['location']); + $this->assertEquals('DFRN', $user['location']); $this->assertEquals($this->selfUser['name'], $user['name']); $this->assertEquals($this->selfUser['nick'], $user['screen_name']); $this->assertEquals('dfrn', $user['network']); From 503c78e3efebedd934b63fa98464b66815aff654 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 18 Nov 2018 20:59:40 +0000 Subject: [PATCH 12/14] Another try to make tests run again --- tests/include/ApiTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/include/ApiTest.php b/tests/include/ApiTest.php index 28c87da199..91b41e01a2 100644 --- a/tests/include/ApiTest.php +++ b/tests/include/ApiTest.php @@ -1289,7 +1289,7 @@ class ApiTest extends DatabaseTest $result = api_users_show('json'); // We can't use assertSelfUser() here because the user object is missing some properties. $this->assertEquals($this->selfUser['id'], $result['user']['cid']); - $this->assertEquals('Friendica', $result['user']['location']); + $this->assertEquals('DFRN', $result['user']['location']); $this->assertEquals($this->selfUser['name'], $result['user']['name']); $this->assertEquals($this->selfUser['nick'], $result['user']['screen_name']); $this->assertEquals('dfrn', $result['user']['network']); @@ -3296,7 +3296,7 @@ class ApiTest extends DatabaseTest $result = api_account_update_profile('json'); // We can't use assertSelfUser() here because the user object is missing some properties. $this->assertEquals($this->selfUser['id'], $result['user']['cid']); - $this->assertEquals('Friendica', $result['user']['location']); + $this->assertEquals('DFRN', $result['user']['location']); $this->assertEquals($this->selfUser['nick'], $result['user']['screen_name']); $this->assertEquals('dfrn', $result['user']['network']); $this->assertEquals('new_name', $result['user']['name']); @@ -3650,7 +3650,7 @@ class ApiTest extends DatabaseTest $result = api_friendica_profile_show('json'); // We can't use assertSelfUser() here because the user object is missing some properties. $this->assertEquals($this->selfUser['id'], $result['$result']['friendica_owner']['cid']); - $this->assertEquals('Friendica', $result['$result']['friendica_owner']['location']); + $this->assertEquals('DFRN', $result['$result']['friendica_owner']['location']); $this->assertEquals($this->selfUser['name'], $result['$result']['friendica_owner']['name']); $this->assertEquals($this->selfUser['nick'], $result['$result']['friendica_owner']['screen_name']); $this->assertEquals('dfrn', $result['$result']['friendica_owner']['network']); From 191c1a400a02877886f985dc9196e67c5f89800a Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 19 Nov 2018 06:58:46 +0000 Subject: [PATCH 13/14] The expiry of conversations can now be configured in the admin panel --- mod/admin.php | 3 +++ view/templates/admin/site.tpl | 1 + 2 files changed, 4 insertions(+) diff --git a/mod/admin.php b/mod/admin.php index 91b21ace55..7af47110a6 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -1139,6 +1139,7 @@ function admin_page_site_post(App $a) $dbclean = ((x($_POST,'dbclean')) ? True : False); $dbclean_expire_days = ((x($_POST,'dbclean_expire_days')) ? intval($_POST['dbclean_expire_days']) : 0); $dbclean_unclaimed = ((x($_POST,'dbclean_unclaimed')) ? intval($_POST['dbclean_unclaimed']) : 0); + $dbclean_expire_conv = ((x($_POST,'dbclean_expire_conv')) ? intval($_POST['dbclean_expire_conv']) : 0); $suppress_tags = ((x($_POST,'suppress_tags')) ? True : False); $itemcache = ((x($_POST,'itemcache')) ? Strings::escapeTags(trim($_POST['itemcache'])) : ''); $itemcache_duration = ((x($_POST,'itemcache_duration')) ? intval($_POST['itemcache_duration']) : 0); @@ -1298,6 +1299,7 @@ function admin_page_site_post(App $a) Config::set('system', 'dbclean', $dbclean); Config::set('system', 'dbclean-expire-days', $dbclean_expire_days); + Config::set('system', 'dbclean_expire_conversation', $dbclean_expire_conv); if ($dbclean_unclaimed == 0) { $dbclean_unclaimed = $dbclean_expire_days; @@ -1562,6 +1564,7 @@ function admin_page_site(App $a) '$dbclean' => ['dbclean', L10n::t("Clean database"), Config::get('system','dbclean', false), L10n::t("Remove old remote items, orphaned database records and old content from some other helper tables.")], '$dbclean_expire_days' => ['dbclean_expire_days', L10n::t("Lifespan of remote items"), Config::get('system','dbclean-expire-days', 0), L10n::t("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.")], '$dbclean_unclaimed' => ['dbclean_unclaimed', L10n::t("Lifespan of unclaimed items"), Config::get('system','dbclean-expire-unclaimed', 90), L10n::t("When the database cleanup is enabled, this defines the days after which unclaimed remote items (mostly content from the relay) will be deleted. Default value is 90 days. Defaults to the general lifespan value of remote items if set to 0.")], + '$dbclean_expire_conv' => ['dbclean_expire_conv', L10n::t("Lifespan of raw conversation data"), Config::get('system','dbclean_expire_conversation', 90), L10n::t("The conversation data is used for ActivityPub and OStatus, as well as for debug purposes. It is save to remove it after some days, default is 90 days.")], '$itemcache' => ['itemcache', L10n::t("Path to item cache"), Config::get('system','itemcache'), L10n::t("The item caches buffers generated bbcode and external images.")], '$itemcache_duration' => ['itemcache_duration', L10n::t("Cache duration in seconds"), Config::get('system','itemcache_duration'), L10n::t("How long should the cache files be hold? Default value is 86400 seconds \x28One day\x29. To disable the item cache, set the value to -1.")], '$max_comments' => ['max_comments', L10n::t("Maximum numbers of comments per post"), Config::get('system','max_comments'), L10n::t("How much comments should be shown for each post? Default value is 100.")], diff --git a/view/templates/admin/site.tpl b/view/templates/admin/site.tpl index c2a6f73c44..2b03bb1d4d 100644 --- a/view/templates/admin/site.tpl +++ b/view/templates/admin/site.tpl @@ -142,6 +142,7 @@ {{include file="field_checkbox.tpl" field=$dbclean}} {{include file="field_input.tpl" field=$dbclean_expire_days}} {{include file="field_input.tpl" field=$dbclean_unclaimed}} + {{include file="field_input.tpl" field=$dbclean_expire_conv}}

{{$worker_title}}

From b486e48cd6c2bb0f07d8aa608246d29fabed0452 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 19 Nov 2018 10:02:44 +0000 Subject: [PATCH 14/14] 14 days --- mod/admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/admin.php b/mod/admin.php index 7af47110a6..e8717e6b28 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -1564,7 +1564,7 @@ function admin_page_site(App $a) '$dbclean' => ['dbclean', L10n::t("Clean database"), Config::get('system','dbclean', false), L10n::t("Remove old remote items, orphaned database records and old content from some other helper tables.")], '$dbclean_expire_days' => ['dbclean_expire_days', L10n::t("Lifespan of remote items"), Config::get('system','dbclean-expire-days', 0), L10n::t("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.")], '$dbclean_unclaimed' => ['dbclean_unclaimed', L10n::t("Lifespan of unclaimed items"), Config::get('system','dbclean-expire-unclaimed', 90), L10n::t("When the database cleanup is enabled, this defines the days after which unclaimed remote items (mostly content from the relay) will be deleted. Default value is 90 days. Defaults to the general lifespan value of remote items if set to 0.")], - '$dbclean_expire_conv' => ['dbclean_expire_conv', L10n::t("Lifespan of raw conversation data"), Config::get('system','dbclean_expire_conversation', 90), L10n::t("The conversation data is used for ActivityPub and OStatus, as well as for debug purposes. It is save to remove it after some days, default is 90 days.")], + '$dbclean_expire_conv' => ['dbclean_expire_conv', L10n::t("Lifespan of raw conversation data"), Config::get('system','dbclean_expire_conversation', 90), L10n::t("The conversation data is used for ActivityPub and OStatus, as well as for debug purposes. It should be save to remove it after 14 days, default is 90 days.")], '$itemcache' => ['itemcache', L10n::t("Path to item cache"), Config::get('system','itemcache'), L10n::t("The item caches buffers generated bbcode and external images.")], '$itemcache_duration' => ['itemcache_duration', L10n::t("Cache duration in seconds"), Config::get('system','itemcache_duration'), L10n::t("How long should the cache files be hold? Default value is 86400 seconds \x28One day\x29. To disable the item cache, set the value to -1.")], '$max_comments' => ['max_comments', L10n::t("Maximum numbers of comments per post"), Config::get('system','max_comments'), L10n::t("How much comments should be shown for each post? Default value is 100.")],