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
path: root/core
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-02-03 02:39:01 +0300
committerMorris Jobke <hey@morrisjobke.de>2015-02-03 02:39:01 +0300
commita7eedf014933277ff392824e1a6e62b041da58f8 (patch)
tree7d723d2d5ed605d6ea6b953ca32df9de6cabf2ec /core
parent1bb8d5978cb6e05c81da7c1bb8cb5b33279e1667 (diff)
Disallow disabling of files app
Diffstat (limited to 'core')
-rw-r--r--core/command/app/disable.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/command/app/disable.php b/core/command/app/disable.php
index dcdee92349e..2e028d183bb 100644
--- a/core/command/app/disable.php
+++ b/core/command/app/disable.php
@@ -28,8 +28,12 @@ class Disable extends Command {
protected function execute(InputInterface $input, OutputInterface $output) {
$appId = $input->getArgument('app-id');
if (\OC_App::isEnabled($appId)) {
- \OC_App::disable($appId);
- $output->writeln($appId . ' disabled');
+ try {
+ \OC_App::disable($appId);
+ $output->writeln($appId . ' disabled');
+ } catch(\Exception $e) {
+ $output->writeln($e->getMessage());
+ }
} else {
$output->writeln('No such app enabled: ' . $appId);
}