summaryrefslogtreecommitdiff
path: root/includes/api/ApiUndelete.php
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:30:02 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:30:02 -0400
commit1de335ad3f395ca6861085393ba366a9e3fb4a0d (patch)
treef1fdd326034e05177596851be6a7127615d81498 /includes/api/ApiUndelete.php
parent9c75fa8ff6d4d38ef552c00fef5969fb154765e8 (diff)
parentf6d65e533c62f6deb21342d4901ece24497b433e (diff)
Merge commit 'f6d65'
# Conflicts: # skins/ArchLinux/ArchLinux.php
Diffstat (limited to 'includes/api/ApiUndelete.php')
-rw-r--r--includes/api/ApiUndelete.php36
1 files changed, 7 insertions, 29 deletions
diff --git a/includes/api/ApiUndelete.php b/includes/api/ApiUndelete.php
index 07aad9f5..c23e9ff6 100644
--- a/includes/api/ApiUndelete.php
+++ b/includes/api/ApiUndelete.php
@@ -69,7 +69,7 @@ class ApiUndelete extends ApiBase {
}
if ( $retval[1] ) {
- wfRunHooks( 'FileUndeleteComplete',
+ Hooks::run( 'FileUndeleteComplete',
array( $titleObj, $params['fileids'], $this->getUser(), $params['reason'] ) );
}
@@ -117,39 +117,17 @@ class ApiUndelete extends ApiBase {
);
}
- public function getParamDescription() {
- return array(
- 'title' => 'Title of the page you want to restore',
- 'reason' => 'Reason for restoring',
- 'timestamps' => array(
- 'Timestamps of the revisions to restore.',
- 'If both timestamps and fileids are empty, all will be restored.',
- ),
- 'fileids' => array(
- 'IDs of the file revisions to restore.',
- 'If both timestamps and fileids are empty, all will be restored.',
- ),
- 'watchlist' => 'Unconditionally add or remove the page from your ' .
- 'watchlist, use preferences or do not change watch',
- );
- }
-
- public function getDescription() {
- return array(
- 'Restore certain revisions of a deleted page. A list of deleted revisions ',
- '(including timestamps) can be retrieved through list=deletedrevs, and a list',
- 'of deleted file ids can be retrieved through list=filearchive.'
- );
- }
-
public function needsToken() {
return 'csrf';
}
- public function getExamples() {
+ protected function getExamplesMessages() {
return array(
- 'api.php?action=undelete&title=Main%20Page&token=123ABC&reason=Restoring%20main%20page',
- 'api.php?action=undelete&title=Main%20Page&token=123ABC&timestamps=20070703220045|20070702194856'
+ 'action=undelete&title=Main%20Page&token=123ABC&reason=Restoring%20main%20page'
+ => 'apihelp-undelete-example-page',
+ 'action=undelete&title=Main%20Page&token=123ABC' .
+ '&timestamps=2007-07-03T22:00:45Z|2007-07-02T19:48:56Z'
+ => 'apihelp-undelete-example-revisions',
);
}