From a64eec16d2d0bb6f36960279324ff4c67887bfbb Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 27 Jan 2009 19:25:21 +0100 Subject: reverted plugin disabling method back to old behaviour Ignore-this: b5fadadeee9de8e52c41c056cf62be6d With this patch plugins are now disabled by placing a disabled file in the plugin directory again. Even though renaming plugin directories is the method with the fewest disk accesses it makes a lot of trouble with code revision control systems and, more important, Linux package management systems. Future versions of DokuWiki may use a central config file instead. This patch also fixes the problem with the plugin manager not checking the return values of the pugin_(dis|en)able functions correctly. darcs-hash:20090127182521-7ad00-62018a546d49d57582d93298c8228fd71601a5e8.gz --- lib/plugins/plugin/admin.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'lib/plugins/plugin/admin.php') diff --git a/lib/plugins/plugin/admin.php b/lib/plugins/plugin/admin.php index ddd4081a5..c0918c70f 100644 --- a/lib/plugins/plugin/admin.php +++ b/lib/plugins/plugin/admin.php @@ -619,12 +619,20 @@ class ap_manage { switch ($new) { // enable plugin case true : - plugin_enable($plugin); - $count_enabled++; + if(plugin_enable($plugin)){ + msg(sprintf($this->lang['enabled'],$plugin),1); + $count_enabled++; + }else{ + msg(sprintf($this->lang['notenabled'],$plugin),-1); + } break; case false: - plugin_disable($plugin); - $count_disabled++; + if(plugin_disable($plugin)){ + msg(sprintf($this->lang['disabled'],$plugin),1); + $count_disabled++; + }else{ + msg(sprintf($this->lang['notdisabled'],$plugin),-1); + } break; } } @@ -632,7 +640,6 @@ class ap_manage { // refresh plugins, including expiring any dokuwiki cache(s) if ($count_enabled || $count_disabled) { - msg("Plugin state saved, $count_enabled plugins enabled, $count_disabled plugins disabled."); $this->refresh(); } } -- cgit v1.2.3