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
* 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
* 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)
* 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.

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
* 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
* 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)
* 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.

View file

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

View file

@ -486,6 +486,13 @@ class Installer
);
$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;
}

View file

@ -1902,10 +1902,10 @@ class GServer
return $serverdata;
}
if (file_exists(__DIR__ . '/../../static/generator.config.php')) {
require __DIR__ . '/../../static/generator.config.php';
if (file_exists(__DIR__ . '/../../static/platforms.config.php')) {
require __DIR__ . '/../../static/platforms.config.php';
} 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);

View file

@ -102,7 +102,6 @@ class PushSubscription
],
]);
// @todo Only used for logging?
$payload = [
'access_token' => $application_token['access_token'],
'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('File Information PHP module', 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('Error: Program execution functions (proc_open) required but not enabled.', 1);
}
@ -276,6 +278,17 @@ class InstallerTest extends MockedTest
true,
$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->setFunctions([
'curl_init' => true,
@ -286,6 +299,7 @@ class InstallerTest extends MockedTest
'posix_kill' => true,
'json_encode' => true,
'finfo_open' => true,
'gmp_strval' => true,
]);
$install = new Installer();
self::assertTrue($install->checkFunctions());

File diff suppressed because it is too large Load diff