]> source.dussan.org Git - nextcloud-server.git/commitdiff
Correctly remove admin sections and settings 1287/head
authorJoas Schilling <coding@schilljs.com>
Tue, 6 Sep 2016 12:37:09 +0000 (14:37 +0200)
committerJoas Schilling <coding@schilljs.com>
Tue, 6 Sep 2016 12:37:09 +0000 (14:37 +0200)
lib/private/Settings/Manager.php

index df2f52f816d74c6f8a4161240a0316cff28e18ea..e7be3d4e77de7ee747d86ba3f52475449428b7b2 100644 (file)
@@ -105,10 +105,10 @@ class Manager implements IManager {
                $appInfo = \OC_App::getAppInfo($appId); // hello static legacy
 
                if(isset($appInfo['settings'][IManager::KEY_ADMIN_SECTION])) {
-                       $this->remove(self::TABLE_ADMIN_SECTIONS, $appInfo['settings'][IManager::KEY_ADMIN_SECTION]);
+                       $this->remove(self::TABLE_ADMIN_SECTIONS, trim($appInfo['settings'][IManager::KEY_ADMIN_SECTION], '\\'));
                }
                if(isset($appInfo['settings'][IManager::KEY_ADMIN_SETTINGS])) {
-                       $this->remove(self::TABLE_ADMIN_SETTINGS, $appInfo['settings'][IManager::KEY_ADMIN_SETTINGS]);
+                       $this->remove(self::TABLE_ADMIN_SETTINGS, trim($appInfo['settings'][IManager::KEY_ADMIN_SETTINGS], '\\'));
                }
        }
 
@@ -302,7 +302,7 @@ class Manager implements IManager {
 
                if(!$settings instanceof ISettings) {
                        $this->log->error(
-                               'Admin section instance must implement \OCP\ISection. Invalid class: {class}',
+                               'Admin section instance must implement \OCP\Settings\ISection. Invalid class: {class}',
                                ['class' => $settingsClassName]
                        );
                        return;