From 122b469f774df8026a8a6182d2bc026ae1a06e2b Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 10 Nov 2006 14:41:18 +0100 Subject: revert manager GUI updates darcs-hash:20061110134118-7ad00-097d4a23980d0eda38116ee6e05e79e5f8882cc2.gz --- lib/plugins/revert/admin.php | 100 ++++++++++++++++++++++------------- lib/plugins/revert/lang/en/intro.txt | 4 ++ lib/plugins/revert/lang/en/lang.php | 10 ++++ 3 files changed, 77 insertions(+), 37 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/revert/admin.php b/lib/plugins/revert/admin.php index 9e2a290dc..879cd961c 100644 --- a/lib/plugins/revert/admin.php +++ b/lib/plugins/revert/admin.php @@ -25,7 +25,7 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin { return array( 'author' => 'Andreas Gohr', 'email' => 'andi@splitbrain.org', - 'date' => '2005-09-04', + 'date' => '2005-11-10', 'name' => 'Revert Manager', 'desc' => 'Allows you to mass revert recent edits', 'url' => 'http://wiki.splitbrain.org/plugin:revert', @@ -49,63 +49,88 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin { * output appropriate html */ function html() { - print $this->plugin_locale_xhtml('intro'); - if(is_array($_REQUEST['revert'])) $this->_revert($_REQUEST['revert']); + echo $this->plugin_locale_xhtml('intro'); + $this->_searchform(); - echo '
'; - echo ''; - echo ''; - echo '
'; + if(is_array($_REQUEST['revert'])){ + $this->_revert($_REQUEST['revert']); + }elseif(isset($_REQUEST['filter'])){ + $this->_list($_REQUEST['filter']); + } + } - $this->_list($_REQUEST['filter']); + /** + * Display the form for searching spam pages + */ + function _searchform(){ + global $lang; + echo '
'; + echo ''; + echo ''; + echo ''; + echo ' '.$this->getLang('note').''; + echo '


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

'; + echo '

'.$this->getLang('revstart').'

'; + + echo '

'; + echo ''; + + echo '

'.$this->getLang('revstop').'

'; } + /** + * List recent edits matching the given filter + */ function _list($filter){ global $conf; - echo '
'; + echo '

'; + echo ''; + echo ''; $recents = getRecents(0,800); - print ''; + + echo ''; - echo ''; echo '
'; } diff --git a/lib/plugins/revert/lang/en/intro.txt b/lib/plugins/revert/lang/en/intro.txt index 813891017..e3db66b81 100644 --- a/lib/plugins/revert/lang/en/intro.txt +++ b/lib/plugins/revert/lang/en/intro.txt @@ -1,2 +1,6 @@ ====== Revert Manager ====== +This page helps you with the automatic reversion of a spam attack. +To find a list of spammy pages first enter a search string (eg. a +spam URL), then confirm that the found pages are really spam and +revert the edits. diff --git a/lib/plugins/revert/lang/en/lang.php b/lib/plugins/revert/lang/en/lang.php index 8df31508c..aac5f3188 100644 --- a/lib/plugins/revert/lang/en/lang.php +++ b/lib/plugins/revert/lang/en/lang.php @@ -13,4 +13,14 @@ $lang['menu'] = 'Revert Manager'; // custom language strings for the plugin +$lang['filter'] = 'Search spammy pages'; +$lang['note'] = 'Note: this search is case sensitive'; +$lang['revert'] = 'Revert selected edits'; +$lang['reverted'] = '%s reverted to revision %s'; +$lang['removed'] = '%s removed'; +$lang['revstart'] = 'Reversion process started. This can take a long time. If the + script times out before finishing, you need to revert in smaller + chunks.'; +$lang['revstop'] = 'Reversion process finished successful.'; + //Setup VIM: ex: et ts=4 enc=utf-8 : -- cgit v1.2.3