setupLocale(); } /** * return some info */ function getInfo(){ return array( 'author' => 'Andreas Gohr', 'email' => 'andi@splitbrain.org', 'date' => '2005-09-04', 'name' => 'Revert Manager', 'desc' => 'Allows you to mass revert recent edits', 'url' => 'http://wiki.splitbrain.org/plugin:revert', ); } /** * return sort order for position in admin menu */ function getMenuSort() { return 40; } /** * handle user request */ function handle() { } /** * output appropriate html */ function html() { print $this->plugin_locale_xhtml('intro'); if(is_array($_REQUEST['revert'])) $this->_revert($_REQUEST['revert']); echo '
'; echo ''; echo ''; echo '
'; $this->_list($_REQUEST['filter']); } function _revert($revert){ global $conf; echo '
'; foreach($revert as $id){ global $REV; $old = getRevisions($id, 0, 1); $REV = $old[0]; if($REV){ saveWikiText($id,rawWiki($id,$REV),'old revision restored',false); echo "$id reverted to $REV
"; }else{ saveWikiText($id,'','',false); echo "$id removed
"; } @set_time_limit(10); flush(); } echo '

'; } function _list($filter){ global $conf; echo '
'; $recents = getRecents(0,800); print ''; echo ''; echo '
'; } } //Setup VIM: ex: et ts=4 enc=utf-8 :