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
* @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 = [];
}
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;
}
$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 ) {
} 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() ) )
$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 );
}
$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" );
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 ) ) {
$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 ) ) {
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 );
}
$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.
* @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 {
$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 ] );
}
// 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;
* @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 ) {
}
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' ) ) {
}
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' ) ) {
],
] ] );
- // 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(
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 );
}
}
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' ) ) {
}
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' ) ) {
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() );
$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;
$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;
}
}
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' ) ) {
}
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' );
}
}
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 ) {
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 ) {