Stylize API up to date
authorSam Reed <reedy@users.mediawiki.org>
Fri, 23 Jul 2010 07:33:40 +0000 (07:33 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Fri, 23 Jul 2010 07:33:40 +0000 (07:33 +0000)
Fix spaces from r69755

Minor update to RELEASE-NOTES per r69753

31 files changed:
RELEASE-NOTES
includes/api/ApiBase.php
includes/api/ApiBlock.php
includes/api/ApiEditPage.php
includes/api/ApiFormatBase.php
includes/api/ApiFormatYaml_spyc.php
includes/api/ApiHelp.php
includes/api/ApiLogin.php
includes/api/ApiMain.php
includes/api/ApiPageSet.php
includes/api/ApiParse.php
includes/api/ApiQuery.php
includes/api/ApiQueryAllmessages.php
includes/api/ApiQueryBase.php
includes/api/ApiQueryBlocks.php
includes/api/ApiQueryCategories.php
includes/api/ApiQueryFilearchive.php
includes/api/ApiQueryIWBacklinks.php
includes/api/ApiQueryImageInfo.php
includes/api/ApiQueryInfo.php
includes/api/ApiQueryLinks.php
includes/api/ApiQueryLogEvents.php
includes/api/ApiQueryRevisions.php
includes/api/ApiQueryUserContributions.php
includes/api/ApiQueryUserInfo.php
includes/api/ApiQueryUsers.php
includes/api/ApiQueryWatchlist.php
includes/api/ApiQueryWatchlistRaw.php
includes/api/ApiRollback.php
includes/api/ApiUpload.php
includes/api/ApiUserrights.php

index 729dad4..c93e01a 100644 (file)
@@ -283,7 +283,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   canonical language variant.
 * Fixed "link" parameter in image links with "thumb" parameter.
 * (bug 23936) Add "displaytitle" to query/info API
-* (bug 24485) Make iwbacklinks a generator, display iwprefix and iwtitle optional
+* (bug 24485) Make iwbacklinks a generator, optionally display iwprefix and iwtitle
 
 === Languages updated in 1.17 ===
 
index 3ce630a..19779d4 100644 (file)
@@ -546,7 +546,7 @@ abstract class ApiBase {
         * Return true if we're to watch the page, false if not, null if no change.
         * @param $watchlist String Valid values: 'watch', 'unwatch', 'preferences', 'nochange'
         * @param $titleObj Title the page under consideration
-        * @param $userOption The user option to consider when $watchlist=preferences. 
+        * @param $userOption The user option to consider when $watchlist=preferences.
         *      If not set will magically default to either watchdefault or watchcreations
         * @returns mixed
         */
@@ -724,7 +724,7 @@ abstract class ApiBase {
                                                        }
                                                        $value[$key] = $title->getText();
                                                }
-                                               
+
                                                if ( !$multi ) {
                             $value = $value[0];
                         }
@@ -1090,7 +1090,7 @@ abstract class ApiBase {
 
        /**
        * Gets the user for whom to get the watchlist
-       *  
+       *
        * @returns User
        */
        public function getWatchlistUser( $params ) {
index c3272f7..dfd52e5 100644 (file)
@@ -170,7 +170,7 @@ class ApiBlock extends ApiBase {
        public function getDescription() {
                return 'Block a user';
        }
-       
+
        public function getPossibleErrors() {
                return array_merge( parent::getPossibleErrors(), array(
                        array( 'missingparam', 'user' ),
@@ -181,7 +181,7 @@ class ApiBlock extends ApiBase {
                        array( 'ipbnounblockself' ),
                ) );
        }
-       
+
        public function getTokenSalt() {
                return '';
        }
index b0d2ed7..fabbd77 100644 (file)
@@ -319,17 +319,17 @@ class ApiEditPage extends ApiBase {
                                                $newArticle->getTimestamp() );
                                }
                                break;
-                       
+
                        case EditPage::AS_SUMMARY_NEEDED:
                                $this->dieUsageMsg( array( 'summaryrequired' ) );
 
                        case EditPage::AS_END:
                                // This usually means some kind of race condition
-                               // or DB weirdness occurred. 
+                               // or DB weirdness occurred.
                                if ( is_array( $result ) && count( $result ) > 0 ) {
                                        $this->dieUsageMsg( array( 'unknownerror', $result[0][0] ) );
                                }
-                               
+
                                // Unknown error, but no specific error message
                                // Fall through
                        default:
index 8554b5b..493e866 100644 (file)
@@ -120,7 +120,7 @@ abstract class ApiFormatBase extends ApiBase {
        public function disable() {
                $this->mDisabled = true;
        }
-       
+
        public function isDisabled() {
                return $this->mDisabled;
        }
index 093ae3e..e10f091 100644 (file)
@@ -192,7 +192,7 @@ class Spyc {
                } else {
                         if ( $key == '*' ) // bug 21922 - Quote asterix used as keys
                                $key = "'*'";
-               
+
                        // It's mapped
                        if ( $value !== '' && !is_null( $value ) )
                                $string = $spaces . $key . ': ' . $value . "\n";
index 3d8e7e4..26abda6 100644 (file)
@@ -45,13 +45,13 @@ class ApiHelp extends ApiBase {
        public function execute() {
                // Get parameters
                $params = $this->extractRequestParams();
-               
+
                if ( !isset( $params['modules'] ) && !isset( $params['querymodules'] ) ) {
                        $this->dieUsage( '', 'help' );
                }
-               
+
                $this->getMain()->setHelp();
-               
+
                $result = $this->getResult();
                $queryObj = new ApiQuery( $this->getMain(), 'query' );
                $r = array();
@@ -79,27 +79,27 @@ class ApiHelp extends ApiBase {
                                }
                                $module = new $qmodArr[$qm]( $this, $qm );
                                $type = $queryObj->getModuleType( $qm );
-                               
+
                                if ( $type === null ) {
                                        $r[] = array( 'name' => $qm, 'missing' => '' );
                                        continue;
                                }
-                               
+
                                $r[] = $this->buildModuleHelp( $module, $type );
                        }
                }
                $result->setIndexedTagName( $r, 'module' );
                $result->addValue( null, $this->getModuleName(), $r );
        }
-       
+
        private function buildModuleHelp( $module, $type ) {
                $msg = ApiMain::makeHelpMsgHeader( $module, $type );
-               
+
                $msg2 = $module->makeHelpMsg();
                if ( $msg2 !== false ) {
                        $msg .= $msg2;
                }
-               
+
                return $msg;
        }
 
@@ -110,7 +110,7 @@ class ApiHelp extends ApiBase {
        public function isReadMode() {
                return false;
        }
-       
+
        public function getAllowedParams() {
                return array(
                        'modules' => array(
@@ -132,7 +132,7 @@ class ApiHelp extends ApiBase {
        public function getDescription() {
                return 'Display this help screen. Or the help screen for the specified module';
        }
-       
+
        protected function getExamples() {
                return array(
                        'Whole help page:',
index d869b39..c45ff21 100644 (file)
@@ -87,7 +87,7 @@ class ApiLogin extends ApiBase {
                                $result['cookieprefix'] = $wgCookiePrefix;
                                $result['sessionid'] = session_id();
                                break;
-                       
+
                        case LoginForm::NEED_TOKEN:
                                global $wgCookiePrefix;
                                $result['result'] = 'NeedToken';
@@ -95,7 +95,7 @@ class ApiLogin extends ApiBase {
                                $result['cookieprefix'] = $wgCookiePrefix;
                                $result['sessionid'] = session_id();
                                break;
-                       
+
                        case LoginForm::WRONG_TOKEN:
                                $result['result'] = 'WrongToken';
                                break;
index 5a97fa9..62dc95c 100644 (file)
@@ -200,7 +200,7 @@ class ApiMain extends ApiBase {
        public function getModule() {
                return $this->mModule;
        }
-       
+
        /**
         * Get the result formatter object. Only works after setupExecuteAction()
         */
@@ -222,30 +222,30 @@ class ApiMain extends ApiBase {
         * Set the type of caching headers which will be sent.
         *
         * @param $mode One of:
-        *    - 'public':     Cache this object in public caches, if the maxage or smaxage 
+        *    - 'public':     Cache this object in public caches, if the maxage or smaxage
         *         parameter is set, or if setCacheMaxAge() was called. If a maximum age is
         *         not provided by any of these means, the object will be private.
         *    - 'private':    Cache this object only in private client-side caches.
         *    - 'anon-public-user-private': Make this object cacheable for logged-out
-        *         users, but private for logged-in users. IMPORTANT: If this is set, it must be 
-        *         set consistently for a given URL, it cannot be set differently depending on 
+        *         users, but private for logged-in users. IMPORTANT: If this is set, it must be
+        *         set consistently for a given URL, it cannot be set differently depending on
         *         things like the contents of the database, or whether the user is logged in.
         *
         *  If the wiki does not allow anonymous users to read it, the mode set here
-        *  will be ignored, and private caching headers will always be sent. In other words, 
+        *  will be ignored, and private caching headers will always be sent. In other words,
         *  the "public" mode is equivalent to saying that the data sent is as public as a page
         *  view.
         *
-        *  For user-dependent data, the private mode should generally be used. The 
-        *  anon-public-user-private mode should only be used where there is a particularly 
+        *  For user-dependent data, the private mode should generally be used. The
+        *  anon-public-user-private mode should only be used where there is a particularly
         *  good performance reason for caching the anonymous response, but where the
-        *  response to logged-in users may differ, or may contain private data. 
+        *  response to logged-in users may differ, or may contain private data.
         *
         *  If this function is never called, then the default will be the private mode.
         */
        public function setCacheMode( $mode ) {
                if ( !in_array( $mode, array( 'private', 'public', 'anon-public-user-private' ) ) ) {
-                       wfDebug( __METHOD__.": unrecognised cache mode \"$mode\"\n" );
+                       wfDebug( __METHOD__ . ": unrecognised cache mode \"$mode\"\n" );
                        // Ignore for forwards-compatibility
                        return;
                }
@@ -253,18 +253,18 @@ class ApiMain extends ApiBase {
                if ( !in_array( 'read', User::getGroupPermissions( array( '*' ) ), true ) ) {
                        // Private wiki, only private headers
                        if ( $mode !== 'private' ) {
-                               wfDebug( __METHOD__.": ignoring request for $mode cache mode, private wiki\n" );
+                               wfDebug( __METHOD__ . ": ignoring request for $mode cache mode, private wiki\n" );
                                return;
                        }
                }
 
-               wfDebug( __METHOD__.": setting cache mode $mode\n" );
+               wfDebug( __METHOD__ . ": setting cache mode $mode\n" );
                $this->mCacheMode = $mode;
        }
-       
+
        /**
-        * @deprecated Private caching is now the default, so there is usually no 
-        * need to call this function. If there is a need, you can use 
+        * @deprecated Private caching is now the default, so there is usually no
+        * need to call this function. If there is a need, you can use
         * $this->setCacheMode('private')
         */
        public function setCachePrivate() {
@@ -276,13 +276,13 @@ class ApiMain extends ApiBase {
         * Boolean values will be formatted as such, by including or omitting
         * without an equals sign.
         *
-        * Cache control values set here will only be used if the cache mode is not 
+        * Cache control values set here will only be used if the cache mode is not
         * private, see setCacheMode().
         */
        public function setCacheControl( $directives ) {
                $this->mCacheControl = $directives + $this->mCacheControl;
        }
-       
+
        /**
         * Make sure Vary: Cookie and friends are set. Use this when the output of a request
         * may be cached for anons but may not be cached for logged-in users.
@@ -364,7 +364,7 @@ class ApiMain extends ApiBase {
                        $this->printResult( true );
                }
 
-               // Send cache headers after any code which might generate an error, to 
+               // Send cache headers after any code which might generate an error, to
                // avoid sending public cache headers for errors.
                $this->sendCacheHeaders();
 
@@ -402,7 +402,7 @@ class ApiMain extends ApiBase {
                        // Give a debugging message if the user object is unstubbed on a public request
                        global $wgUser;
                        if ( !( $wgUser instanceof StubUser ) ) {
-                               wfDebug( __METHOD__." \$wgUser is unstubbed on a public request!\n" );
+                               wfDebug( __METHOD__ . " \$wgUser is unstubbed on a public request!\n" );
                        }
                }
 
@@ -519,7 +519,7 @@ class ApiMain extends ApiBase {
                        $this->getResult()->addValue( null, 'requestid', $requestid );
                }
                $servedby = $this->getParameter( 'servedby' );
-               if( $servedby ) {
+               if ( $servedby ) {
                        $this->getResult()->addValue( null, 'servedby', wfHostName() );
                }
 
index a24a75f..ae81d24 100644 (file)
@@ -80,7 +80,7 @@ class ApiPageSet extends ApiQueryBase {
                if ( $resolveRedirects ) {
                        $this->mPendingRedirectIDs = array();
                }
-               
+
                $this->mConvertTitles = $convertTitles;
                $this->mConvertedTitles = array();
 
@@ -225,12 +225,12 @@ class ApiPageSet extends ApiQueryBase {
        public function getNormalizedTitles() {
                return $this->mNormalizedTitles;
        }
-       
+
        /**
         * Get a list of title conversions - maps a title to its converted
         * version.
         * @return array raw_prefixed_title (string) => prefixed_title (string)
-        */     
+        */
        public function getConvertedTitles() {
                return $this->mConvertedTitles;
        }
@@ -259,7 +259,7 @@ class ApiPageSet extends ApiQueryBase {
        public function getMissingRevisionIDs() {
                return $this->mMissingRevIDs;
        }
-       
+
        /**
         * Get the list of titles with negative namespace
         * @return array Title
@@ -667,7 +667,7 @@ class ApiPageSet extends ApiQueryBase {
                                continue; // There's nothing else we can do
                        }
                        $unconvertedTitle = $titleObj->getPrefixedText();
-                       $titleWasConverted = false;                     
+                       $titleWasConverted = false;
                        $iw = $titleObj->getInterwiki();
                        if ( strval( $iw ) !== '' ) {
                                // This title is an interwiki link.
@@ -683,8 +683,8 @@ class ApiPageSet extends ApiQueryBase {
                                        $wgContLang->findVariantLink( $title, $titleObj );
                                        $titleWasConverted = $unconvertedTitle !== $titleObj->getPrefixedText();
                                }
-                               
-                               
+
+
                                if ( $titleObj->getNamespace() < 0 ) {
                                        // Handle Special and Media pages
                                        $titleObj = $titleObj->fixSpecialName();
index b7b2563..d850690 100644 (file)
@@ -241,7 +241,7 @@ class ApiParse extends ApiBase {
                        $result_array['headhtml'] = array();
                        $result->setContent( $result_array['headhtml'], $out->headElement( $userSkin ) );
                }
-               
+
                if ( isset( $prop['iwlinks'] ) ) {
                        $result_array['iwlinks'] = $this->formatIWLinks( $p_result->getInterwikiLinks() );
                }
@@ -324,12 +324,12 @@ class ApiParse extends ApiBase {
                        foreach ( $titles as $title => $id ) {
                                $entry = array();
                                $entry['prefix'] = $prefix;
-                               
+
                                $title = Title::newFromText( "{$prefix}:{$title}" );
                                if ( $title ) {
                                        $entry['url'] = $title->getFullURL();
                                }
-                               
+
                                $this->getResult()->setContent( $entry, $title->getFullText() );
                                $result[] = $entry;
                        }
index b3caa10..b86438f 100644 (file)
@@ -174,7 +174,7 @@ class ApiQuery extends ApiBase {
        function getModules() {
                return array_merge( $this->mQueryPropModules, $this->mQueryListModules, $this->mQueryMetaModules );
        }
-       
+
        /**
         * Get whether the specified module is a prop, list or a meta query module
         * @param $moduleName string Name of the module to find type for
@@ -184,15 +184,15 @@ class ApiQuery extends ApiBase {
                if ( array_key_exists ( $moduleName, $this->mQueryPropModules ) ) {
                        return 'prop';
                }
-               
+
                if ( array_key_exists ( $moduleName, $this->mQueryListModules ) ) {
                        return 'list';
                }
-               
+
                if ( array_key_exists ( $moduleName, $this->mQueryMetaModules ) ) {
                        return 'meta';
                }
-               
+
                return null;
        }
 
@@ -238,7 +238,7 @@ class ApiQuery extends ApiBase {
                if ( isset( $this->params['generator'] ) ) {
                        $generator = $this->newGenerator( $this->params['generator'] );
                        $params = $generator->extractRequestParams();
-                       $cacheMode = $this->mergeCacheMode( $cacheMode, 
+                       $cacheMode = $this->mergeCacheMode( $cacheMode,
                                $generator->getCacheMode( $params ) );
                        $this->executeGeneratorModule( $generator, $modules );
                } else {
@@ -253,7 +253,7 @@ class ApiQuery extends ApiBase {
                // Execute all requested modules.
                foreach ( $modules as $module ) {
                        $params = $module->extractRequestParams();
-                       $cacheMode = $this->mergeCacheMode( 
+                       $cacheMode = $this->mergeCacheMode(
                                $cacheMode, $module->getCacheMode( $params ) );
                        $module->profileIn();
                        $module->execute();
@@ -267,7 +267,7 @@ class ApiQuery extends ApiBase {
 
        /**
         * Update a cache mode string, applying the cache mode of a new module to it.
-        * The cache mode may increase in the level of privacy, but public modules 
+        * The cache mode may increase in the level of privacy, but public modules
         * added to private data do not decrease the level of privacy.
         */
        protected function mergeCacheMode( $cacheMode, $modCacheMode ) {
@@ -338,7 +338,7 @@ class ApiQuery extends ApiBase {
                        $result->setIndexedTagName( $normValues, 'n' );
                        $result->addValue( 'query', 'normalized', $normValues );
                }
-               
+
                // Title conversions
                $convValues = array();
                foreach ( $pageSet->getConvertedTitles() as $rawTitleStr => $titleStr ) {
@@ -351,7 +351,7 @@ class ApiQuery extends ApiBase {
                if ( count( $convValues ) ) {
                        $result->setIndexedTagName( $convValues, 'c' );
                        $result->addValue( 'query', 'converted', $convValues );
-               }               
+               }
 
                // Interwiki titles
                $intrwValues = array();
@@ -424,9 +424,9 @@ class ApiQuery extends ApiBase {
                        $vals = array();
                        ApiQueryBase::addTitleInfo( $vals, $title );
                        $vals['special'] = '';
-                       if ( $title->getNamespace() == NS_SPECIAL && 
+                       if ( $title->getNamespace() == NS_SPECIAL &&
                                        !SpecialPage::exists( $title->getText() ) ) {
-                               $vals['missing'] = '';                  
+                               $vals['missing'] = '';
                        } elseif ( $title->getNamespace() == NS_MEDIA &&
                                        !wfFindFile( $title ) ) {
                                $vals['missing'] = '';
index 86e2f91..39b736b 100644 (file)
@@ -43,7 +43,7 @@ class ApiQueryAllmessages extends ApiQueryBase {
                $params = $this->extractRequestParams();
 
                global $wgLang;
-               
+
                $oldLang = null;
                if ( !is_null( $params['lang'] ) ) {
                        $oldLang = $wgLang; // Keep $wgLang for restore later
@@ -122,7 +122,7 @@ class ApiQueryAllmessages extends ApiQueryBase {
                        }
                }
                $result->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), 'message' );
-               
+
                if ( !is_null( $oldLang ) ) {
                        $wgLang = $oldLang; // Restore $oldLang
                }
index 80b2ca9..1a2ddcc 100644 (file)
@@ -47,10 +47,10 @@ abstract class ApiQueryBase extends ApiBase {
        }
 
        /**
-        * Get the cache mode for the data generated by this module. Override this 
+        * Get the cache mode for the data generated by this module. Override this
         * in the module subclass.
         *
-        * Public caching will only be allowed if *all* the modules that supply 
+        * Public caching will only be allowed if *all* the modules that supply
         * data for a given request return a cache mode of public.
         */
        public function getCacheMode( $params ) {
index dd0e53f..a1f5070 100644 (file)
@@ -124,7 +124,7 @@ class ApiQueryBlocks extends ApiQueryBase {
                                'ipb_auto' => 0
                        ) );
                }
-               
+
                if ( !$wgUser->isAllowed( 'hideuser' ) ) {
                        $this->addWhereFld( 'ipb_deleted', 0 );
                }
index 9d95fc7..fb2b3ec 100644 (file)
@@ -228,7 +228,7 @@ class ApiQueryCategories extends ApiQueryGeneratorBase {
        public function getDescription() {
                return 'List all categories the page(s) belong to';
        }
-       
+
        public function getPossibleErrors() {
                return array_merge( parent::getPossibleErrors(), array(
                        array( 'show' ),
index e739345..9c459d7 100644 (file)
@@ -47,11 +47,11 @@ class ApiQueryFilearchive extends ApiQueryBase {
                if ( !$wgUser->isAllowed( 'deletedhistory' ) ) {
                        $this->dieUsage( 'You don\'t have permission to view deleted file information', 'permissiondenied' );
                }
-       
+
                $db = $this->getDB();
 
                $params = $this->extractRequestParams();
-               
+
                $prop = array_flip( $params['prop'] );
                $fld_sha1 = isset( $prop['sha1'] );
                $fld_timestamp = isset( $prop['timestamp'] );
@@ -62,9 +62,9 @@ class ApiQueryFilearchive extends ApiQueryBase {
                $fld_mime = isset( $prop['mime'] );
                $fld_metadata = isset( $prop['metadata'] );
                $fld_bitdepth = isset( $prop['bitdepth'] );
-               
+
                $this->addTables( 'filearchive' );
-               
+
                $this->addFields( 'fa_name' );
                $this->addFieldsIf( 'fa_storage_key', $fld_sha1 );
                $this->addFieldsIf( 'fa_timestamp', $fld_timestamp );
@@ -125,7 +125,7 @@ class ApiQueryFilearchive extends ApiQueryBase {
                                $this->setContinueEnumParameter( 'from', $this->keyToTitle( $row->fa_name ) );
                                break;
                        }
-                       
+
                        $file = array();
                        $file['name'] = $row->fa_name;
 
@@ -157,7 +157,7 @@ class ApiQueryFilearchive extends ApiQueryBase {
                        if ( $fld_mime ) {
                                $file['mime'] = "$row->fa_major_mime/$row->fa_minor_mime";
                        }
-                       
+
                        $fit = $result->addValue( array( 'query', $this->getModuleName() ), null, $file );
                        if ( !$fit ) {
                                $this->setContinueEnumParameter( 'from', $this->keyToTitle( $row->fa_name ) );
index ab5cbae..40a9a53 100644 (file)
@@ -38,7 +38,7 @@ class ApiQueryIWBacklinks extends ApiQueryGeneratorBase {
        public function __construct( $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'iwbl' );
        }
-       
+
        public function execute() {
                $this->run();
        }
@@ -49,7 +49,7 @@ class ApiQueryIWBacklinks extends ApiQueryGeneratorBase {
 
        public function run( $resultPageSet = null ) {
                $params = $this->extractRequestParams();
-               
+
                if ( isset( $params['title'] ) && !isset( $params['prefix'] ) ) {
                        $this->dieUsageMsg( array( 'missingparam', 'prefix' ) );
                }
@@ -72,7 +72,7 @@ class ApiQueryIWBacklinks extends ApiQueryGeneratorBase {
                                "iwl_from >= $from)))"
                        );
                }
-               
+
                $prop = array_flip( $params['prop'] );
                $iwprefix = isset( $prop['iwprefix'] );
                $iwtitle = isset( $prop['iwtitle'] );
@@ -98,7 +98,7 @@ class ApiQueryIWBacklinks extends ApiQueryGeneratorBase {
                $this->addOption( 'LIMIT', $params['limit'] + 1 );
 
                $res = $this->select( __METHOD__ );
-               
+
                $pages = array();
 
                $count = 0;
@@ -110,24 +110,24 @@ class ApiQueryIWBacklinks extends ApiQueryGeneratorBase {
                                $this->setContinueEnumParameter( 'continue', "{$row->iwl_prefix}|{$row->iwl_title}|{$row->iwl_from}" );
                                break;
                        }
-                       
+
                        if ( !is_null( $resultPageSet ) ) {
                                $pages[] = Title::makeTitle( $row->page_namespace, $row->page_title )->getPrefixedText();
                        } else {
                                $entry = array();
-                               
+
                                $entry['pageid'] = intval( $row->page_id );
                                $entry['ns'] = $row->page_namespace;
                                $entry['title'] = $row->page_title;
-                               
+
                                if ( $row->page_is_redirect ) {
                                        $entry['redirect'] = '';
                                }
-                               
+
                                if ( $iwprefix ) {
                                        $entry['iwprefix'] = $row->iwl_prefix;
                                }
-                               
+
                                if ( $iwtitle ) {
                                        $entry['iwtitle'] = $row->iwl_title;
                                }
@@ -139,7 +139,7 @@ class ApiQueryIWBacklinks extends ApiQueryGeneratorBase {
                                }
                        }
                }
-               
+
                if ( is_null( $resultPageSet ) ) {
                        $result->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), 'iw' );
                } else {
index 465d8c0..8b6a995 100644 (file)
@@ -222,7 +222,7 @@ class ApiQueryImageInfo extends ApiQueryBase {
                                                $vals['thumbwidth'] = intval( $file->getWidth() );
                                                $vals['thumbheight'] = intval( $file->getHeight() );
                                        }
-                                       
+
                                        if ( isset( $prop['thumbmime'] ) ) {
                                                $thumbFile = UnregisteredLocalFile::newFromPath( $mto->getPath(), false );
                                                $vals['thumbmime'] = $thumbFile->getMimeType();
index 4dfeb7f..fd0b107 100644 (file)
@@ -260,7 +260,7 @@ class ApiQueryInfo extends ApiQueryBase {
                if ( $this->fld_talkid || $this->fld_subjectid ) {
                        $this->getTSIDs();
                }
-               
+
                if ( $this->fld_displaytitle ) {
                        $this->getDisplayTitle();
                }
@@ -354,7 +354,7 @@ class ApiQueryInfo extends ApiQueryBase {
                                $pageInfo['preload'] = $text;
                        }
                }
-               
+
                if ( $this->fld_displaytitle ) {
                        if ( isset( $this->displaytitles[$title->getArticleId()] ) ) {
                                $pageInfo['displaytitle'] = $this->displaytitles[$title->getArticleId()];
@@ -528,7 +528,7 @@ class ApiQueryInfo extends ApiQueryBase {
                if ( !count( $getTitles ) ) {
                        return;
                }
-               
+
                $db = $this->getDB();
 
                // Construct a custom WHERE clause that matches
@@ -549,12 +549,12 @@ class ApiQueryInfo extends ApiQueryBase {
                        }
                }
        }
-       
+
        private function getDisplayTitle() {
                $this->displaytitles = array();
-               
+
                $pageIds = array_keys( $this->titles );
-       
+
                if ( !count( $pageIds ) ) {
                        return;
                }
@@ -565,7 +565,7 @@ class ApiQueryInfo extends ApiQueryBase {
                $this->addWhereFld( 'pp_page', $pageIds );
                $this->addWhereFld( 'pp_propname', 'displaytitle' );
                $res = $this->select( __METHOD__ );
-               
+
                foreach ( $res as $row ) {
                        $this->displaytitles[$row->pp_page] = $row->pp_value;
                }
@@ -639,7 +639,7 @@ class ApiQueryInfo extends ApiQueryBase {
                                        'readable', # private
                                        'preload',
                                        'displaytitle',
-                                       // If you add more properties here, please consider whether they 
+                                       // If you add more properties here, please consider whether they
                                        // need to be added to getCacheMode()
                                ) ),
                        'token' => array(
index 732f310..b2a5b7a 100644 (file)
@@ -89,7 +89,7 @@ class ApiQueryLinks extends ApiQueryGeneratorBase {
                $this->addTables( $this->table );
                $this->addWhereFld( $this->prefix . '_from', array_keys( $this->getPageSet()->getGoodTitles() ) );
                $this->addWhereFld( $this->prefix . '_namespace', $params['namespace'] );
-               
+
                if ( !is_null( $params[$this->titlesParam] ) ) {
                        $lb = new LinkBatch;
                        foreach ( $params[$this->titlesParam] as $t ) {
index e56b895..5af2f50 100644 (file)
@@ -204,7 +204,7 @@ class ApiQueryLogEvents extends ApiQueryBase {
                        case 'block':
                                $vals2 = array();
                                list( $vals2['duration'], $vals2['flags'] ) = $params;
-                               
+
                                // Indefinite blocks have no expiry time
                                if ( Block::parseExpiryInput( $params[0] ) !== Block::infinity() ) {
                                        $vals2['expiry'] = wfTimestamp( TS_ISO_8601,
@@ -240,7 +240,7 @@ class ApiQueryLogEvents extends ApiQueryBase {
                                ApiQueryBase::addTitleInfo( $vals, $title );
                        }
                }
-               
+
                if ( $this->fld_type || $this->fld_action ) {
                        $vals['type'] = $row->log_type;
                        $vals['action'] = $row->log_action;
index 3130405..a90a73b 100644 (file)
@@ -387,7 +387,7 @@ class ApiQueryRevisions extends ApiQueryBase {
                                $vals['commenthidden'] = '';
                        } else {
                                $comment = $revision->getComment();
-                               
+
                                if ( $this->fld_comment ) {
                                        $vals['comment'] = $comment;
                                }
@@ -490,7 +490,7 @@ class ApiQueryRevisions extends ApiQueryBase {
                if ( !is_null( $params['prop'] ) && in_array( 'parsedcomment', $params['prop'] ) ) {
                        // formatComment() calls wfMsg() among other things
                        return 'anon-public-user-private';
-               }               
+               }
                return 'public';
        }
 
index c62b423..51b3914 100644 (file)
@@ -217,7 +217,7 @@ class ApiQueryContributions extends ApiQueryBase {
                        if ( !$wgUser->useRCPatrol() && !$wgUser->useNPPatrol() ) {
                                $this->dieUsage( 'You need the patrol right to request the patrolled flag', 'permissiondenied' );
                        }
-                       
+
                        // Use a redundant join condition on both
                        // timestamp and ID so we can use the timestamp
                        // index
index ffe1a0c..8645bf7 100644 (file)
@@ -77,7 +77,7 @@ class ApiQueryUserInfo extends ApiQueryBase {
 
                if ( isset( $this->prop['groups'] ) ) {
                        $autolist = ApiQueryUsers::getAutoGroups( $wgUser );
-               
+
                        $vals['groups'] = array_merge( $autolist, $wgUser->getGroups() );
                        $result->setIndexedTagName( $vals['groups'], 'g' );     // even if empty
                }
@@ -123,7 +123,7 @@ class ApiQueryUserInfo extends ApiQueryBase {
                                $vals['emailauthenticated'] = wfTimestamp( TS_ISO_8601, $auth );
                        }
                }
-               
+
                if ( isset( $this->prop['acceptlang'] ) ) {
                        $langs = $wgRequest->getAcceptLang();
                        $acceptLang = array();
index 23ea58d..4fd256f 100644 (file)
@@ -200,9 +200,9 @@ if ( !defined( 'MEDIAWIKI' ) ) {
                        } else {
                                if ( isset( $this->prop['groups'] ) && isset( $data[$u]['groups'] ) ) {
                                        $autolist = ApiQueryUsers::getAutoGroups( User::newFromName( $u ) );
-                                       
+
                                        $data[$u]['groups'] = array_merge( $autolist, $data[$u]['groups'] );
-                               
+
                                        $this->getResult()->setIndexedTagName( $data[$u]['groups'], 'g' );
                                }
                        }
@@ -217,7 +217,7 @@ if ( !defined( 'MEDIAWIKI' ) ) {
                }
                return $this->getResult()->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), 'user' );
        }
-       
+
        /**
        * Gets all the groups that a user is automatically a member of
        * @return array
index 2d61f82..e6896da 100644 (file)
@@ -56,7 +56,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
                $this->selectNamedDB( 'watchlist', DB_SLAVE, 'watchlist' );
 
                $params = $this->extractRequestParams();
-               
+
                $user = $this->getWatchlistUser( $params );
 
                if ( !is_null( $params['prop'] ) && is_null( $resultPageSet ) ) {
index df10340..93dd018 100644 (file)
@@ -50,7 +50,7 @@ class ApiQueryWatchlistRaw extends ApiQueryGeneratorBase {
 
        private function run( $resultPageSet = null ) {
                $this->selectNamedDB( 'watchlist', DB_SLAVE, 'watchlist' );
-               
+
                $params = $this->extractRequestParams();
 
                $user = $this->getWatchlistUser( $params );
index 1857baf..5f6f5c6 100644 (file)
@@ -136,7 +136,7 @@ class ApiRollback extends ApiBase {
                if ( !isset( $params['user'] ) ) {
                        $this->dieUsageMsg( array( 'missingparam', 'user' ) );
                }
-               
+
                // We need to be able to revert IPs, but getCanonicalName rejects them
                $this->mUser = User::isIP( $params['user'] )
                        ? $params['user']
@@ -166,7 +166,7 @@ class ApiRollback extends ApiBase {
                if ( !$this->mTitleObj->exists() ) {
                        $this->dieUsageMsg( array( 'notanarticle' ) );
                }
-               
+
                return $this->mTitleObj;
        }
 
index 96ff211..ca91c04 100644 (file)
@@ -268,8 +268,8 @@ class ApiUpload extends ApiBase {
 
                $warnings = $this->checkForWarnings();
                if ( isset( $warnings ) ) {
-            return $warnings;
-        }
+                       return $warnings;
+               }
 
                // Use comment as initial page text by default
                if ( is_null( $this->mParams['text'] ) ) {
index 8ca22f3..8f6f659 100644 (file)
@@ -54,7 +54,7 @@ class ApiUserrights extends ApiBase {
                $this->getResult()->setIndexedTagName( $r['removed'], 'group' );
                $this->getResult()->addValue( null, $this->getModuleName(), $r );
        }
-       
+
        private function getUser() {
                if ( $this->mUser !== null ) {
                        return $this->mUser;