summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-10-23 23:31:17 +0200
committerMorris Jobke <hey@morrisjobke.de>2017-10-23 23:31:17 +0200
commitf884e762bcf3e1737f1cdd5a4453ca0664087b61 (patch)
treeb0f2ac05efef64c98aac9b21588cc32812cc7acc /lib/private/legacy
parentdb1096bcfdf2336ccf6aefb70dd902a63ed615db (diff)
downloadnextcloud-server-f884e762bcf3e1737f1cdd5a4453ca0664087b61.tar.gz
nextcloud-server-f884e762bcf3e1737f1cdd5a4453ca0664087b61.zip
Use appmanager instead of OC_App for check for enabled app
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/legacy')
-rw-r--r--lib/private/legacy/app.php2
-rw-r--r--lib/private/legacy/json.php2
-rw-r--r--lib/private/legacy/template.php2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php
index bd261b05e51..9b25810ca98 100644
--- a/lib/private/legacy/app.php
+++ b/lib/private/legacy/app.php
@@ -1159,7 +1159,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/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');
}