summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2016-08-15 20:03:19 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2016-08-16 00:56:17 +0200
commit9edca39b49f6b7fcfc4e43b61b88204222ad5e91 (patch)
tree71dbdb71ecb3eaa7659ad2be9b89f6db13e3a8b0 /lib/base.php
parent6c6338b81072ba58b662d2f03cab6cfdbfdf4a18 (diff)
downloadnextcloud-server-9edca39b49f6b7fcfc4e43b61b88204222ad5e91.tar.gz
nextcloud-server-9edca39b49f6b7fcfc4e43b61b88204222ad5e91.zip
attempt to remove section and settings entries when an app got disabled
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php
index 3457a74e989..9e56bc09f01 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -725,6 +725,7 @@ class OC {
self::registerLogRotate();
self::registerEncryptionWrapper();
self::registerEncryptionHooks();
+ self::registerSettingsHooks();
//make sure temporary files are cleaned up
$tmpManager = \OC::$server->getTempManager();
@@ -803,6 +804,14 @@ class OC {
}
}
+ public static function registerSettingsHooks() {
+ $dispatcher = \OC::$server->getEventDispatcher();
+ $dispatcher->addListener(OCP\App\ManagerEvent::EVENT_APP_DISABLE, function($event) {
+ /** @var \OCP\App\ManagerEvent $event */
+ \OC::$server->getSettingsManager()->onAppDisabled($event->getAppID());
+ });
+ }
+
private static function registerEncryptionWrapper() {
$manager = self::$server->getEncryptionManager();
\OCP\Util::connectHook('OC_Filesystem', 'preSetup', $manager, 'setupStorage');