From 50e796e948173506d98a39197cde7982fbc2c5ca Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Mon, 20 Feb 2017 14:28:10 -0800 Subject: [PATCH] includes/api: Replace implicitly-Bugzilla bug numbers with Phab ones 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 --- includes/api/ApiBase.php | 4 ++-- includes/api/ApiBlock.php | 4 ++-- includes/api/ApiFeedRecentChanges.php | 2 +- includes/api/ApiFormatBase.php | 4 ++-- includes/api/ApiFormatJson.php | 4 ++-- includes/api/ApiFormatPhp.php | 2 +- includes/api/ApiMain.php | 4 ++-- includes/api/ApiMove.php | 2 +- includes/api/ApiPageSet.php | 2 +- includes/api/ApiQueryAllDeletedRevisions.php | 2 +- includes/api/ApiQueryAllRevisions.php | 2 +- includes/api/ApiQueryAllUsers.php | 2 +- includes/api/ApiQueryBacklinks.php | 2 +- includes/api/ApiQueryDeletedRevisions.php | 2 +- includes/api/ApiQueryDeletedrevs.php | 2 +- includes/api/ApiQueryImageInfo.php | 2 +- includes/api/ApiQueryLogEvents.php | 2 +- includes/api/ApiQueryRecentChanges.php | 2 +- includes/api/ApiQueryRevisions.php | 2 +- includes/api/ApiQuerySiteinfo.php | 2 +- includes/api/ApiResult.php | 2 +- includes/api/ApiUnblock.php | 2 +- 22 files changed, 27 insertions(+), 27 deletions(-) diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index e2498108e5..c03faf0513 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -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; } diff --git a/includes/api/ApiBlock.php b/includes/api/ApiBlock.php index 58e3d1c58d..8577ad28b9 100644 --- a/includes/api/ApiBlock.php +++ b/includes/api/ApiBlock.php @@ -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() ) ) diff --git a/includes/api/ApiFeedRecentChanges.php b/includes/api/ApiFeedRecentChanges.php index e0e50edd9c..0b04c8cc92 100644 --- a/includes/api/ApiFeedRecentChanges.php +++ b/includes/api/ApiFeedRecentChanges.php @@ -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 ); } diff --git a/includes/api/ApiFormatBase.php b/includes/api/ApiFormatBase.php index 67f54a8068..83c348b4af 100644 --- a/includes/api/ApiFormatBase.php +++ b/includes/api/ApiFormatBase.php @@ -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 ) ) { diff --git a/includes/api/ApiFormatJson.php b/includes/api/ApiFormatJson.php index 8ebfe48cf8..e5dafae602 100644 --- a/includes/api/ApiFormatJson.php +++ b/includes/api/ApiFormatJson.php @@ -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 ); diff --git a/includes/api/ApiFormatPhp.php b/includes/api/ApiFormatPhp.php index a744f57bec..671f356194 100644 --- a/includes/api/ApiFormatPhp.php +++ b/includes/api/ApiFormatPhp.php @@ -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. diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 59227d91e9..5d0d4b1c80 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -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 ] ); } diff --git a/includes/api/ApiMove.php b/includes/api/ApiMove.php index ab7199f6a5..566f778169 100644 --- a/includes/api/ApiMove.php +++ b/includes/api/ApiMove.php @@ -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; diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php index d42e306efa..06019cff2f 100644 --- a/includes/api/ApiPageSet.php +++ b/includes/api/ApiPageSet.php @@ -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 ) { diff --git a/includes/api/ApiQueryAllDeletedRevisions.php b/includes/api/ApiQueryAllDeletedRevisions.php index b09b97702d..020df6d508 100644 --- a/includes/api/ApiQueryAllDeletedRevisions.php +++ b/includes/api/ApiQueryAllDeletedRevisions.php @@ -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' ) ) { diff --git a/includes/api/ApiQueryAllRevisions.php b/includes/api/ApiQueryAllRevisions.php index b64b2c8401..7b43efcaf0 100644 --- a/includes/api/ApiQueryAllRevisions.php +++ b/includes/api/ApiQueryAllRevisions.php @@ -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' ) ) { diff --git a/includes/api/ApiQueryAllUsers.php b/includes/api/ApiQueryAllUsers.php index 136f60ecce..9e7ad67068 100644 --- a/includes/api/ApiQueryAllUsers.php +++ b/includes/api/ApiQueryAllUsers.php @@ -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( diff --git a/includes/api/ApiQueryBacklinks.php b/includes/api/ApiQueryBacklinks.php index 613589e4d8..b3ac606fa9 100644 --- a/includes/api/ApiQueryBacklinks.php +++ b/includes/api/ApiQueryBacklinks.php @@ -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 ); } diff --git a/includes/api/ApiQueryDeletedRevisions.php b/includes/api/ApiQueryDeletedRevisions.php index d0b8214469..471aed6427 100644 --- a/includes/api/ApiQueryDeletedRevisions.php +++ b/includes/api/ApiQueryDeletedRevisions.php @@ -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' ) ) { diff --git a/includes/api/ApiQueryDeletedrevs.php b/includes/api/ApiQueryDeletedrevs.php index 6a259cd00a..295915120f 100644 --- a/includes/api/ApiQueryDeletedrevs.php +++ b/includes/api/ApiQueryDeletedrevs.php @@ -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' ) ) { diff --git a/includes/api/ApiQueryImageInfo.php b/includes/api/ApiQueryImageInfo.php index c9dae8de92..e5e45b3b5a 100644 --- a/includes/api/ApiQueryImageInfo.php +++ b/includes/api/ApiQueryImageInfo.php @@ -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() ); diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php index 4d84aade2c..8a13fef9fa 100644 --- a/includes/api/ApiQueryLogEvents.php +++ b/includes/api/ApiQueryLogEvents.php @@ -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; diff --git a/includes/api/ApiQueryRecentChanges.php b/includes/api/ApiQueryRecentChanges.php index 2c76e97105..24a75123a0 100644 --- a/includes/api/ApiQueryRecentChanges.php +++ b/includes/api/ApiQueryRecentChanges.php @@ -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; diff --git a/includes/api/ApiQueryRevisions.php b/includes/api/ApiQueryRevisions.php index 48f604664f..c47de9d8ce 100644 --- a/includes/api/ApiQueryRevisions.php +++ b/includes/api/ApiQueryRevisions.php @@ -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' ) ) { diff --git a/includes/api/ApiQuerySiteinfo.php b/includes/api/ApiQuerySiteinfo.php index 5093608297..a8c037ec6a 100644 --- a/includes/api/ApiQuerySiteinfo.php +++ b/includes/api/ApiQuerySiteinfo.php @@ -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' ); diff --git a/includes/api/ApiResult.php b/includes/api/ApiResult.php index e27cf7dd64..6734740f77 100644 --- a/includes/api/ApiResult.php +++ b/includes/api/ApiResult.php @@ -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 ) { diff --git a/includes/api/ApiUnblock.php b/includes/api/ApiUnblock.php index 3eeb7a490e..bfb0324849 100644 --- a/includes/api/ApiUnblock.php +++ b/includes/api/ApiUnblock.php @@ -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 ) { -- 2.20.1