Merge remote-tracking branch 'upstream/develop' into enqueue-posts

This commit is contained in:
Michael 2022-07-18 14:05:04 +00:00
commit a676cf8bed
9 changed files with 400 additions and 372 deletions

View File

@ -30,7 +30,7 @@ Due to the large variety of operating systems and PHP platforms in existence we
* Apache with mod-rewrite enabled and "Options All" so you can use a local `.htaccess` file * Apache with mod-rewrite enabled and "Options All" so you can use a local `.htaccess` file
* PHP 7.3+ (PHP8 is not fully supported yet) * PHP 7.3+ (PHP8 is not fully supported yet)
* PHP *command line* access with register_argc_argv set to true in the php.ini file * PHP *command line* access with register_argc_argv set to true in the php.ini file
* Curl, GD, PDO, mbstrings, MySQLi, hash, xml, zip and OpenSSL extensions * Curl, GD, GMP, PDO, mbstrings, MySQLi, hash, xml, zip and OpenSSL extensions
* 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) * 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. * 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. 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.

View File

@ -27,7 +27,7 @@ Requirements
* Apache mit einer aktiverten mod-rewrite-Funktion und dem Eintrag "Options All", so dass du die lokale .htaccess-Datei nutzen kannst * Apache mit einer aktiverten mod-rewrite-Funktion und dem Eintrag "Options All", so dass du die lokale .htaccess-Datei nutzen kannst
* PHP 7.3+ (PHP 8 wird noch nicht komplett unterstützt) * PHP 7.3+ (PHP 8 wird noch nicht komplett unterstützt)
* PHP *Kommandozeilen*-Zugang mit register_argc_argv auf "true" gesetzt in der php.ini-Datei * PHP *Kommandozeilen*-Zugang mit register_argc_argv auf "true" gesetzt in der php.ini-Datei
* Curl, GD, PDO, MySQLi, xml, zip und OpenSSL-Erweiterung * Curl, GD, GMP, PDO, MySQLi, xml, zip und OpenSSL-Erweiterung
* 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) * 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. * 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. 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.

View File

@ -263,7 +263,7 @@ class Avatar
{ {
$localFile = self::getCacheFile($avatar); $localFile = self::getCacheFile($avatar);
if (!empty($localFile)) { if (!empty($localFile)) {
unlink($localFile); @unlink($localFile);
Logger::debug('Unlink avatar', ['avatar' => $avatar]); Logger::debug('Unlink avatar', ['avatar' => $avatar]);
} }
} }

View File

@ -486,6 +486,13 @@ class Installer
); );
$returnVal = $returnVal ? $status : false; $returnVal = $returnVal ? $status : false;
$status = $this->checkFunction('gmp_strval',
DI::l10n()->t('GNU Multiple Precision PHP module'),
DI::l10n()->t('Error: GNU Multiple Precision PHP module required but not installed.'),
true
);
$returnVal = $returnVal ? $status : false;
return $returnVal; return $returnVal;
} }

View File

@ -1896,16 +1896,16 @@ class GServer
* *
* @return array server data * @return array server data
*/ */
private static function analyseRootBody($curlResult, array $serverdata): array private static function analyseRootBody($curlResult, array $serverdata): array
{ {
if (empty($curlResult->getBody())) { if (empty($curlResult->getBody())) {
return $serverdata; return $serverdata;
} }
if (file_exists(__DIR__ . '/../../static/generator.config.php')) { if (file_exists(__DIR__ . '/../../static/platforms.config.php')) {
require __DIR__ . '/../../static/generator.config.php'; require __DIR__ . '/../../static/platforms.config.php';
} else { } else {
throw new HTTPException\InternalServerErrorException('Invalid generator file'); throw new HTTPException\InternalServerErrorException('Invalid platform file');
} }
$platforms = array_merge($ap_platforms, $dfrn_platforms, $zap_platforms, $platforms); $platforms = array_merge($ap_platforms, $dfrn_platforms, $zap_platforms, $platforms);

View File

@ -102,7 +102,6 @@ class PushSubscription
], ],
]); ]);
// @todo Only used for logging?
$payload = [ $payload = [
'access_token' => $application_token['access_token'], 'access_token' => $application_token['access_token'],
'preferred_locale' => $user['language'], 'preferred_locale' => $user['language'],

View File

@ -104,6 +104,8 @@ class InstallerTest extends MockedTest
$this->mockL10nT('Error: JSON PHP module required but not installed.', 1); $this->mockL10nT('Error: JSON PHP module required but not installed.', 1);
$this->mockL10nT('File Information PHP module', 1); $this->mockL10nT('File Information PHP module', 1);
$this->mockL10nT('Error: File Information PHP module required but not installed.', 1); $this->mockL10nT('Error: File Information PHP module required but not installed.', 1);
$this->mockL10nT('GNU Multiple Precision PHP module', 1);
$this->mockL10nT('Error: GNU Multiple Precision PHP module required but not installed.', 1);
$this->mockL10nT('Program execution functions', 1); $this->mockL10nT('Program execution functions', 1);
$this->mockL10nT('Error: Program execution functions (proc_open) required but not enabled.', 1); $this->mockL10nT('Error: Program execution functions (proc_open) required but not enabled.', 1);
} }
@ -276,6 +278,17 @@ class InstallerTest extends MockedTest
true, true,
$install->getChecks()); $install->getChecks());
$this->mockFunctionL10TCalls();
$this->setFunctions(['gmp_strval' => false]);
$install = new Installer();
self::assertFalse($install->checkFunctions());
self::assertCheckExist(12,
'GNU Multiple Precision PHP module',
'Error: GNU Multiple Precision PHP module required but not installed.',
false,
true,
$install->getChecks());
$this->mockFunctionL10TCalls(); $this->mockFunctionL10TCalls();
$this->setFunctions([ $this->setFunctions([
'curl_init' => true, 'curl_init' => true,
@ -286,6 +299,7 @@ class InstallerTest extends MockedTest
'posix_kill' => true, 'posix_kill' => true,
'json_encode' => true, 'json_encode' => true,
'finfo_open' => true, 'finfo_open' => true,
'gmp_strval' => true,
]); ]);
$install = new Installer(); $install = new Installer();
self::assertTrue($install->checkFunctions()); self::assertTrue($install->checkFunctions());

File diff suppressed because it is too large Load Diff