includes/api: Replace implicitly-Bugzilla bug numbers with Phab ones
authorJames D. Forrester <jforrester@wikimedia.org>
Mon, 20 Feb 2017 22:28:10 +0000 (14:28 -0800)
committerJforrester <jforrester@wikimedia.org>
Fri, 24 Feb 2017 16:41:47 +0000 (16:41 +0000)
It's unreasonable to expect newbies to know that "bug 12345" means "Task T14345"
except where it doesn't, so let's just standardise on the real numbers.

Change-Id: I49e2a10350a328a8572fcedd44012751a29e1068

22 files changed:
includes/api/ApiBase.php
includes/api/ApiBlock.php
includes/api/ApiFeedRecentChanges.php
includes/api/ApiFormatBase.php
includes/api/ApiFormatJson.php
includes/api/ApiFormatPhp.php
includes/api/ApiMain.php
includes/api/ApiMove.php
includes/api/ApiPageSet.php
includes/api/ApiQueryAllDeletedRevisions.php
includes/api/ApiQueryAllRevisions.php
includes/api/ApiQueryAllUsers.php
includes/api/ApiQueryBacklinks.php
includes/api/ApiQueryDeletedRevisions.php
includes/api/ApiQueryDeletedrevs.php
includes/api/ApiQueryImageInfo.php
includes/api/ApiQueryLogEvents.php
includes/api/ApiQueryRecentChanges.php
includes/api/ApiQueryRevisions.php
includes/api/ApiQuerySiteinfo.php
includes/api/ApiResult.php
includes/api/ApiUnblock.php

