Skip to content

Commit

Permalink
Usage of 'disabled' file to control plugins deprecated
Browse files Browse the repository at this point in the history
Plugins with a disabled file will be treated as having an entry (=0) in
conf/plugins.default.php overridable by conf/plugins.local.php
  • Loading branch information
HakanS committed Sep 10, 2011
1 parent 98aafb5 commit 9036904
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions inc/plugincontroller.class.php
Expand Up @@ -140,29 +140,27 @@ protected function _populateMasterList() {
// disabling mechanism was changed back very soon again
// to keep everything simple we just skip the plugin completely
}elseif(@file_exists(DOKU_PLUGIN.$plugin.'/disabled')) {
// treat this as a default disabled plugin(over-rideable by the plugin manager)
// deprecated 2011-09-10 (usage of disabled files)
if(empty($this->plugin_cascade['local'][$plugin]))
$all_plugins[$plugin] = 0;
else
$all_plugins[$plugin] = 1;
//treat this as a default disabled plugin(over-rideable by the plugin manager)
$this->plugin_cascade['default'][$plugin] = 0;
//TODO take this out before final release,
//it is here only for other developers to be able to switch branches easily
//@unlink(DOKU_PLUGIN.$plugin.'/disabled');
continue;

}
elseif((array_key_exists($plugin,$this->tmp_plugins) && $this->tmp_plugins[$plugin] == 0) ||
($plugin === 'plugin' && isset($conf['pluginmanager']) &&
!$conf['pluginmanager'])){
$all_plugins[$plugin] = 0;

} elseif((array_key_exists($plugin,$this->tmp_plugins) && $this->tmp_plugins[$plugin] == 1)) {
$all_plugins[$plugin] = 1;
} else {
$all_plugins[$plugin] = 1;
}
}
$this->tmp_plugins = $all_plugins;
$this->saveList();
}
}

Expand Down

0 comments on commit 9036904

Please sign in to comment.