diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-10-21 15:14:19 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-10-21 15:14:19 +0200 |
commit | fbad651ebd31d09406ef141e61ea396ad1eda710 (patch) | |
tree | b57b142031c4e291856cc607fb3697b537b48b49 /config | |
parent | b02f22f86b6e89483948e5bf9605558a78046efd (diff) |
Make config.ini editable in the admin interface
Diffstat (limited to 'config')
-rw-r--r-- | config/appconfig.php | 26 | ||||
-rw-r--r-- | config/schema.json | 3 |
2 files changed, 26 insertions, 3 deletions
diff --git a/config/appconfig.php b/config/appconfig.php index 89c02a1de..e738b22cd 100644 --- a/config/appconfig.php +++ b/config/appconfig.php @@ -13,11 +13,11 @@ namespace OCA\News\Config; -use OCP\INavigationManager; -use OCP\IURLGenerator; +use \OCP\INavigationManager; +use \OCP\IURLGenerator; use \OCP\Backgroundjob; use \OCP\Util; - +use \OCP\App; // Used to parse app.json file, should be in core at some point class AppConfig { @@ -98,6 +98,17 @@ class AppConfig { /** + * Registers all config options + */ + public function registerAll() { + $this->registerNavigation(); + $this->registerBackgroundJobs(); + $this->registerHooks(); + $this->registerAdmin(); + } + + + /** * Parses the navigation and creates a navigation entry if needed */ public function registerNavigation() { @@ -120,6 +131,15 @@ class AppConfig { } + /** + * Registers admin pages + */ + public function registerAdmin() { + if ($this->config['admin']) { + App::registerAdmin($this->config['id'], 'admin/admin'); + } + } + /** * Registers all jobs in the config diff --git a/config/schema.json b/config/schema.json index 7e44878c9..c65a1c8dd 100644 --- a/config/schema.json +++ b/config/schema.json @@ -16,6 +16,9 @@ "type": "string", "enum": ["AGPL", "MIT", "GPL", "LGPL", "BSD","Apache"] }, + "admin": { + "type": "boolean" + }, "version": { "type": "string", "pattern": "^[0-9]+(\\.[0-9]+)*$" |