summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorHakan Sandell <sandell.hakan@gmail.com>2011-09-10 19:47:00 +0200
committerHakan Sandell <sandell.hakan@gmail.com>2011-09-10 19:47:00 +0200
commita95a7bf3a77d3c38a54af67b2f7584c480381691 (patch)
treebbc06af48439844936602b64c0aafde3178c7012 /inc
parentc8f071abd276c4c381eacabead655799db4a7a2f (diff)
downloadrpg-a95a7bf3a77d3c38a54af67b2f7584c480381691.tar.gz
rpg-a95a7bf3a77d3c38a54af67b2f7584c480381691.tar.bz2
empty conf/plugins.local is created if not existing
Diffstat (limited to 'inc')
-rw-r--r--inc/plugincontroller.class.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/inc/plugincontroller.class.php b/inc/plugincontroller.class.php
index cdaee2e8f..734331c94 100644
--- a/inc/plugincontroller.class.php
+++ b/inc/plugincontroller.class.php
@@ -158,6 +158,9 @@ class Doku_Plugin_Controller {
}
}
$this->tmp_plugins = $all_plugins;
+ if (!file_exists($this->last_local_config_file)) {
+ $this->saveList(true);
+ }
}
}
@@ -178,17 +181,18 @@ class Doku_Plugin_Controller {
/**
* Save the current list of plugins
*/
- function saveList() {
+ function saveList($forceSave = false) {
global $conf;
if (empty($this->tmp_plugins)) return false;
// Rebuild list of local settings
$local_plugins = $this->rebuildLocal();
- if($local_plugins != $this->plugin_cascade['local']) {
+ if($local_plugins != $this->plugin_cascade['local'] || $forceSave) {
$file = $this->last_local_config_file;
- $out = "<?php\n/*\n * Local plugin enable/disable settings\n * Auto-generated through plugin/extension manager\n".
- " * NOTE: plugins with a 'disabled' file will not be added to this file unless they are enabled which overrides the 'disabled' file\n */\n";
+ $out = "<?php\n/*\n * Local plugin enable/disable settings\n * Auto-generated through plugin/extension manager\n *\n".
+ " * NOTE: Plugins will not be added to this file unless there is a need to override a default setting. Plugins are\n".
+ " * enabled by default, unless having a 'disabled' file in their plugin folder.\n */\n";
foreach ($local_plugins as $plugin => $value) {
$out .= "\$plugins['$plugin'] = $value;\n";
}