aboutsummaryrefslogtreecommitdiffstats
path: root/includes/api
diff options
context:
space:
mode:
Diffstat (limited to 'includes/api')
-rw-r--r--includes/api/ApiBlock.php4
-rw-r--r--includes/api/ApiDelete.php4
-rw-r--r--includes/api/ApiEditPage.php4
-rw-r--r--includes/api/ApiEmailUser.php4
-rw-r--r--includes/api/ApiExpandTemplates.php4
-rw-r--r--includes/api/ApiFeedContributions.php4
-rw-r--r--includes/api/ApiFeedWatchlist.php4
-rw-r--r--includes/api/ApiFileRevert.php14
-rw-r--r--includes/api/ApiFormatBase.php4
-rw-r--r--includes/api/ApiHelp.php8
-rw-r--r--includes/api/ApiImport.php4
-rw-r--r--includes/api/ApiMove.php4
-rw-r--r--includes/api/ApiOpenSearch.php6
-rw-r--r--includes/api/ApiParse.php4
-rw-r--r--includes/api/ApiPatrol.php4
-rw-r--r--includes/api/ApiProtect.php4
-rw-r--r--includes/api/ApiPurge.php4
-rw-r--r--includes/api/ApiRollback.php4
-rw-r--r--includes/api/ApiUnblock.php4
-rw-r--r--includes/api/ApiUndelete.php4
-rw-r--r--includes/api/ApiUpload.php6
-rw-r--r--includes/api/ApiUserrights.php4
-rw-r--r--includes/api/ApiWatch.php4
23 files changed, 103 insertions, 7 deletions
diff --git a/includes/api/ApiBlock.php b/includes/api/ApiBlock.php
index 94a85464f23f..d3df26465954 100644
--- a/includes/api/ApiBlock.php
+++ b/includes/api/ApiBlock.php
@@ -215,6 +215,10 @@ class ApiBlock extends ApiBase {
);
}
+ public function getHelpUrls() {
+ return 'http://www.mediawiki.org/wiki/API:Block';
+ }
+
public function getVersion() {
return __CLASS__ . ': $Id$';
}
diff --git a/includes/api/ApiDelete.php b/includes/api/ApiDelete.php
index 979e8e12637c..ace11773bc1d 100644
--- a/includes/api/ApiDelete.php
+++ b/includes/api/ApiDelete.php
@@ -276,6 +276,10 @@ class ApiDelete extends ApiBase {
);
}
+ public function getHelpUrls() {
+ return 'http://www.mediawiki.org/wiki/API:Delete';
+ }
+
public function getVersion() {
return __CLASS__ . ': $Id$';
}
diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php
index dbfcc3dfd792..27cecf1f785d 100644
--- a/includes/api/ApiEditPage.php
+++ b/includes/api/ApiEditPage.php
@@ -524,6 +524,10 @@ class ApiEditPage extends ApiBase {
);
}
+ public function getHelpUrls() {
+ return 'http://www.mediawiki.org/wiki/API:Edit';
+ }
+
public function getVersion() {
return __CLASS__ . ': $Id$';
}
diff --git a/includes/api/ApiEmailUser.php b/includes/api/ApiEmailUser.php
index 55188b96a0a6..c6c07013ca0b 100644
--- a/includes/api/ApiEmailUser.php
+++ b/includes/api/ApiEmailUser.php
@@ -144,6 +144,10 @@ class ApiEmailUser extends ApiBase {
);
}
+ public function getHelpUrls() {
+ return 'http://www.mediawiki.org/wiki/API:E-mail';
+ }
+
public function getVersion() {
return __CLASS__ . ': $Id$';
}
diff --git a/includes/api/ApiExpandTemplates.php b/includes/api/ApiExpandTemplates.php
index dd35aaa8915a..8b3ca154dfa9 100644
--- a/includes/api/ApiExpandTemplates.php
+++ b/includes/api/ApiExpandTemplates.php
@@ -115,6 +115,10 @@ class ApiExpandTemplates extends ApiBase {
);
}
+ public function getHelpUrls() {
+ return 'http://www.mediawiki.org/wiki/API:Parsing_wikitext';
+ }
+
public function getVersion() {
return __CLASS__ . ': $Id$';
}
diff --git a/includes/api/ApiFeedContributions.php b/includes/api/ApiFeedContributions.php
index ef6feccfacdf..a9846a5a9ab4 100644
--- a/includes/api/ApiFeedContributions.php
+++ b/includes/api/ApiFeedContributions.php
@@ -201,6 +201,10 @@ class ApiFeedContributions extends ApiBase {
);
}
+ public function getHelpUrls() {
+ return '';
+ }
+
public function getVersion() {
return __CLASS__ . ': $Id$';
}
diff --git a/includes/api/ApiFeedWatchlist.php b/includes/api/ApiFeedWatchlist.php
index 5e83b3014efb..b4fb9e4665bf 100644
--- a/includes/api/ApiFeedWatchlist.php
+++ b/includes/api/ApiFeedWatchlist.php
@@ -221,6 +221,10 @@ class ApiFeedWatchlist extends ApiBase {
);
}
+ public function getHelpUrls() {
+ return 'http://www.mediawiki.org/wiki/API:Watchlist_feed';
+ }
+
public function getVersion() {
return __CLASS__ . ': $Id$';
}
diff --git a/includes/api/ApiFileRevert.php b/includes/api/ApiFileRevert.php
index 371ef6783310..6f2916a88b0d 100644
--- a/includes/api/ApiFileRevert.php
+++ b/includes/api/ApiFileRevert.php
@@ -55,20 +55,20 @@ class ApiFileRevert extends ApiBase {
// Check whether we're allowed to revert this file
$this->checkPermissions( $wgUser );
-
+
$sourceUrl = $this->file->getArchiveVirtualUrl( $this->archiveName );
$status = $this->file->upload( $sourceUrl, $this->params['comment'], $this->params['comment'] );
if ( $status->isGood() ) {
$result = array( 'result' => 'Success' );
} else {
- $result = array(
- 'result' => 'Failure',
+ $result = array(
+ 'result' => 'Failure',
'errors' => $this->getResult()->convertStatusToArray( $status ),
);
}
- $this->getResult()->addValue( null, $this->getModuleName(), $result );
+ $this->getResult()->addValue( null, $this->getModuleName(), $result );
}
@@ -131,7 +131,7 @@ class ApiFileRevert extends ApiBase {
),
'archivename' => array(
ApiBase::PARAM_TYPE => 'string',
- ApiBase::PARAM_REQUIRED => true,
+ ApiBase::PARAM_REQUIRED => true,
),
'token' => null,
);
@@ -183,6 +183,10 @@ class ApiFileRevert extends ApiBase {
);
}
+ public function getHelpUrls() {
+ return '';
+ }
+
public function getVersion() {
return __CLASS__ . ': $Id$';
}
diff --git a/includes/api/ApiFormatBase.php b/includes/api/ApiFormatBase.php
index cddfb4aa5460..f491144b4e2e 100644
--- a/includes/api/ApiFormatBase.php
+++ b/includes/api/ApiFormatBase.php
@@ -294,6 +294,10 @@ See <a href='http://www.mediawiki.org/wiki/API'>complete documentation</a>, or
return 'api.php?action=query&meta=siteinfo&siprop=namespaces&format=' . $this->getModuleName();
}
+ public function getHelpUrls() {
+ return 'http://www.mediawiki.org/wiki/API:Data_formats';
+ }
+
public function getDescription() {
return $this->getIsHtml() ? ' (pretty-print in HTML)' : '';
}
diff --git a/includes/api/ApiHelp.php b/includes/api/ApiHelp.php
index c5170c4fa6b8..89dbf10d119b 100644
--- a/includes/api/ApiHelp.php
+++ b/includes/api/ApiHelp.php
@@ -154,6 +154,14 @@ class ApiHelp extends ApiBase {
);
}
+ public function getHelpUrls() {
+ return array(
+ 'http://www.mediawiki.org/wiki/API:Main_page',
+ 'http://www.mediawiki.org/wiki/API:FAQ',
+ 'http://www.mediawiki.org/wiki/API:Quick_start_guide',
+ );
+ }
+
public function getVersion() {
return __CLASS__ . ': $Id$';
}
diff --git a/includes/api/ApiImport.php b/includes/api/ApiImport.php
index 12cf08fe3e13..1b77266a228a 100644
--- a/includes/api/ApiImport.php
+++ b/includes/api/ApiImport.php
@@ -165,6 +165,10 @@ class ApiImport extends ApiBase {
);
}
+ public function getHelpUrls() {
+ return 'http://www.mediawiki.org/wiki/API:Import';
+ }
+
public function getVersion() {
return __CLASS__ . ': $Id$';
}
diff --git a/includes/api/ApiMove.php b/includes/api/ApiMove.php
index 6fefc6a38975..7f9d62b7f620 100644
--- a/includes/api/ApiMove.php
+++ b/includes/api/ApiMove.php
@@ -260,6 +260,10 @@ class ApiMove extends ApiBase {
);
}
+ public function getHelpUrls() {
+ return 'http://www.mediawiki.org/wiki/API:Move';
+ }
+
public function getVersion() {
return __CLASS__ . ': $Id$';
}
diff --git a/includes/api/ApiOpenSearch.php b/includes/api/ApiOpenSearch.php
index bdab14fb7e92..9a09c274f41c 100644
--- a/includes/api/ApiOpenSearch.php
+++ b/includes/api/ApiOpenSearch.php
@@ -60,7 +60,7 @@ class ApiOpenSearch extends ApiBase {
$searches = PrefixSearch::titleSearch( $search, $limit,
$namespaces );
-
+
// if the content language has variants, try to retrieve fallback results
$fallbackLimit = $limit - count( $searches );
if ( $fallbackLimit > 0 ) {
@@ -125,6 +125,10 @@ class ApiOpenSearch extends ApiBase {
);
}
+ public function getHelpUrls() {
+ return '';
+ }
+
public function getVersion() {
return __CLASS__ . ': $Id$';
}
diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php
index 9d2d95a5a1ba..60b1714cabac 100644
--- a/includes/api/ApiParse.php
+++ b/includes/api/ApiParse.php
@@ -585,6 +585,10 @@ class ApiParse extends ApiBase {
);
}
+ public function getHelpUrls() {
+ return '';
+ }
+
public function getVersion() {
return __CLASS__ . ': $Id$';
}
diff --git a/includes/api/ApiPatrol.php b/includes/api/ApiPatrol.php
index 58e0499455d8..c3dc582b4962 100644
--- a/includes/api/ApiPatrol.php
+++ b/includes/api/ApiPatrol.php
@@ -110,6 +110,10 @@ class ApiPatrol extends ApiBase {
);
}
+ public function getHelpUrls() {
+ return '';
+ }
+
public function getVersion() {
return __CLASS__ . ': $Id$';
}
diff --git a/includes/api/ApiProtect.php b/includes/api/ApiProtect.php
index 021c68788643..c87cf43e7074 100644
--- a/includes/api/ApiProtect.php
+++ b/includes/api/ApiProtect.php
@@ -224,6 +224,10 @@ class ApiProtect extends ApiBase {
);
}
+ public function getHelpUrls() {
+ return 'http://www.mediawiki.org/wiki/API:Protect';
+ }
+
public function getVersion() {
return __CLASS__ . ': $Id$';
}
diff --git a/includes/api/ApiPurge.php b/includes/api/ApiPurge.php
index aa695361c656..bf8acd18ff2e 100644
--- a/includes/api/ApiPurge.php
+++ b/includes/api/ApiPurge.php
@@ -142,6 +142,10 @@ class ApiPurge extends ApiBase {
);
}
+ public function getHelpUrls() {
+ return 'http://www.mediawiki.org/wiki/API:Purge';
+ }
+
public function getVersion() {
return __CLASS__ . ': $Id$';
}
diff --git a/includes/api/ApiRollback.php b/includes/api/ApiRollback.php
index e845df663314..4ad84a883c92 100644
--- a/includes/api/ApiRollback.php
+++ b/includes/api/ApiRollback.php
@@ -191,6 +191,10 @@ class ApiRollback extends ApiBase {
);
}
+ public function getHelpUrls() {
+ return 'http://www.mediawiki.org/wiki/API:Rollback';
+ }
+
public function getVersion() {
return __CLASS__ . ': $Id$';
}
diff --git a/includes/api/ApiUnblock.php b/includes/api/ApiUnblock.php
index 686578728158..096641ad00d5 100644
--- a/includes/api/ApiUnblock.php
+++ b/includes/api/ApiUnblock.php
@@ -148,6 +148,10 @@ class ApiUnblock extends ApiBase {
);
}
+ public function getHelpUrls() {
+ return 'http://www.mediawiki.org/wiki/API:Block';
+ }
+
public function getVersion() {
return __CLASS__ . ': $Id$';
}
diff --git a/includes/api/ApiUndelete.php b/includes/api/ApiUndelete.php
index 509c1f825e14..3e3157dd9215 100644
--- a/includes/api/ApiUndelete.php
+++ b/includes/api/ApiUndelete.php
@@ -159,6 +159,10 @@ class ApiUndelete extends ApiBase {
);
}
+ public function getHelpUrls() {
+ return 'http://www.mediawiki.org/wiki/API:Undelete';
+ }
+
public function getVersion() {
return __CLASS__ . ': $Id$';
}
diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php
index b101ecc67290..7c95f999122a 100644
--- a/includes/api/ApiUpload.php
+++ b/includes/api/ApiUpload.php
@@ -58,7 +58,7 @@ class ApiUpload extends ApiBase {
$request = $this->getMain()->getRequest();
// Add the uploaded file to the params array
$this->mParams['file'] = $request->getFileName( 'file' );
-
+
// Copy the session key to the file key, for backward compatibility.
if( !$this->mParams['filekey'] && $this->mParams['sessionkey'] ) {
$this->mParams['filekey'] = $this->mParams['sessionkey'];
@@ -562,6 +562,10 @@ class ApiUpload extends ApiBase {
);
}
+ public function getHelpUrls() {
+ return 'http://www.mediawiki.org/wiki/API:Upload';
+ }
+
public function getVersion() {
return __CLASS__ . ': $Id$';
}
diff --git a/includes/api/ApiUserrights.php b/includes/api/ApiUserrights.php
index 60853a1c09cd..a0a52b0cac8f 100644
--- a/includes/api/ApiUserrights.php
+++ b/includes/api/ApiUserrights.php
@@ -139,6 +139,10 @@ class ApiUserrights extends ApiBase {
);
}
+ public function getHelpUrls() {
+ return 'http://www.mediawiki.org/wiki/API:User_group_membership';
+ }
+
public function getVersion() {
return __CLASS__ . ': $Id$';
}
diff --git a/includes/api/ApiWatch.php b/includes/api/ApiWatch.php
index 241e25d88b10..e3bd57fa151d 100644
--- a/includes/api/ApiWatch.php
+++ b/includes/api/ApiWatch.php
@@ -125,6 +125,10 @@ class ApiWatch extends ApiBase {
);
}
+ public function getHelpUrls() {
+ return 'http://www.mediawiki.org/wiki/API:Watch';
+ }
+
public function getVersion() {
return __CLASS__ . ': $Id$';
}