use config for firguring out if an extension is protected
This commit is contained in:
parent
220ab8d2df
commit
16660d32b7
|
@ -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
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue