diff options
author | ahriman <ahriman@falte.red> | 2019-01-02 04:57:35 +0000 |
---|---|---|
committer | ahriman <ahriman@falte.red> | 2019-01-02 04:57:35 +0000 |
commit | 2bd7f83a6495011ada78ca8a9f2af417caf01760 (patch) | |
tree | f9acdb7f09e011c65330ab993d4db3620787dbfb /wiki/inc/Action/Revert.php | |
parent | bcb215c3a7e914d05f166846a33860e48bba64fb (diff) | |
download | site-2bd7f83a6495011ada78ca8a9f2af417caf01760.tar.gz |
removed dokuwiki
Diffstat (limited to 'wiki/inc/Action/Revert.php')
-rw-r--r-- | wiki/inc/Action/Revert.php | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/wiki/inc/Action/Revert.php b/wiki/inc/Action/Revert.php deleted file mode 100644 index ca35374..0000000 --- a/wiki/inc/Action/Revert.php +++ /dev/null @@ -1,65 +0,0 @@ -<?php - -namespace dokuwiki\Action; - -use dokuwiki\Action\Exception\ActionAbort; -use dokuwiki\Action\Exception\ActionException; - -/** - * Class Revert - * - * Quick revert to an old revision - * - * @package dokuwiki\Action - */ -class Revert extends AbstractAction { - - /** @inheritdoc */ - public function minimumPermission() { - global $INFO; - if($INFO['ismanager']) { - return AUTH_EDIT; - } else { - return AUTH_ADMIN; - } - } - - /** - * - * @inheritdoc - * @throws ActionAbort - * @throws ActionException - * @todo check for writability of the current page ($INFO might do it wrong and check the attic version) - */ - public function preProcess() { - if(!checkSecurityToken()) throw new ActionException(); - - global $ID; - global $REV; - global $lang; - - // when no revision is given, delete current one - // FIXME this feature is not exposed in the GUI currently - $text = ''; - $sum = $lang['deleted']; - if($REV) { - $text = rawWiki($ID, $REV); - if(!$text) throw new ActionException(); //something went wrong - $sum = sprintf($lang['restored'], dformat($REV)); - } - - // spam check - if(checkwordblock($text)) { - msg($lang['wordblock'], -1); - throw new ActionException('edit'); - } - - saveWikiText($ID, $text, $sum, false); - msg($sum, 1); - $REV = ''; - - // continue with draftdel -> redirect -> show - throw new ActionAbort('draftdel'); - } - -} |