use config for firguring out if an extension is protected

This commit is contained in:
Andreas Gohr 2014-01-05 20:29:14 +01:00
parent 220ab8d2df
commit 16660d32b7
2 changed files with 9 additions and 6 deletions

View File

@ -4,8 +4,8 @@
* from changes by the extention manager. These settings will override any local settings.
* It is not recommended to change this file, as it is overwritten on DokuWiki upgrades.
*/
$plugins['acl'] = 1;
$plugins['plugin'] = 1;
$plugins['config'] = 1;
$plugins['usermanager'] = 1;
$plugins['revert'] = 1;
$plugins['acl'] = 1;
$plugins['plugin'] = 1;
$plugins['config'] = 1;
$plugins['usermanager'] = 1;
$plugins['template:dokuwiki'] = 1; // not a plugin, but this should not be uninstalled either

View File

@ -107,7 +107,10 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin {
* @return bool if the extension is protected
*/
public function isProtected() {
return in_array($this->id, array('acl', 'config', 'info', 'plugin', 'revert', 'usermanager', 'template:dokuwiki'));
/** @var Doku_Plugin_Controller $plugin_controller */
global $plugin_controller;
$cascade = $plugin_controller->getCascade();
return (isset($cascade['protected'][$this->id]) && $cascade['protected'][$this->id]);
}
/**