|
@@ -4,6 +4,19 @@ declare(strict_types=1);
|
|
|
FreshRSS_SystemConfiguration::register('default_system', join_path(FRESHRSS_PATH, 'config.default.php'));
|
|
FreshRSS_SystemConfiguration::register('default_system', join_path(FRESHRSS_PATH, 'config.default.php'));
|
|
|
FreshRSS_UserConfiguration::register('default_user', join_path(FRESHRSS_PATH, 'config-user.default.php'));
|
|
FreshRSS_UserConfiguration::register('default_user', join_path(FRESHRSS_PATH, 'config-user.default.php'));
|
|
|
|
|
|
|
|
|
|
+/**
|
|
|
|
|
+ * GMP is needed to convert entry identifiers to the Google Reader format on 32-bit PHP.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return 'ok'|'ko'|null
|
|
|
|
|
+ */
|
|
|
|
|
+function gmpRequirementStatus(int $integerSize = PHP_INT_SIZE, ?bool $gmpLoaded = null): ?string {
|
|
|
|
|
+ if ($integerSize >= 8) {
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return ($gmpLoaded ?? extension_loaded('gmp')) ? 'ok' : 'ko';
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* @param 'mysql'|'pgsql'|'sqlite'|'' $dbType
|
|
* @param 'mysql'|'pgsql'|'sqlite'|'' $dbType
|
|
|
* @return array<string,'ok'|'ko'|'warn'>
|
|
* @return array<string,'ok'|'ko'|'warn'>
|
|
@@ -43,6 +56,7 @@ function checkRequirements(string $dbType = '', bool $checkPhp = true, bool $che
|
|
|
$intl = extension_loaded('intl');
|
|
$intl = extension_loaded('intl');
|
|
|
$mbstring = extension_loaded('mbstring');
|
|
$mbstring = extension_loaded('mbstring');
|
|
|
$zip = extension_loaded('zip');
|
|
$zip = extension_loaded('zip');
|
|
|
|
|
+ $gmp = gmpRequirementStatus();
|
|
|
$data = is_dir(DATA_PATH) && touch(DATA_PATH . '/index.html'); // is_writable() is not reliable for a folder on NFS
|
|
$data = is_dir(DATA_PATH) && touch(DATA_PATH . '/index.html'); // is_writable() is not reliable for a folder on NFS
|
|
|
$cache = is_dir(CACHE_PATH) && touch(CACHE_PATH . '/index.html');
|
|
$cache = is_dir(CACHE_PATH) && touch(CACHE_PATH . '/index.html');
|
|
|
$tmp = is_dir(TMP_PATH) && is_writable(TMP_PATH);
|
|
$tmp = is_dir(TMP_PATH) && is_writable(TMP_PATH);
|
|
@@ -73,6 +87,7 @@ function checkRequirements(string $dbType = '', bool $checkPhp = true, bool $che
|
|
|
'intl' => $intl ? 'ok' : 'warn',
|
|
'intl' => $intl ? 'ok' : 'warn',
|
|
|
'zip' => $zip ? 'ok' : 'warn',
|
|
'zip' => $zip ? 'ok' : 'warn',
|
|
|
'fileinfo' => $fileinfo ? 'ok' : 'warn',
|
|
'fileinfo' => $fileinfo ? 'ok' : 'warn',
|
|
|
|
|
+ 'gmp' => $gmp,
|
|
|
];
|
|
];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -89,7 +104,7 @@ function checkRequirements(string $dbType = '', bool $checkPhp = true, bool $che
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if ($checkPhp && $checkFiles) {
|
|
if ($checkPhp && $checkFiles) {
|
|
|
- $result['all'] = $php && $curl && $json && $pdo && $pcre && $ctype && $dom && $xml &&
|
|
|
|
|
|
|
+ $result['all'] = $php && $curl && $json && $pdo && $pcre && $ctype && $dom && $xml && $gmp !== 'ko' &&
|
|
|
$data && $cache && $tmp && $users && $favicons && $tokens ? 'ok' : 'ko';
|
|
$data && $cache && $tmp && $users && $favicons && $tokens ? 'ok' : 'ko';
|
|
|
}
|
|
}
|
|
|
|
|
|