Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-10-06 13:36:32 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2015-10-06 13:36:32 +0300
commit6651aa19ea8f0a617bcf22126e8cda70466400af (patch)
treeeaf07e12c2b660b04e8b2de0a82a25c3fa4f424a /settings/ajax
parent319e61f0eabe02847c4dccdb9db86dc3181d7540 (diff)
parent999196b9fb2a16822ca0fb6effebbdf52adc374b (diff)
Merge pull request #19526 from owncloud/issue-16251-reload-app-settings-when-app-needs-update
Reload the page when an app needs an update after being enabled
Diffstat (limited to 'settings/ajax')
-rw-r--r--settings/ajax/enableapp.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/settings/ajax/enableapp.php b/settings/ajax/enableapp.php
index 5e0aba1ce7e..04b92283f3e 100644
--- a/settings/ajax/enableapp.php
+++ b/settings/ajax/enableapp.php
@@ -29,8 +29,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()) ));