just not handle enable/disable for templates for now
This commit is contained in:
parent
7ca0915cf6
commit
9597c3b83b
|
@ -632,10 +632,11 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin {
|
|||
*/
|
||||
public function enable() {
|
||||
if ($this->isTemplate()) return $this->getLang('notimplemented');
|
||||
/* @var Doku_Plugin_Controller $plugin_controller */
|
||||
global $plugin_controller;
|
||||
if (!$this->isInstalled()) return $this->getLang('notinstalled');
|
||||
if ($this->isEnabled()) return $this->getLang('alreadyenabled');
|
||||
|
||||
/* @var Doku_Plugin_Controller $plugin_controller */
|
||||
global $plugin_controller;
|
||||
if ($plugin_controller->enable($this->base)) {
|
||||
$this->purgeCache();
|
||||
return true;
|
||||
|
|
|
@ -468,11 +468,9 @@ class helper_plugin_extension_list extends DokuWiki_Plugin {
|
|||
$errors .= '<p class="permerror">'.$this->getLang($canmod).'</p>';
|
||||
}
|
||||
|
||||
if (!$extension->isProtected()) {
|
||||
if (!$extension->isProtected() && !$extension->isTemplate()) { // no enable/disable for templates
|
||||
if ($extension->isEnabled()) {
|
||||
if(!$extension->isTemplate()){ // templates can't be disabled, only another can be enabled
|
||||
$return .= $this->make_action('disable', $extension);
|
||||
}
|
||||
$return .= $this->make_action('disable', $extension);
|
||||
} else {
|
||||
$return .= $this->make_action('enable', $extension);
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
These are the templates currently installed in your DokuWiki. Note that only one template can be activated at a time.
|
||||
These are the templates currently installed in your DokuWiki. You can select template to be used in the [[?do=admin&page=config|Configuration Manager]].
|
||||
|
|
Loading…
Reference in New Issue