From d7bbebb8f5749366f265b427a43a923dfb806fe3 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Thu, 11 Aug 2016 00:45:15 +0200 Subject: [PATCH] fix registration of admin settings and section on app install --- lib/private/Installer.php | 1 - lib/private/legacy/app.php | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/private/Installer.php b/lib/private/Installer.php index a430078500..eed97e18d9 100644 --- a/lib/private/Installer.php +++ b/lib/private/Installer.php @@ -135,7 +135,6 @@ class Installer { } \OC_App::setupBackgroundJobs($info['background-jobs']); - \OC::$server->getSettingsManager()->setupSettings($info['settings']); //run appinfo/install.php if((!isset($data['noinstall']) or $data['noinstall']==false)) { diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php index bba4f59555..802c4b908b 100644 --- a/lib/private/legacy/app.php +++ b/lib/private/legacy/app.php @@ -1162,6 +1162,12 @@ class OC_App { if (isset($appData['id'])) { $config->setAppValue($app, 'ocsid', $appData['id']); } + + if(isset($info['settings']) && is_array($info['settings'])) { + self::loadApp($app, false); + \OC::$server->getSettingsManager()->setupSettings($info['settings']); + } + \OC_Hook::emit('OC_App', 'post_enable', array('app' => $app)); } else { if(empty($appName) ) {