-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correctly remove admin sections and settings #1287
Conversation
@nickvergessen, thanks for your PR! By analyzing the annotation information on this pull request, we identified @blizzz and @LukasReschke to be potential reviewers |
@@ -105,10 +105,10 @@ public function onAppDisabled($appId) { | |||
$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], '\\')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all other methods use get_class which has no leading slash: https://3v4l.org/rquje
LGTM |
1 similar comment
LGTM |
@nickvergessen could you prepare the backports? |
Yes, backport in #1305 |
Steps
See https://help.nextcloud.com/t/usage-report-0-1-5-error-in-logs-if-we-disable-this-app/2963
Expected
nothing
Actually
Each page refresh logs a new QueryException
We can't really create an update step for this, because on update apps are disabled and therefor we can't check, if the class would exist. So manual clean up is required.