From 90f99567851007c1b66514527d4e3a065e0f07eb Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 22 Apr 2007 16:15:19 +0200 Subject: revert manager now reverts back to the last non-spammy revision darcs-hash:20070422141519-7ad00-c51db646b2e7cb0f24395604c039b2ea9a576883.gz --- lib/plugins/revert/admin.php | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) (limited to 'lib/plugins/revert/admin.php') diff --git a/lib/plugins/revert/admin.php b/lib/plugins/revert/admin.php index 5c5d98ab6..c7c371bfa 100644 --- a/lib/plugins/revert/admin.php +++ b/lib/plugins/revert/admin.php @@ -9,7 +9,11 @@ require_once(DOKU_INC.'inc/changelog.php'); * need to inherit from this class */ class admin_plugin_revert extends DokuWiki_Admin_Plugin { - var $cmd; + var $cmd; + // some vars which might need tuning later + var $max_lines = 800; // lines to read from changelog + var $max_revs = 20; // numer of old revisions to check + /** * Constructor @@ -25,7 +29,7 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin { return array( 'author' => 'Andreas Gohr', 'email' => 'andi@splitbrain.org', - 'date' => '2005-11-10', + 'date' => '2007-04-22', 'name' => 'Revert Manager', 'desc' => 'Allows you to mass revert recent edits', 'url' => 'http://wiki.splitbrain.org/plugin:revert', @@ -62,7 +66,7 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin { $this->_searchform(); if(is_array($_REQUEST['revert'])){ - $this->_revert($_REQUEST['revert']); + $this->_revert($_REQUEST['revert'],$_REQUEST['filter']); }elseif(isset($_REQUEST['filter'])){ $this->_list($_REQUEST['filter']); } @@ -77,14 +81,14 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin { echo ''; echo ''; echo ''; - echo ' '.$this->getLang('note').''; + echo ' '.$this->getLang('note1').''; echo '

'; } /** * Start the reversion process */ - function _revert($revert){ + function _revert($revert,$filter){ global $conf; echo '

'; @@ -93,14 +97,23 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin { echo '