diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
commit | 63601400e476c6cf43d985f3e7b9864681695ed4 (patch) | |
tree | f7846203a952e38aaf66989d0a4702779f549962 /includes/api/ApiUndelete.php | |
parent | 8ff01378c9e0207f9169b81966a51def645b6a51 (diff) |
Update to MediaWiki 1.20.2
this update includes:
* adjusted Arch Linux skin
* updated FluxBBAuthPlugin
* patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024
Diffstat (limited to 'includes/api/ApiUndelete.php')
-rw-r--r-- | includes/api/ApiUndelete.php | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/includes/api/ApiUndelete.php b/includes/api/ApiUndelete.php index d3429972..c9962517 100644 --- a/includes/api/ApiUndelete.php +++ b/includes/api/ApiUndelete.php @@ -4,7 +4,7 @@ * * Created on Jul 3, 2007 * - * Copyright © 2007 Roan Kattouw <Firstname>.<Lastname>@gmail.com + * Copyright © 2007 Roan Kattouw "<Firstname>.<Lastname>@gmail.com" * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -76,7 +76,7 @@ class ApiUndelete extends ApiBase { $info['title'] = $titleObj->getPrefixedText(); $info['revisions'] = intval( $retval[0] ); $info['fileversions'] = intval( $retval[1] ); - $info['reason'] = intval( $retval[2] ); + $info['reason'] = $retval[2]; $this->getResult()->addValue( null, $this->getModuleName(), $info ); } @@ -94,7 +94,10 @@ class ApiUndelete extends ApiBase { ApiBase::PARAM_TYPE => 'string', ApiBase::PARAM_REQUIRED => true ), - 'token' => null, + 'token' => array( + ApiBase::PARAM_TYPE => 'string', + ApiBase::PARAM_REQUIRED => true + ), 'reason' => '', 'timestamps' => array( ApiBase::PARAM_TYPE => 'timestamp', @@ -116,12 +119,23 @@ class ApiUndelete extends ApiBase { return array( 'title' => 'Title of the page you want to restore', 'token' => 'An undelete token previously retrieved through list=deletedrevs', - 'reason' => 'Reason for restoring (optional)', + 'reason' => 'Reason for restoring', 'timestamps' => 'Timestamps of the revisions to restore. If not set, all revisions will be restored.', 'watchlist' => 'Unconditionally add or remove the page from your watchlist, use preferences or do not change watch', ); } + public function getResultProperties() { + return array( + '' => array( + 'title' => 'string', + 'revisions' => 'integer', + 'filerevisions' => 'integer', + 'reason' => 'string' + ) + ); + } + public function getDescription() { return array( 'Restore certain revisions of a deleted page. A list of deleted revisions (including timestamps) can be', |