summaryrefslogtreecommitdiffstats
path: root/settings/ajax/enableapp.php
diff options
context:
space:
mode:
Diffstat (limited to 'settings/ajax/enableapp.php')
-rw-r--r--settings/ajax/enableapp.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/settings/ajax/enableapp.php b/settings/ajax/enableapp.php
index db4503f20e7..b378b3c918d 100644
--- a/settings/ajax/enableapp.php
+++ b/settings/ajax/enableapp.php
@@ -31,8 +31,10 @@ OCP\JSON::callCheck();
$groups = isset($_POST['groups']) ? (array)$_POST['groups'] : null;
try {
- $app = OC_App::cleanAppId((string)$_POST['appid']);
- OC_App::enable($app, $groups);
+ $app = new OC_App();
+ $appId = (string)$_POST['appid'];
+ $appId = OC_App::cleanAppId($appId);
+ $app->enable($appId, $groups);
OC_JSON::success(['data' => ['update_required' => \OC_App::shouldUpgrade($app)]]);
} catch (Exception $e) {
\OCP\Util::writeLog('core', $e->getMessage(), \OCP\Util::ERROR);