diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2012-04-26 18:23:31 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2012-04-26 18:23:31 +0200 |
commit | c4372dd38a4d109b4f3881ea63b667e33adbe503 (patch) | |
tree | e8e6dae1229a68c26b7a348c73dc0c8c77da97e5 /includes/api/ApiMain.php | |
parent | cf566324cfb218f0c7323d97d2a103bbb8d60ba4 (diff) |
Update to MediaWiki 1.18.3
Diffstat (limited to 'includes/api/ApiMain.php')
-rw-r--r-- | includes/api/ApiMain.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 85a43aba..b7e118cf 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -580,8 +580,14 @@ class ApiMain extends ApiBase { $moduleParams = $module->extractRequestParams(); // Die if token required, but not provided (unless there is a gettoken parameter) + if ( isset( $moduleParams['gettoken'] ) ) { + $gettoken = $moduleParams['gettoken']; + } else { + $gettoken = false; + } + $salt = $module->getTokenSalt(); - if ( $salt !== false && !$moduleParams['gettoken'] ) { + if ( $salt !== false && !$gettoken ) { if ( !isset( $moduleParams['token'] ) ) { $this->dieUsageMsg( array( 'missingparam', 'token' ) ); } else { @@ -988,7 +994,7 @@ class ApiMain extends ApiBase { public function getVersion() { $vers = array(); $vers[] = 'MediaWiki: ' . SpecialVersion::getVersion() . "\n https://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/"; - $vers[] = __CLASS__ . ': $Id: ApiMain.php 104449 2011-11-28 15:52:04Z reedy $'; + $vers[] = __CLASS__ . ': $Id$'; $vers[] = ApiBase::getBaseVersion(); $vers[] = ApiFormatBase::getBaseVersion(); $vers[] = ApiQueryBase::getBaseVersion(); |