From 6c1273bc7d04daca0df5b48bbb7a90b3ee159fa0 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sat, 25 Sep 2010 16:45:41 +0000 Subject: [PATCH] Fill in missing params from a dieUsage Braces Fixup parameter documentation --- includes/GlobalFunctions.php | 2 +- includes/api/ApiBase.php | 2 +- includes/api/ApiMain.php | 4 +++- includes/api/ApiUpload.php | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 7a861f303e..05521cb2a8 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -3086,7 +3086,7 @@ function &wfGetLBFactory() { /** * Find a file. * Shortcut for RepoGroup::singleton()->findFile() - * @param $title Either a string or Title object + * @param $title String or Title object * @param $options Associative array of options: * time: requested time for an archived image, or false for the * current version. An image object will be returned which was diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 600dd508b6..9ef45ef916 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -589,7 +589,7 @@ abstract class ApiBase { * Set a watch (or unwatch) based the based on a watchlist parameter. * @param $watch String Valid values: 'watch', 'unwatch', 'preferences', 'nochange' * @param $titleObj Title the article's title to change - * @param $userOption The user option to consider when $watch=preferences + * @param $userOption String The user option to consider when $watch=preferences */ protected function setWatch ( $watch, $titleObj, $userOption = null ) { $value = $this->getWatchlistValue( $watch, $titleObj, $userOption ); diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index a6d44a3e34..1cf0281a1b 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -637,7 +637,9 @@ class ApiMain extends ApiBase { $this->checkExecutePermissions( $module ); - if ( !$this->checkMaxLag( $module, $params ) ) return; + if ( !$this->checkMaxLag( $module, $params ) ) { + return; + } if ( !$this->mInternalMode ) { $this->setupExternalResponse( $module, $params ); diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php index af08a62497..f64cb37419 100644 --- a/includes/api/ApiUpload.php +++ b/includes/api/ApiUpload.php @@ -116,7 +116,7 @@ class ApiUpload extends ApiBase { // Status request for an async upload $sessionData = UploadFromUrlJob::getSessionData( $this->mParams['statuskey'] ); if ( !isset( $sessionData['result'] ) ) { - $this->dieUsage(); + $this->dieUsage( 'No result in session data', 'missingresult'); } if ( $sessionData['result'] == 'Warning' ) { $sessionData['warnings'] = $this->transformWarnings( $sessionData['warnings'] ); -- 2.20.1