Skip to content

Commit 1d04c9e

Browse files
authored
Merge pull request #1287 from nextcloud/correctly-remove-admin-stuff
Correctly remove admin sections and settings
2 parents c8ec237 + 43ff2f0 commit 1d04c9e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/private/Settings/Manager.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ public function onAppDisabled($appId) {
105105
$appInfo = \OC_App::getAppInfo($appId); // hello static legacy
106106

107107
if(isset($appInfo['settings'][IManager::KEY_ADMIN_SECTION])) {
108-
$this->remove(self::TABLE_ADMIN_SECTIONS, $appInfo['settings'][IManager::KEY_ADMIN_SECTION]);
108+
$this->remove(self::TABLE_ADMIN_SECTIONS, trim($appInfo['settings'][IManager::KEY_ADMIN_SECTION], '\\'));
109109
}
110110
if(isset($appInfo['settings'][IManager::KEY_ADMIN_SETTINGS])) {
111-
$this->remove(self::TABLE_ADMIN_SETTINGS, $appInfo['settings'][IManager::KEY_ADMIN_SETTINGS]);
111+
$this->remove(self::TABLE_ADMIN_SETTINGS, trim($appInfo['settings'][IManager::KEY_ADMIN_SETTINGS], '\\'));
112112
}
113113
}
114114

@@ -302,7 +302,7 @@ private function setupAdminSettings($settingsClassName) {
302302

303303
if(!$settings instanceof ISettings) {
304304
$this->log->error(
305-
'Admin section instance must implement \OCP\ISection. Invalid class: {class}',
305+
'Admin section instance must implement \OCP\Settings\ISection. Invalid class: {class}',
306306
['class' => $settingsClassName]
307307
);
308308
return;

0 commit comments

Comments
 (0)