diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-04-17 20:03:26 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-05-03 08:58:24 +0200 |
commit | 9bfc108b79f793ed5dd6812d1ca193a38ba02231 (patch) | |
tree | d4fe8c492e669e346c2d4ec55acd8945ae2d21a5 /lib | |
parent | 1f2f7019319cd9f4cfa759be35aea0d888beaba8 (diff) | |
download | nextcloud-server-9bfc108b79f793ed5dd6812d1ca193a38ba02231.tar.gz nextcloud-server-9bfc108b79f793ed5dd6812d1ca193a38ba02231.zip |
Cleanup and fix tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Settings/Admin/Overview.php | 5 | ||||
-rw-r--r-- | lib/private/Settings/Admin/Server.php | 56 |
2 files changed, 0 insertions, 61 deletions
diff --git a/lib/private/Settings/Admin/Overview.php b/lib/private/Settings/Admin/Overview.php index 7d0cf107539..6e186dc6f98 100644 --- a/lib/private/Settings/Admin/Overview.php +++ b/lib/private/Settings/Admin/Overview.php @@ -127,13 +127,8 @@ class Overview implements ISettings { 'OutdatedCacheWarning' => $outdatedCaches, 'fileLockingType' => $fileLockingType, 'suggestedOverwriteCliUrl' => $suggestedOverwriteCliUrl, - - // Background jobs - 'backgroundjobs_mode' => $this->config->getAppValue('core', 'backgroundjobs_mode', 'ajax'), 'lastcron' => $this->config->getAppValue('core', 'lastcron', false), 'cronErrors' => $this->config->getAppValue('core', 'cronErrors'), - 'cli_based_cron_possible' => function_exists('posix_getpwuid'), - 'cli_based_cron_user' => function_exists('posix_getpwuid') ? posix_getpwuid(fileowner(\OC::$configDir . 'config.php'))['name'] : '', ]; return new TemplateResponse('settings', 'settings/admin/overview', $parameters, ''); diff --git a/lib/private/Settings/Admin/Server.php b/lib/private/Settings/Admin/Server.php index 0b9c042e4f2..1ebea8a4dcd 100644 --- a/lib/private/Settings/Admin/Server.php +++ b/lib/private/Settings/Admin/Server.php @@ -74,63 +74,7 @@ class Server implements ISettings { * @return TemplateResponse */ public function getForm() { - try { - if ($this->db->getDatabasePlatform() instanceof SqlitePlatform) { - $invalidTransactionIsolationLevel = false; - } else { - $invalidTransactionIsolationLevel = $this->db->getTransactionIsolation() !== Connection::TRANSACTION_READ_COMMITTED; - } - } catch (DBALException $e) { - // ignore - $invalidTransactionIsolationLevel = false; - } - - $envPath = getenv('PATH'); - - // warn if outdated version of a memcache module is used - $caches = [ - 'apcu' => ['name' => $this->l->t('APCu'), 'version' => '4.0.6'], - 'redis' => ['name' => $this->l->t('Redis'), 'version' => '2.2.5'], - ]; - $outdatedCaches = []; - foreach ($caches as $php_module => $data) { - $isOutdated = extension_loaded($php_module) && version_compare(phpversion($php_module), $data['version'], '<'); - if ($isOutdated) { - $outdatedCaches[$php_module] = $data; - } - } - - if ($this->lockingProvider instanceof NoopLockingProvider) { - $fileLockingType = 'none'; - } else if ($this->lockingProvider instanceof DBLockingProvider) { - $fileLockingType = 'db'; - } else { - $fileLockingType = 'cache'; - } - - $suggestedOverwriteCliUrl = ''; - if ($this->config->getSystemValue('overwrite.cli.url', '') === '') { - $suggestedOverwriteCliUrl = $this->request->getServerProtocol() . '://' . $this->request->getInsecureServerHost() . \OC::$WEBROOT; - if (!$this->config->getSystemValue('config_is_read_only', false)) { - // Set the overwrite URL when it was not set yet. - $this->config->setSystemValue('overwrite.cli.url', $suggestedOverwriteCliUrl); - $suggestedOverwriteCliUrl = ''; - } - } - $parameters = [ - // Diagnosis - 'readOnlyConfigEnabled' => \OC_Helper::isReadOnlyConfigEnabled(), - 'isLocaleWorking' => \OC_Util::isSetLocaleWorking(), - 'isAnnotationsWorking' => \OC_Util::isAnnotationsWorking(), - 'checkForWorkingWellKnownSetup' => $this->config->getSystemValue('check_for_working_wellknown_setup', true), - 'has_fileinfo' => \OC_Util::fileInfoLoaded(), - 'invalidTransactionIsolationLevel' => $invalidTransactionIsolationLevel, - 'getenvServerNotWorking' => empty($envPath), - 'OutdatedCacheWarning' => $outdatedCaches, - 'fileLockingType' => $fileLockingType, - 'suggestedOverwriteCliUrl' => $suggestedOverwriteCliUrl, - // Background jobs 'backgroundjobs_mode' => $this->config->getAppValue('core', 'backgroundjobs_mode', 'ajax'), 'lastcron' => $this->config->getAppValue('core', 'lastcron', false), |