diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-04-09 12:19:42 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-04-09 12:19:42 +0200 |
commit | 4a01d5c5883094f297c2c68628a8bac4a3b25586 (patch) | |
tree | 9a17793fec88e0959cfc77a5e4683795264f1614 /core | |
parent | 7f237223e521288e90726a606f390519f20c58e8 (diff) | |
download | nextcloud-server-4a01d5c5883094f297c2c68628a8bac4a3b25586.tar.gz nextcloud-server-4a01d5c5883094f297c2c68628a8bac4a3b25586.zip |
Fix config usage
Diffstat (limited to 'core')
-rw-r--r-- | core/js/config.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/core/js/config.php b/core/js/config.php index d9a77b368ba..f2bc24008dc 100644 --- a/core/js/config.php +++ b/core/js/config.php @@ -50,17 +50,16 @@ foreach(OC_App::getEnabledApps() as $app) { $apps_paths[$app] = OC_App::getAppWebPath($app); } -$value = \OCP\Config::getAppValue('core', 'shareapi_default_expire_date', 'no'); +$config = \OC::$server->getConfig(); +$value = $config->getAppValue('core', 'shareapi_default_expire_date', 'no'); $defaultExpireDateEnabled = ($value === 'yes') ? true :false; $defaultExpireDate = $enforceDefaultExpireDate = null; if ($defaultExpireDateEnabled) { - $defaultExpireDate = (int)\OCP\Config::getAppValue('core', 'shareapi_expire_after_n_days', '7'); - $value = \OCP\Config::getAppValue('core', 'shareapi_enforce_expire_date', 'no'); + $defaultExpireDate = (int) $config->getAppValue('core', 'shareapi_expire_after_n_days', '7'); + $value = $config->getAppValue('core', 'shareapi_enforce_expire_date', 'no'); $enforceDefaultExpireDate = ($value === 'yes') ? true : false; } -$appConfig = \OC::$server->getAppConfig(); -$result = $appConfig->getValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes'); -$outgoingServer2serverShareEnabled = ($result === 'yes') ? true : false; +$outgoingServer2serverShareEnabled = $config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'yes'; $array = array( "oc_debug" => (defined('DEBUG') && DEBUG) ? 'true' : 'false', |