1
0
Fork 0

Merge remote-tracking branch 'upstream/develop' into media-handling

This commit is contained in:
Michael 2021-04-26 09:01:26 +00:00
commit f25c3f4619
7 changed files with 290 additions and 8 deletions

View file

@ -1,10 +1,68 @@
Version 2021.03 (unreleased)
Version 2021.04 (2021-04-26)
Friendica Core
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]
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]
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]
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]
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]
Improved handling of Photo postings [annando]
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,
10156
Version 2021.01 (2021-01-04)
Friendica Core

View file

@ -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'

View file

@ -1 +1 @@
2021.03-rc
2021.06-dev

View file

@ -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.06-dev');
define('DFRN_PROTOCOL_VERSION', '2.23');
define('NEW_TABLE_STRUCTURE_VERSION', 1288);

213
src/Console/Addon.php Normal file
View file

@ -0,0 +1,213 @@
<?php
/**
* @copyright Copyright (C) 2021, Friendica
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
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 = <<<HELP
console user - Modify addon settings per console commands.
Usage
bin/console addon list all [-h|--help|-?] [-v]
bin/console addon list enabled [-h|--help|-?] [-v]
bin/console addon list disabled [-h|--help|-?] [-v]
bin/console addon enable <addonname> [-h|--help|-?] [-v]
bin/console addon disable <addonname> [-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);
$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;
}
}

View file

@ -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 '';
}

View file

@ -44,6 +44,7 @@ class Console extends \Asika\SimpleConsole\Console
Usage: bin/console [--version] [-h|--help|-?] <command> [<args>] [-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,