index e249810..c03faf0 100644 (file)
@@ -700,7 +700,7 @@ abstract class ApiBase extends ContextSource {
         * @return array
         */
        public function extractRequestParams( $parseLimit = true ) {
-               // Cache parameters, for performance and to avoid bug 24564.
+               // Cache parameters, for performance and to avoid T26564.
                if ( !isset( $this->mParamCache[$parseLimit] ) ) {
                        $params = $this->getFinalParams();
                        $results = [];
@@ -1326,7 +1326,7 @@ abstract class ApiBase extends ContextSource {
                }
 
                if ( !$allowMultiple && count( $valuesList ) != 1 ) {
-                       // Bug 33482 - Allow entries with | in them for non-multiple values
+                       // T35482 - Allow entries with | in them for non-multiple values
                        if ( in_array( $value, $allowedValues, true ) ) {
                                return $value;
                        }
index 58e3d1c..8577ad2 100644 (file)
@@ -46,7 +46,7 @@ class ApiBlock extends ApiBase {
 
                $this->requireOnlyOneParameter( $params, 'user', 'userid' );
 
-               # bug 15810: blocked admins should have limited access here
+               # T17810: blocked admins should have limited access here
                if ( $user->isBlocked() ) {
                        $status = SpecialBlock::checkUnblockSelf( $params['user'], $user );
                        if ( $status !== true ) {
@@ -69,7 +69,7 @@ class ApiBlock extends ApiBase {
                } else {
                        $target = User::newFromName( $params['user'] );
 
-                       // Bug 38633 - if the target is a user (not an IP address), but it
+                       // T40633 - if the target is a user (not an IP address), but it
                        // doesn't exist or is unusable, error.
                        if ( $target instanceof User &&
                                ( $target->isAnon() /* doesn't exist */ || !User::isUsableName( $target->getName() ) )
index e0e50ed..0b04c8c 100644 (file)
@@ -57,7 +57,7 @@ class ApiFeedRecentChanges extends ApiBase {
 
                $this->getMain()->setCacheMode( 'public' );
                if ( !$this->getMain()->getParameter( 'smaxage' ) ) {
-                       // bug 63249: This page gets hit a lot, cache at least 15 seconds.
+                       // T65249: This page gets hit a lot, cache at least 15 seconds.
                        $this->getMain()->setCacheMaxAge( 15 );
                }
 
index 67f54a8..83c348b 100644 (file)
@@ -186,7 +186,7 @@ abstract class ApiFormatBase extends ApiBase {
 
                $this->getMain()->getRequest()->response()->header( "Content-Type: $mime; charset=utf-8" );
 
-               // Set X-Frame-Options API results (bug 39180)
+               // Set X-Frame-Options API results (T41180)
                $apiFrameOptions = $this->getConfig()->get( 'ApiFrameOptions' );
                if ( $apiFrameOptions ) {
                        $this->getMain()->getRequest()->response()->header( "X-Frame-Options: $apiFrameOptions" );
@@ -269,7 +269,7 @@ abstract class ApiFormatBase extends ApiBase {
                                        false, FormatJson::ALL_OK
                                );
 
-                               // Bug 66776: wfMangleFlashPolicy() is needed to avoid a nasty bug in
+                               // T68776: wfMangleFlashPolicy() is needed to avoid a nasty bug in
                                // Flash, but what it does isn't friendly for the API, so we need to
                                // work around it.
                                if ( preg_match( '/\<\s*cross-domain-policy\s*\>/i', $json ) ) {
index 8ebfe48..e5dafae 100644 (file)
@@ -91,7 +91,7 @@ class ApiFormatJson extends ApiFormatBase {
                $data = $this->getResult()->getResultData( null, $transform );
                $json = FormatJson::encode( $data, $this->getIsHtml(), $opt );
 
-               // Bug 66776: wfMangleFlashPolicy() is needed to avoid a nasty bug in
+               // T68776: wfMangleFlashPolicy() is needed to avoid a nasty bug in
                // Flash, but what it does isn't friendly for the API, so we need to
                // work around it.
                if ( preg_match( '/\<\s*cross-domain-policy(?=\s|\>)/i', $json ) ) {
@@ -103,7 +103,7 @@ class ApiFormatJson extends ApiFormatBase {
                if ( isset( $params['callback'] ) ) {
                        $callback = preg_replace( "/[^][.\\'\\\"_A-Za-z0-9]/", '', $params['callback'] );
                        # Prepend a comment to try to avoid attacks against content
-                       # sniffers, such as bug 68187.
+                       # sniffers, such as T70187.
                        $this->printText( "/**/$callback($json)" );
                } else {
                        $this->printText( $json );
index a744f57..671f356 100644 (file)
@@ -60,7 +60,7 @@ class ApiFormatPhp extends ApiFormatBase {
                }
                $text = serialize( $this->getResult()->getResultData( null, $transforms ) );
 
-               // Bug 66776: wfMangleFlashPolicy() is needed to avoid a nasty bug in
+               // T68776: wfMangleFlashPolicy() is needed to avoid a nasty bug in
                // Flash, but what it does isn't friendly for the API. There's nothing
                // we can do here that isn't actively broken in some manner, so let's
                // just be broken in a useful manner.
index 59227d9..5d0d4b1 100644 (file)
@@ -574,7 +574,7 @@ class ApiMain extends ApiBase {
         * @param Exception $e
         */
        protected function handleException( Exception $e ) {
-               // Bug 63145: Rollback any open database transactions
+               // T65145: Rollback any open database transactions
                if ( !( $e instanceof ApiUsageException || $e instanceof UsageException ) ) {
                        // UsageExceptions are intentional, so don't rollback if that's the case
                        try {
@@ -1666,7 +1666,7 @@ class ApiMain extends ApiBase {
                $ret = $this->getRequest()->getVal( $name );
                if ( $ret === null ) {
                        if ( $this->getRequest()->getArray( $name ) !== null ) {
-                               // See bug 10262 for why we don't just implode( '|', ... ) the
+                               // See T12262 for why we don't just implode( '|', ... ) the
                                // array.
                                $this->addWarning( [ 'apiwarn-unsupportedarray', $name ] );
                        }
index ab7199f..566f778 100644 (file)
@@ -103,7 +103,7 @@ class ApiMove extends ApiBase {
                // a redirect to the new title. This is not safe, but what we did before was
                // even worse: we just determined whether a redirect should have been created,
                // and reported that it was created if it should have, without any checks.
-               // Also note that isRedirect() is unreliable because of bug 37209.
+               // Also note that isRedirect() is unreliable because of T39209.
                $r['redirectcreated'] = $fromTitle->exists();
 
                $r['moveoverredirect'] = $toTitleExists;
index d42e306..06019cf 100644 (file)
@@ -1384,7 +1384,7 @@ class ApiPageSet extends ApiBase {
         * @return array
         */
        private static function getPositiveIntegers( $array ) {
-               // bug 25734 API: possible issue with revids validation
+               // T27734 API: possible issue with revids validation
                // It seems with a load of revision rows, MySQL gets upset
                // Remove any < 0 integers, as they can't be valid
                foreach ( $array as $i => $int ) {
index b09b977..020df6d 100644 (file)
@@ -230,7 +230,7 @@ class ApiQueryAllDeletedRevisions extends ApiQueryRevisionsBase {
                }
 
                if ( !is_null( $params['user'] ) || !is_null( $params['excludeuser'] ) ) {
-                       // Paranoia: avoid brute force searches (bug 17342)
+                       // Paranoia: avoid brute force searches (T19342)
                        // (shouldn't be able to get here without 'deletedhistory', but
                        // check it again just in case)
                        if ( !$user->isAllowed( 'deletedhistory' ) ) {
index b64b2c8..7b43efc 100644 (file)
@@ -131,7 +131,7 @@ class ApiQueryAllRevisions extends ApiQueryRevisionsBase {
                }
 
                if ( $params['user'] !== null || $params['excludeuser'] !== null ) {
-                       // Paranoia: avoid brute force searches (bug 17342)
+                       // Paranoia: avoid brute force searches (T19342)
                        if ( !$this->getUser()->isAllowed( 'deletedhistory' ) ) {
                                $bitmask = Revision::DELETED_USER;
                        } elseif ( !$this->getUser()->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) {
index 136f60e..9e7ad67 100644 (file)
@@ -186,7 +186,7 @@ class ApiQueryAllUsers extends ApiQueryBase {
                                ],
                        ] ] );
 
-                       // Actually count the actions using a subquery (bug 64505 and bug 64507)
+                       // Actually count the actions using a subquery (T66505 and T66507)
                        $timestamp = $db->timestamp( wfTimestamp( TS_UNIX ) - $activeUserSeconds );
                        $this->addFields( [
                                'recentactions' => '(' . $db->selectSQLText(
index 613589e..b3ac606 100644 (file)
@@ -152,7 +152,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
                if ( $this->params['filterredir'] == 'redirects' ) {
                        $this->addWhereFld( 'page_is_redirect', 1 );
                } elseif ( $this->params['filterredir'] == 'nonredirects' && !$this->redirect ) {
-                       // bug 22245 - Check for !redirect, as filtering nonredirects, when
+                       // T24245 - Check for !redirect, as filtering nonredirects, when
                        // getting what links to them is contradictory
                        $this->addWhereFld( 'page_is_redirect', 0 );
                }
index d0b8214..471aed6 100644 (file)
@@ -123,7 +123,7 @@ class ApiQueryDeletedRevisions extends ApiQueryRevisionsBase {
                }
 
                if ( !is_null( $params['user'] ) || !is_null( $params['excludeuser'] ) ) {
-                       // Paranoia: avoid brute force searches (bug 17342)
+                       // Paranoia: avoid brute force searches (T19342)
                        // (shouldn't be able to get here without 'deletedhistory', but
                        // check it again just in case)
                        if ( !$user->isAllowed( 'deletedhistory' ) ) {
index 6a259cd..2959151 100644 (file)
@@ -203,7 +203,7 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
                }
 
                if ( !is_null( $params['user'] ) || !is_null( $params['excludeuser'] ) ) {
-                       // Paranoia: avoid brute force searches (bug 17342)
+                       // Paranoia: avoid brute force searches (T19342)
                        // (shouldn't be able to get here without 'deletedhistory', but
                        // check it again just in case)
                        if ( !$user->isAllowed( 'deletedhistory' ) ) {
index c9dae8d..e5e45b3 100644 (file)
@@ -509,7 +509,7 @@ class ApiQueryImageInfo extends ApiQueryBase {
                                if ( $mto && !$mto->isError() ) {
                                        $vals['thumburl'] = wfExpandUrl( $mto->getUrl(), PROTO_CURRENT );
 
-                                       // bug 23834 - If the URL's are the same, we haven't resized it, so shouldn't give the wanted
+                                       // T25834 - If the URLs are the same, we haven't resized it, so shouldn't give the wanted
                                        // thumbnail sizes for the thumbnail actual size
                                        if ( $mto->getUrl() !== $file->getUrl() ) {
                                                $vals['thumbwidth'] = intval( $mto->getWidth() );
index 4d84aad..8a13fef 100644 (file)
@@ -198,7 +198,7 @@ class ApiQueryLogEvents extends ApiQueryBase {
                        $this->addWhere( 'log_title ' . $db->buildLike( $title->getDBkey(), $db->anyString() ) );
                }
 
-               // Paranoia: avoid brute force searches (bug 17342)
+               // Paranoia: avoid brute force searches (T19342)
                if ( $params['namespace'] !== null || !is_null( $title ) || !is_null( $user ) ) {
                        if ( !$this->getUser()->isAllowed( 'deletedhistory' ) ) {
                                $titleBits = LogPage::DELETED_ACTION;
index 2c76e97..24a7512 100644 (file)
@@ -320,7 +320,7 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
                        $this->addWhereFld( 'ct_tag', $params['tag'] );
                }
 
-               // Paranoia: avoid brute force searches (bug 17342)
+               // Paranoia: avoid brute force searches (T19342)
                if ( !is_null( $params['user'] ) || !is_null( $params['excludeuser'] ) ) {
                        if ( !$user->isAllowed( 'deletedhistory' ) ) {
                                $bitmask = Revision::DELETED_USER;
index 48f6046..c47de9d 100644 (file)
@@ -244,7 +244,7 @@ class ApiQueryRevisions extends ApiQueryRevisionsBase {
                                }
                        }
                        if ( $params['user'] !== null || $params['excludeuser'] !== null ) {
-                               // Paranoia: avoid brute force searches (bug 17342)
+                               // Paranoia: avoid brute force searches (T19342)
                                if ( !$this->getUser()->isAllowed( 'deletedhistory' ) ) {
                                        $bitmask = Revision::DELETED_USER;
                                } elseif ( !$this->getUser()->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) {
index 5093608..a8c037e 100644 (file)
@@ -772,7 +772,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
        }
 
        public function appendProtocols( $property ) {
-               // Make a copy of the global so we don't try to set the _element key of it - bug 45130
+               // Make a copy of the global so we don't try to set the _element key of it - T47130
                $protocols = array_values( $this->getConfig()->get( 'UrlProtocols' ) );
                ApiResult::setArrayType( $protocols, 'BCarray' );
                ApiResult::setIndexedTagName( $protocols, 'p' );
index e27cf7d..6734740 100644 (file)
@@ -364,7 +364,7 @@ class ApiResult implements ApiSerializable {
                        }
                }
                if ( is_array( $value ) ) {
-                       // Work around PHP bug 45959 by copying to a temporary
+                       // Work around https://bugs.php.net/bug.php?id=45959 by copying to a temporary
                        // (in this case, foreach gets $k === "1" but $tmp[$k] assigns as if $k === 1)
                        $tmp = [];
                        foreach ( $value as $k => $v ) {
index 3eeb7a4..bfb0324 100644 (file)
@@ -44,7 +44,7 @@ class ApiUnblock extends ApiBase {
                if ( !$user->isAllowed( 'block' ) ) {
                        $this->dieWithError( 'apierror-permissiondenied-unblock', 'permissiondenied' );
                }
-               # bug 15810: blocked admins should have limited access here
+               # T17810: blocked admins should have limited access here
                if ( $user->isBlocked() ) {
                        $status = SpecialBlock::checkUnblockSelf( $params['user'], $user );
                        if ( $status !== true ) {