From 0fc34c99f4e1dbe26e5074102f48f75d70fe97d0 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 a4300785002..eed97e18d94 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 bba4f59555e..802c4b908b4 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) ) { -- 2.39.5