aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTobia De Koninck <tobia@ledfan.be>2018-02-13 08:03:06 +0100
committerMorris Jobke <hey@morrisjobke.de>2018-03-06 10:45:20 +0100
commit55b9a5d88689f41fa6ae7f7858bc800a495f4b74 (patch)
treeb4edb7fa260532f19267d9e03b11e01dd26cd4e6 /lib
parent539fdaea1efa7fa35b321031554af8703d00737c (diff)
downloadnextcloud-server-55b9a5d88689f41fa6ae7f7858bc800a495f4b74.tar.gz
nextcloud-server-55b9a5d88689f41fa6ae7f7858bc800a495f4b74.zip
Remove OC_App::disable method
Signed-off-by: Tobia De Koninck <tobia@ledfan.be>
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php2
-rw-r--r--lib/private/Updater.php2
-rw-r--r--lib/private/legacy/app.php16
3 files changed, 3 insertions, 17 deletions
diff --git a/lib/base.php b/lib/base.php
index c5eabe1910a..f0e139d92c8 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -949,7 +949,7 @@ class OC {
$appIds = (array)$request->getParam('appid');
foreach($appIds as $appId) {
$appId = \OC_App::cleanAppId($appId);
- \OC_App::disable($appId);
+ \OC::$server->getAppManager()->disableApp($appId);
}
\OC_JSON::success();
exit();
diff --git a/lib/private/Updater.php b/lib/private/Updater.php
index c70113e1c7d..4dc8edc0272 100644
--- a/lib/private/Updater.php
+++ b/lib/private/Updater.php
@@ -395,7 +395,7 @@ class Updater extends BasicEmitter {
if ($appManager->isShipped($app)) {
throw new \UnexpectedValueException('The files of the app "' . $app . '" were not correctly replaced before running the update');
}
- OC_App::disable($app);
+ \OC::$server->getAppManager()->disableApp($app);
$this->emit('\OC\Updater', 'incompatibleAppDisabled', array($app));
}
// no need to disable any app in case this is a non-core upgrade
diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php
index eba29d27cf8..303afa797dc 100644
--- a/lib/private/legacy/app.php
+++ b/lib/private/legacy/app.php
@@ -154,7 +154,7 @@ class OC_App {
\OC::$server->getLogger()->logException($ex);
if (!\OC::$server->getAppManager()->isShipped($app)) {
// Only disable apps which are not shipped
- self::disable($app);
+ \OC::$server->getAppManager()->disableApp($app);
}
}
if (self::isType($app, array('authentication'))) {
@@ -422,20 +422,6 @@ class OC_App {
}
/**
- * This function set an app as disabled in appconfig.
- *
- * @param string $app app
- * @throws Exception
- */
- public static function disable(string $app) {
- // flush
- self::$enabledAppsCache = [];
-
- $appManager = \OC::$server->getAppManager();
- $appManager->disableApp($app);
- }
-
- /**
* Get the path where to install apps
*
* @return string|false