diff options
author | mbi <knox@users.noreply.github.com> | 2015-12-30 10:34:42 +0100 |
---|---|---|
committer | mbi <knox@users.noreply.github.com> | 2015-12-30 10:34:42 +0100 |
commit | 63974992f9a0244df0bbff891956deec7d35904b (patch) | |
tree | a4152551e4a4366957e06572cf04e4e0e941f38f /lib/private/app.php | |
parent | 1aff941be6ea3c09e86e234b7e2dc77fe4aa3696 (diff) | |
parent | 45c41e2b2cefa97c9d8c3bc73cfc088839640d1d (diff) | |
download | nextcloud-server-63974992f9a0244df0bbff891956deec7d35904b.tar.gz nextcloud-server-63974992f9a0244df0bbff891956deec7d35904b.zip |
Merge branch 'master' into master
Diffstat (limited to 'lib/private/app.php')
-rw-r--r-- | lib/private/app.php | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/private/app.php b/lib/private/app.php index abf12264c58..5f6ca9596c8 100644 --- a/lib/private/app.php +++ b/lib/private/app.php @@ -96,7 +96,7 @@ class OC_App { * if $types is set, only apps of those types will be loaded */ public static function loadApps($types = null) { - if (OC_Config::getValue('maintenance', false)) { + if (\OC::$server->getSystemConfig()->getValue('maintenance', false)) { return false; } // Load the enabled apps here @@ -239,7 +239,7 @@ class OC_App { * @return string[] */ public static function getEnabledApps($forceRefresh = false, $all = false) { - if (!OC_Config::getValue('installed', false)) { + if (!\OC::$server->getSystemConfig()->getValue('installed', false)) { return array(); } // in incognito mode or when logged out, $user will be false, @@ -318,8 +318,8 @@ class OC_App { \OC::$server->getConfig(), \OC::$server->getLogger() ); - $appData = $ocsClient->getApplication($app, \OC_Util::getVersion()); - $download= $ocsClient->getApplicationDownload($app, \OC_Util::getVersion()); + $appData = $ocsClient->getApplication($app, \OCP\Util::getVersion()); + $download= $ocsClient->getApplicationDownload($app, \OCP\Util::getVersion()); if(isset($download['downloadlink']) and $download['downloadlink']!='') { // Replace spaces in download link without encoding entire URL $download['downloadlink'] = str_replace(' ', '%20', $download['downloadlink']); @@ -374,13 +374,13 @@ class OC_App { $settings = array(); // by default, settings only contain the help menu if (OC_Util::getEditionString() === '' && - OC_Config::getValue('knowledgebaseenabled', true) == true + \OC::$server->getSystemConfig()->getValue('knowledgebaseenabled', true) == true ) { $settings = array( array( "id" => "help", "order" => 1000, - "href" => OC_Helper::linkToRoute("settings_help"), + "href" => \OC::$server->getURLGenerator()->linkToRoute('settings_help'), "name" => $l->t("Help"), "icon" => OC_Helper::imagePath("settings", "help.svg") ) @@ -393,7 +393,7 @@ class OC_App { $settings[] = array( "id" => "personal", "order" => 1, - "href" => OC_Helper::linkToRoute("settings_personal"), + "href" => \OC::$server->getURLGenerator()->linkToRoute('settings_personal'), "name" => $l->t("Personal"), "icon" => OC_Helper::imagePath("settings", "personal.svg") ); @@ -409,7 +409,7 @@ class OC_App { $settings[] = array( "id" => "core_users", "order" => 2, - "href" => OC_Helper::linkToRoute("settings_users"), + "href" => \OC::$server->getURLGenerator()->linkToRoute('settings_users'), "name" => $l->t("Users"), "icon" => OC_Helper::imagePath("settings", "users.svg") ); @@ -421,7 +421,7 @@ class OC_App { $settings[] = array( "id" => "admin", "order" => 1000, - "href" => OC_Helper::linkToRoute("settings_admin"), + "href" => \OC::$server->getURLGenerator()->linkToRoute('settings_admin'), "name" => $l->t("Admin"), "icon" => OC_Helper::imagePath("settings", "admin.svg") ); @@ -455,7 +455,7 @@ class OC_App { * @return string|false */ public static function getInstallPath() { - if (OC_Config::getValue('appstoreenabled', true) == false) { + if (\OC::$server->getSystemConfig()->getValue('appstoreenabled', true) == false) { return false; } @@ -880,7 +880,7 @@ class OC_App { if (is_null($category)) { - $categoryNames = $ocsClient->getCategories(\OC_Util::getVersion()); + $categoryNames = $ocsClient->getCategories(\OCP\Util::getVersion()); if (is_array($categoryNames)) { // Check that categories of apps were retrieved correctly if (!$categories = array_keys($categoryNames)) { @@ -892,7 +892,7 @@ class OC_App { } $page = 0; - $remoteApps = $ocsClient->getApplications($categories, $page, $filter, \OC_Util::getVersion()); + $remoteApps = $ocsClient->getApplications($categories, $page, $filter, \OCP\Util::getVersion()); $apps = []; $i = 0; $l = \OC::$server->getL10N('core'); @@ -1050,7 +1050,7 @@ class OC_App { $config, \OC::$server->getLogger() ); - $appData = $ocsClient->getApplication($app, \OC_Util::getVersion()); + $appData = $ocsClient->getApplication($app, \OCP\Util::getVersion()); // check if app is a shipped app or not. OCS apps have an integer as id, shipped apps use a string if (!is_numeric($app)) { @@ -1080,7 +1080,7 @@ class OC_App { if ($app !== false) { // check if the app is compatible with this version of ownCloud $info = self::getAppInfo($app); - $version = OC_Util::getVersion(); + $version = \OCP\Util::getVersion(); if (!self::isAppCompatible($version, $info)) { throw new \Exception( $l->t('App "%s" cannot be installed because it is not compatible with this version of ownCloud.', |