From 89e268c79f9b8ff57eef796a6c6667219c20e4d0 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Fri, 2 Apr 2021 09:49:46 +0200 Subject: [PATCH 01/11] update the CREDITS.txt for the 2021.03 release --- CREDITS.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/CREDITS.txt b/CREDITS.txt index 25caae4d76..127db14fe6 100644 --- a/CREDITS.txt +++ b/CREDITS.txt @@ -43,6 +43,7 @@ Beluga Ben Ben Roberts ben-utzer +Beringer Zsolt BinkaDroid Bjoessi bufalo1973 @@ -58,6 +59,7 @@ Christian M. Grube Christian Vogeley Christian Wiwie Cohan Robinson +Colby Sollars Copiis Praeesse CrystalStiletto Cyboulette @@ -87,6 +89,7 @@ Eric Côté erik Erkan Yilmaz Eugene Veresk +Extarys Fabian Dost Fabio Comuni felixgilles @@ -106,6 +109,7 @@ Gregory Smith guzzisti Haakon Meland Eriksen Hans Meine +hauke Hauke Hauke Altmann Herbert Thielen @@ -179,6 +183,7 @@ mytbk nathilia-peirce Nicola Spanti nobody +nupplaPhil Olaf Conradi Oliver Olivier @@ -203,6 +208,7 @@ R C Rabuzarus Radek Rafael Garau +Rafael Kalachev Rain Hawk Rainulf Pineda Ralf Thees @@ -227,6 +233,7 @@ Samuli Valavuo Sandro Santilli Sebastian Egbers sella +Senex Petrovic Seth Silke Meyer Simon L'nu @@ -243,6 +250,7 @@ Sveinn í Felli Sven Anders Sylke Vicious Sylvain Lagacé +szymon.filip Sérgio Lima Taekus Tazman DeVille @@ -270,12 +278,12 @@ U-SOUND\mike ufic Ulf Rompe Unknown -Valvin A +utzer +Valvin Vasudev Kamath Vasya Novikov Vinzenz Vietzke vislav -vladimir N Vladimir Núñez VVelox Vít Šesták 'v6ak' From 3545e9cfa806dc747af3c45461242c81bf999b6f Mon Sep 17 00:00:00 2001 From: Matthew Exon Date: Sun, 21 Mar 2021 18:44:37 +0100 Subject: [PATCH 02/11] Add "addon" console command to enable and disable addons --- src/Console/Addon.php | 215 ++++++++++++++++++++++++++++++++++++++++++ src/Core/Console.php | 2 + 2 files changed, 217 insertions(+) create mode 100644 src/Console/Addon.php diff --git a/src/Console/Addon.php b/src/Console/Addon.php new file mode 100644 index 0000000000..c1d434bbeb --- /dev/null +++ b/src/Console/Addon.php @@ -0,0 +1,215 @@ +. + * + */ + +namespace Friendica\Console; + +use Console_Table; +use Friendica\App; +use Friendica\Content\Pager; +use Friendica\Core\L10n; +use Friendica\Core\Addon as AddonCore; +use Friendica\Database\Database; +use Friendica\Util\Strings; +use RuntimeException; + +/** + * tool to manage addons on the current node + */ +class Addon extends \Asika\SimpleConsole\Console +{ + protected $helpOptions = ['h', 'help', '?']; + + /** + * @var App\Mode + */ + private $appMode; + /** + * @var L10n + */ + private $l10n; + /** + * @var Database + */ + private $dba; + + protected function getHelp() + { + $help = << [-h|--help|-?] [-v] + bin/console addon disable [-h|--help|-?] [-v] + +Description + Modify addon settings per console commands. + +Options + -h|--help|-? Show help information + -v Show more debug information +HELP; + return $help; + } + + public function __construct(App\Mode $appMode, L10n $l10n, Database $dba, array $argv = null) + { + parent::__construct($argv); + + $this->appMode = $appMode; + $this->l10n = $l10n; + $this->dba = $dba; + + AddonCore::loadAddons(); + } + + protected function doExecute() + { + if ($this->getOption('v')) { + $this->out('Class: ' . __CLASS__); + $this->out('Arguments: ' . var_export($this->args, true)); + $this->out('Options: ' . var_export($this->options, true)); + } + + if (count($this->args) == 0) { + $this->out($this->getHelp()); + return 0; + } + + if ($this->appMode->isInstall()) { + throw new RuntimeException('Database isn\'t ready or populated yet'); + } + + $command = $this->getArgument(0); + + switch ($command) { + case 'list': + return $this->list(); + case 'enable': + return $this->enable(); + case 'disable': + return $this->disable(); + default: + throw new \Asika\SimpleConsole\CommandArgsException('Wrong command.'); + } + } + + /** + * Lists plugins + * + * @return int Return code of this command + * + * @throws \Exception + */ + private function list() + { + $subCmd = $this->getArgument(1); + $start = $this->getOption(['s', 'start'], 0); + $count = $this->getOption(['c', 'count'], Pager::ITEMS_PER_PAGE); + + $table = new Console_Table(); + switch ($subCmd) { + case 'all': + $table->setHeaders(['Name', 'Enabled']); + break; + case 'enabled': + case 'disabled': + $table->setHeaders(['Name']); + break; + default: + $this->out($this->getHelp()); + return false; + } + foreach (AddonCore::getAvailableList() as $addon) { + $addon_name = $addon[0]; + $enabled = AddonCore::isEnabled($addon_name) ? "enabled" : "disabled"; + switch ($subCmd) { + case 'all': + $table->addRow([$addon_name, $enabled]); + break; + case 'enabled': + if (!$enabled) { + continue 2; + } + $table->addRow([$addon_name]); + case 'disabled': + if ($enabled) { + continue 2; + } + $table->addRow([$addon_name]); + break; + } + + } + $this->out($table->getTable()); + } + + /** + * Enables an addon + * + * @return int Return code of this command + * + * @throws \Exception + */ + private function enable() + { + $addonname = $this->getArgument(1); + + $addon = Strings::sanitizeFilePathItem($addonname); + if (!is_file("addon/$addon/$addon.php")) { + throw new RuntimeException($this->l10n->t('Addon not found')); + } + + if (AddonCore::isEnabled($addon)) { + throw new RuntimeException($this->l10n->t('Addon already enabled')); + } + + AddonCore::install($addon); + + return 0; + } + + /** + * Disables an addon + * + * @return int Return code of this command + * + * @throws \Exception + */ + private function disable() + { + $addonname = $this->getArgument(1); + + $addon = Strings::sanitizeFilePathItem($addonname); + if (!is_file("addon/$addon/$addon.php")) { + throw new RuntimeException($this->l10n->t('Addon not found')); + } + + if (!AddonCore::isEnabled($addon)) { + throw new RuntimeException($this->l10n->t('Addon already disabled')); + } + + AddonCore::uninstall($addon); + + return 0; + } +} diff --git a/src/Core/Console.php b/src/Core/Console.php index f43b89e9e6..fe2c969f23 100644 --- a/src/Core/Console.php +++ b/src/Core/Console.php @@ -44,6 +44,7 @@ class Console extends \Asika\SimpleConsole\Console Usage: bin/console [--version] [-h|--help|-?] [] [-v] Commands: + addon Addon management cache Manage node cache config Edit site config createdoxygen Generate Doxygen headers @@ -74,6 +75,7 @@ HELP; } protected $subConsoles = [ + 'addon' => Friendica\Console\Addon::class, 'cache' => Friendica\Console\Cache::class, 'config' => Friendica\Console\Config::class, 'createdoxygen' => Friendica\Console\CreateDoxygen::class, From 492ac0c387604c3493f364fbc485647964fe4ba7 Mon Sep 17 00:00:00 2001 From: Matthew Exon Date: Fri, 2 Apr 2021 20:17:12 +0200 Subject: [PATCH 03/11] Remove unneeded parameters to console addon command --- src/Console/Addon.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Console/Addon.php b/src/Console/Addon.php index c1d434bbeb..3577982ba7 100644 --- a/src/Console/Addon.php +++ b/src/Console/Addon.php @@ -55,9 +55,9 @@ class Addon extends \Asika\SimpleConsole\Console $help = << [-h|--help|-?] [-v] bin/console addon disable [-h|--help|-?] [-v] @@ -123,8 +123,6 @@ HELP; private function list() { $subCmd = $this->getArgument(1); - $start = $this->getOption(['s', 'start'], 0); - $count = $this->getOption(['c', 'count'], Pager::ITEMS_PER_PAGE); $table = new Console_Table(); switch ($subCmd) { From 30f07d6d3b466ff5552d748a7f06e442b71f7802 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 4 Apr 2021 08:14:51 +0200 Subject: [PATCH 04/11] closed issues added CHANGELOG for the addon repository --- CHANGELOG | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 97a12d55d9..1afd5aa163 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,10 +1,23 @@ -Version 2021.03 (unreleased) +Version 2021.04 (unreleased) Friendica Core + Updated to the translations xx [translation teams] Removed the frontend worker [annando] Friendica Addons + Updated to the translations BG, DE, EN-US, ES, HU, IT [translation teams] + Adapted the addons to the new database schema [annando] + Adapted the addons to the new class structure [annando, MrPetovan] + deprecated flash based addons (sniper, mahjongg) [urbalazs] + smileybutton addon was reworked [MrPetovan] + twitter + Fixed an OEmbed problem with URL handling [MrPetovan] Closed Issues + 8910, 9402, 9640, 9677, 9698, 9716, 9733, 9743, 9746, 9753, 9761, + 9764, 9767, 9777, 9782, 9789, 9799, 9811, 9814, 9820, 9827, 9846, + 9854, 9856, 9872, 9875, 9879, 9881, 9885, 9895, 9905, 9907, 9912, + 9914, 9929, 9936, 9948, 9950, 9962, 9971, 9975, 9977, 9980, 9996, + 10017, 10032, 10041, 10047, 10050, 10068, 10105, 10107, 10110 Version 2021.01 (2021-01-04) Friendica Core From 0f4ca552afdfbba1212a16460ebe43058bac4730 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 4 Apr 2021 10:09:42 +0200 Subject: [PATCH 05/11] changes from the core repository for 2021.03 --- CHANGELOG | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 1afd5aa163..ab68512060 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,13 +1,53 @@ Version 2021.04 (unreleased) Friendica Core - Updated to the translations xx [translation teams] - Removed the frontend worker [annando] + Updates to the translations BG, DE, EN-US, ES, HU, IT, RU [translation teams] + Updates to the themes (frio) [Extarys, MrPetovan] + Updates to the documentation [tobiasd, urbalazs] + General code cleanup [annando, MrPetovan, Quix0r] + Enhanced the babel functionality to work with some addons [MrPetovan] + Enhanced the import of mails [annando] + Enhanced the PHP8 compatibility [annando, nupplaphil, realkinetix] + Enhanced federation with diaspora*, Peertube, Pleroma [annando] + Enhanced the admin panel federation overview [annando] + Enhanced the federated deletion of items [annando] + Enhanced the usability of Friendica in containers [nupplaphil] + Enhanced the handling of contact avatars [annando] + Enhanced the display of shared postings [annando] + Enhanced the process of deleting items [annando] + Enhanced the trending tags [annando] + Enhanced the maintenance page [MrPetovan] + Enhanced the performance [annando] + Enhanced the PWA [Extarys] + Enhanced the handling of private messages [fabrixxm] + Enhanced the video BBCode tag [MrPetovan] + Enhanced the installation wizard [fabrixxm] + Enhanced the handling of #tags [MrPetovan] + Moved API endpoints to pin, star, ignore and like items [MrPetovan] + Updated the composer dependencies [MrPetovan] + Reworked the database structure [annando] + Fixed a bug in accessing uexport and uimport [MrPetovan] + Fixed a bug while logging [nupplaphil] + Fixed a bug handling legacy photo storage [annando] + Fixed a bug while parsing fetched HTML [annando] + Fixed a bug that prevented images to be fetched [annando] + Fixed a bug that caused content being handled for expired users [annando] + Fixed some problems of handling OEmbed content [MrPetovan] + Fixed a bug in the storage move command [fabrixxm, utzer] + Fixed a bug in the mime type handling [jurassic-c] + Fixed a problem with the /parseurl path [MrPetovan] + Removed the front-end worker [annando] + Added a security.txt file to the repository [MrPetovan] + Added remember device setting for the 2FA [MrPetovan] + Added the possibility to block tags from the trending tags [annando] + Added the possibility to chmod proxied files [Quix0r] Friendica Addons Updated to the translations BG, DE, EN-US, ES, HU, IT [translation teams] Adapted the addons to the new database schema [annando] Adapted the addons to the new class structure [annando, MrPetovan] deprecated flash based addons (sniper, mahjongg) [urbalazs] + mailstream + better URL handling [mexon] smileybutton addon was reworked [MrPetovan] twitter Fixed an OEmbed problem with URL handling [MrPetovan] From fac4fb552e24f8947c61855cfd46cc041777c042 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Tue, 20 Apr 2021 11:16:14 +0200 Subject: [PATCH 06/11] additional changes --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index ab68512060..4ad3bdb91a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -22,6 +22,7 @@ Version 2021.04 (unreleased) Enhanced the video BBCode tag [MrPetovan] Enhanced the installation wizard [fabrixxm] Enhanced the handling of #tags [MrPetovan] + Enhanced the handling of audio attachments [annando] Moved API endpoints to pin, star, ignore and like items [MrPetovan] Updated the composer dependencies [MrPetovan] Reworked the database structure [annando] @@ -35,6 +36,7 @@ Version 2021.04 (unreleased) Fixed a bug in the storage move command [fabrixxm, utzer] Fixed a bug in the mime type handling [jurassic-c] Fixed a problem with the /parseurl path [MrPetovan] + Fixed a problem with mentions in the summary of a posting [annando] Removed the front-end worker [annando] Added a security.txt file to the repository [MrPetovan] Added remember device setting for the 2FA [MrPetovan] @@ -51,6 +53,7 @@ Version 2021.04 (unreleased) smileybutton addon was reworked [MrPetovan] twitter Fixed an OEmbed problem with URL handling [MrPetovan] + Improved handling of Photo postings [annando] Closed Issues 8910, 9402, 9640, 9677, 9698, 9716, 9733, 9743, 9746, 9753, 9761, From 4ed331924f3320254f8acd73edcafeed75bf80d7 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 21 Apr 2021 06:47:36 +0200 Subject: [PATCH 07/11] another bug squashed, updating the CHANGELOG --- CHANGELOG | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 4ad3bdb91a..c323a9358f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -37,6 +37,7 @@ Version 2021.04 (unreleased) Fixed a bug in the mime type handling [jurassic-c] Fixed a problem with the /parseurl path [MrPetovan] Fixed a problem with mentions in the summary of a posting [annando] + Fixed a bug with the endless scroll in saved folders [annando] Removed the front-end worker [annando] Added a security.txt file to the repository [MrPetovan] Added remember device setting for the 2FA [MrPetovan] @@ -60,7 +61,8 @@ Version 2021.04 (unreleased) 9764, 9767, 9777, 9782, 9789, 9799, 9811, 9814, 9820, 9827, 9846, 9854, 9856, 9872, 9875, 9879, 9881, 9885, 9895, 9905, 9907, 9912, 9914, 9929, 9936, 9948, 9950, 9962, 9971, 9975, 9977, 9980, 9996, - 10017, 10032, 10041, 10047, 10050, 10068, 10105, 10107, 10110 + 10017, 10032, 10041, 10047, 10050, 10068, 10105, 10107, 10110, + 10156 Version 2021.01 (2021-01-04) Friendica Core From 6acedcb25e6f3f06f02deef5d25ded35ba5500ea Mon Sep 17 00:00:00 2001 From: Philipp Date: Fri, 23 Apr 2021 21:12:00 +0200 Subject: [PATCH 08/11] Fix empty needle after trimming at PageInfo --- src/Content/PageInfo.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Content/PageInfo.php b/src/Content/PageInfo.php index e61db3865d..3fc5330938 100644 --- a/src/Content/PageInfo.php +++ b/src/Content/PageInfo.php @@ -292,7 +292,8 @@ class PageInfo } // Stripping link labels that include a shortened version of the URL - if (strpos($url, trim($match[1], '.…')) !== false) { + $trimMatch = trim($match[1], '.…'); + if (!empty($trimMatch) && strpos($url, $trimMatch) !== false) { return ''; } From 9fdf102c1f0f832aa355559eb8f0d0e07b926969 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Mon, 26 Apr 2021 09:34:37 +0200 Subject: [PATCH 09/11] set the release date for the 2021.04 reloease --- CHANGELOG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index c323a9358f..75f8a8da1f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -Version 2021.04 (unreleased) +Version 2021.04 (2021-04-26) Friendica Core Updates to the translations BG, DE, EN-US, ES, HU, IT, RU [translation teams] Updates to the themes (frio) [Extarys, MrPetovan] From 6434d018c89a880bd667dc7d9185e6a7b16f0718 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Mon, 26 Apr 2021 09:37:31 +0200 Subject: [PATCH 10/11] bump version: Friendica Siberian Iris 2021.04 --- VERSION | 2 +- boot.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index b1f4077f81..7223033747 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2021.03-rc +2021.04 diff --git a/boot.php b/boot.php index 2223379ca3..bf19f206cd 100644 --- a/boot.php +++ b/boot.php @@ -37,8 +37,8 @@ use Friendica\Util\BasePath; use Friendica\Util\DateTimeFormat; define('FRIENDICA_PLATFORM', 'Friendica'); -define('FRIENDICA_CODENAME', 'Red Hot Poker'); -define('FRIENDICA_VERSION', '2021.03-rc'); +define('FRIENDICA_CODENAME', 'Siberian Iris'); +define('FRIENDICA_VERSION', '2021.04'); define('DFRN_PROTOCOL_VERSION', '2.23'); define('NEW_TABLE_STRUCTURE_VERSION', 1288); From e9131428b0946bc0d0e6831376b1f56431f49e29 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Mon, 26 Apr 2021 09:49:16 +0200 Subject: [PATCH 11/11] pump version 2021-06.dev --- VERSION | 2 +- boot.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 7223033747..e9cd37efec 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2021.04 +2021.06-dev diff --git a/boot.php b/boot.php index bf19f206cd..bbb66c2f9a 100644 --- a/boot.php +++ b/boot.php @@ -38,7 +38,7 @@ use Friendica\Util\DateTimeFormat; define('FRIENDICA_PLATFORM', 'Friendica'); define('FRIENDICA_CODENAME', 'Siberian Iris'); -define('FRIENDICA_VERSION', '2021.04'); +define('FRIENDICA_VERSION', '2021.06-dev'); define('DFRN_PROTOCOL_VERSION', '2.23'); define('NEW_TABLE_STRUCTURE_VERSION', 1288);