]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use appmanager in OC_App::enable/disable
authorRobin Appelman <icewind@owncloud.com>
Mon, 16 Feb 2015 15:44:51 +0000 (16:44 +0100)
committerRobin Appelman <icewind@owncloud.com>
Tue, 17 Feb 2015 14:05:29 +0000 (15:05 +0100)
lib/private/app.php

index 2e640aa2a4040f15253d66eb197b7d4c10b44aca..3f7e46dccd7aaaf6ccb0c64314be383c676c025c 100644 (file)
@@ -261,10 +261,11 @@ class OC_App {
                        $app = self::installApp($app);
                }
 
+               $appManager = \OC::$server->getAppManager();
                if (!is_null($groups)) {
-                       OC_Appconfig::setValue($app, 'enabled', json_encode($groups));
+                       $appManager->enableAppForGroups($app, $groups);
                } else {
-                       OC_Appconfig::setValue($app, 'enabled', 'yes');
+                       $appManager->enableApp($app);
                }
        }
 
@@ -308,7 +309,8 @@ class OC_App {
                self::$enabledAppsCache = array(); // flush
                // check if app is a shipped app or not. if not delete
                \OC_Hook::emit('OC_App', 'pre_disable', array('app' => $app));
-               OC_Appconfig::setValue($app, 'enabled', 'no');
+               $appManager = \OC::$server->getAppManager();
+               $appManager->disableApp($app);
        }
 
        /**