summaryrefslogtreecommitdiff
path: root/includes/actions/RevertAction.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/actions/RevertAction.php')
-rw-r--r--includes/actions/RevertAction.php22
1 files changed, 8 insertions, 14 deletions
diff --git a/includes/actions/RevertAction.php b/includes/actions/RevertAction.php
index bcb8cd8b..f9497f4b 100644
--- a/includes/actions/RevertAction.php
+++ b/includes/actions/RevertAction.php
@@ -17,7 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*
* @file
- * @ingroup Action
+ * @ingroup Actions
* @ingroup Media
* @author Alexandre Emsenhuber
* @author Rob Church <robchur@gmail.com>
@@ -26,7 +26,7 @@
/**
* Dummy class for pages not in NS_FILE
*
- * @ingroup Action
+ * @ingroup Actions
*/
class RevertAction extends Action {
@@ -34,10 +34,6 @@ class RevertAction extends Action {
return 'revert';
}
- public function getRestriction() {
- return 'read';
- }
-
public function show() {
$this->getOutput()->showErrorPage( 'nosuchaction', 'nosuchactiontext' );
}
@@ -48,7 +44,7 @@ class RevertAction extends Action {
/**
* Class for pages in NS_FILE
*
- * @ingroup Action
+ * @ingroup Actions
*/
class RevertFileAction extends FormAction {
protected $oldFile;
@@ -95,7 +91,7 @@ class RevertFileAction extends FormAction {
'vertical-label' => true,
'raw' => true,
'default' => wfMsgExt( 'filerevert-intro', 'parse', $this->getTitle()->getText(),
- $this->getLang()->date( $timestamp, true ), $this->getLang()->time( $timestamp, true ),
+ $this->getLanguage()->date( $timestamp, true ), $this->getLanguage()->time( $timestamp, true ),
wfExpandUrl( $this->page->getFile()->getArchiveUrl( $this->getRequest()->getText( 'oldimage' ) ),
PROTO_CURRENT
) )
@@ -119,8 +115,8 @@ class RevertFileAction extends FormAction {
public function onSuccess() {
$timestamp = $this->oldFile->getTimestamp();
$this->getOutput()->addHTML( wfMsgExt( 'filerevert-success', 'parse', $this->getTitle()->getText(),
- $this->getLang()->date( $timestamp, true ),
- $this->getLang()->time( $timestamp, true ),
+ $this->getLanguage()->date( $timestamp, true ),
+ $this->getLanguage()->time( $timestamp, true ),
wfExpandUrl( $this->page->getFile()->getArchiveUrl( $this->getRequest()->getText( 'oldimage' ) ),
PROTO_CURRENT
) ) );
@@ -132,9 +128,7 @@ class RevertFileAction extends FormAction {
}
protected function getDescription() {
- return wfMsg(
- 'filerevert-backlink',
- Linker::linkKnown( $this->getTitle() )
- );
+ $this->getOutput()->addBacklinkSubtitle( $this->getTitle() );
+ return '';
}
}