Fill in missing params from a dieUsage
authorSam Reed <reedy@users.mediawiki.org>
Sat, 25 Sep 2010 16:45:41 +0000 (16:45 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sat, 25 Sep 2010 16:45:41 +0000 (16:45 +0000)
Braces

Fixup parameter documentation

includes/GlobalFunctions.php
includes/api/ApiBase.php
includes/api/ApiMain.php
includes/api/ApiUpload.php

index 7a861f3..05521cb 100644 (file)
@@ -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
index 600dd50..9ef45ef 100644 (file)
@@ -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 );
index a6d44a3..1cf0281 100644 (file)
@@ -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 );
index af08a62..f64cb37 100644 (file)
@@ -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'] );