diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2017-11-01 15:37:29 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2017-11-01 15:37:29 +0100 |
commit | e2805f02aa51c602c581bd4f09b99dd791a42df4 (patch) | |
tree | 4ea194f47aa315874c2aac31c30dbdb14110539b /lib/private/legacy | |
parent | 2b4b3b1986e58305c08941f77a693a80cc3d5b85 (diff) | |
parent | 52b679a2d6f6b273f46334b15534ab312f974a1a (diff) | |
download | nextcloud-server-e2805f02aa51c602c581bd4f09b99dd791a42df4.tar.gz nextcloud-server-e2805f02aa51c602c581bd4f09b99dd791a42df4.zip |
Merge branch 'master' into autocomplete-gui
Diffstat (limited to 'lib/private/legacy')
-rw-r--r-- | lib/private/legacy/app.php | 18 | ||||
-rw-r--r-- | lib/private/legacy/image.php | 2 | ||||
-rw-r--r-- | lib/private/legacy/json.php | 2 | ||||
-rw-r--r-- | lib/private/legacy/template.php | 2 | ||||
-rw-r--r-- | lib/private/legacy/template/functions.php | 2 |
5 files changed, 6 insertions, 20 deletions
diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php index efa2afd7356..49fac2f4d96 100644 --- a/lib/private/legacy/app.php +++ b/lib/private/legacy/app.php @@ -350,6 +350,7 @@ class OC_App { * * @param string $app app * @return bool + * @deprecated 13.0.0 use \OC::$server->getAppManager()->isEnabledForUser($appId) * * This function checks whether or not an app is enabled. */ @@ -869,21 +870,6 @@ class OC_App { return $appList; } - /** - * Returns the internal app ID or false - * @param string $ocsID - * @return string|false - */ - public static function getInternalAppIdByOcs($ocsID) { - if(is_numeric($ocsID)) { - $idArray = \OC::$server->getAppConfig()->getValues(false, 'ocsid'); - if(array_search($ocsID, $idArray)) { - return array_search($ocsID, $idArray); - } - } - return false; - } - public static function shouldUpgrade($app) { $versions = self::getAppVersions(); $currentVersion = OC_App::getAppVersion($app); @@ -1161,7 +1147,7 @@ class OC_App { * @return \OC\Files\View|false */ public static function getStorage($appId) { - if (OC_App::isEnabled($appId)) { //sanity check + if (\OC::$server->getAppManager()->isEnabledForUser($appId)) { //sanity check if (\OC::$server->getUserSession()->isLoggedIn()) { $view = new \OC\Files\View('/' . OC_User::getUser()); if (!$view->file_exists($appId)) { diff --git a/lib/private/legacy/image.php b/lib/private/legacy/image.php index 120b19d1cff..cd5ca7bb5ce 100644 --- a/lib/private/legacy/image.php +++ b/lib/private/legacy/image.php @@ -431,7 +431,7 @@ class OC_Image implements \OCP\IImage { * (I'm open for suggestions on better method name ;) * Fixes orientation based on EXIF data. * - * @return bool. + * @return bool */ public function fixOrientation() { $o = $this->getOrientation(); diff --git a/lib/private/legacy/json.php b/lib/private/legacy/json.php index 180dd7c448d..221a0047eb4 100644 --- a/lib/private/legacy/json.php +++ b/lib/private/legacy/json.php @@ -55,7 +55,7 @@ class OC_JSON{ * @suppress PhanDeprecatedFunction */ public static function checkAppEnabled($app) { - if( !OC_App::isEnabled($app)) { + if( !\OC::$server->getAppManager()->isEnabledForUser($app)) { $l = \OC::$server->getL10N('lib'); self::error(array( 'data' => array( 'message' => $l->t('Application is not enabled'), 'error' => 'application_not_enabled' ))); exit(); diff --git a/lib/private/legacy/template.php b/lib/private/legacy/template.php index 8c6185cd556..55df2dece11 100644 --- a/lib/private/legacy/template.php +++ b/lib/private/legacy/template.php @@ -297,7 +297,7 @@ class OC_Template extends \OC\Template\Base { * @suppress PhanAccessMethodInternal */ public static function printErrorPage( $error_msg, $hint = '' ) { - if (\OC_App::isEnabled('theming') && !\OC_App::isAppLoaded('theming')) { + if (\OC::$server->getAppManager()->isEnabledForUser('theming') && !\OC_App::isAppLoaded('theming')) { \OC_App::loadApp('theming'); } diff --git a/lib/private/legacy/template/functions.php b/lib/private/legacy/template/functions.php index bca16b48c1a..1ef3541e880 100644 --- a/lib/private/legacy/template/functions.php +++ b/lib/private/legacy/template/functions.php @@ -278,7 +278,7 @@ function human_file_size( $bytes ) { /** * Strips the timestamp of its time value * @param int $timestamp UNIX timestamp to strip - * @return $timestamp without time value + * @return int timestamp without time value */ function strip_time($timestamp){ $date = new \DateTime("@{$timestamp}"); |