diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-10-02 12:15:07 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-05 22:07:24 +0200 |
commit | 69d68fbe8e2f9771a9542d11bdaf10b129a04fcf (patch) | |
tree | 880c2ac26f16eeb95320351977177ecd81a1a912 /settings/ajax/enableapp.php | |
parent | 0577eed14e5c4be25afd541c71c2b75b4ad5f9c7 (diff) | |
download | nextcloud-server-69d68fbe8e2f9771a9542d11bdaf10b129a04fcf.tar.gz nextcloud-server-69d68fbe8e2f9771a9542d11bdaf10b129a04fcf.zip |
Reload the page when an app needs an update after being enabled
Diffstat (limited to 'settings/ajax/enableapp.php')
-rw-r--r-- | settings/ajax/enableapp.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/settings/ajax/enableapp.php b/settings/ajax/enableapp.php index 55298430e28..af80193ebc4 100644 --- a/settings/ajax/enableapp.php +++ b/settings/ajax/enableapp.php @@ -28,8 +28,9 @@ OCP\JSON::callCheck(); $groups = isset($_POST['groups']) ? (array)$_POST['groups'] : null; try { - OC_App::enable(OC_App::cleanAppId((string)$_POST['appid']), $groups); - OC_JSON::success(); + $app = OC_App::cleanAppId((string)$_POST['appid']); + OC_App::enable($app, $groups); + OC_JSON::success(['data' => ['update_required' => \OC_App::shouldUpgrade($app)]]); } catch (Exception $e) { \OCP\Util::writeLog('core', $e->getMessage(), \OCP\Util::ERROR); OC_JSON::error(array("data" => array("message" => $e->getMessage()) )); |