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: I6f59febaf8fc96e80f8cfc11f4356283f461142a
}
# Be aware that the != '' check is explicit, since empty values will be
- # passed by some callers (bug 29116)
+ # passed by some callers (T31116)
if ( $vagueTarget != '' ) {
list( $target, $type ) = self::parseTarget( $vagueTarget );
switch ( $type ) {
if ( $end === null ) {
$end = $start;
}
- # Per bug 14634, we want to include relevant active rangeblocks; for
+ # Per T16634, we want to include relevant active rangeblocks; for
# rangeblocks, we want to include larger ranges which enclose the given
# range. We know that all blocks must be smaller than $wgBlockCIDRLimit,
# so we can improve performance by filtering on a LIKE clause
$affected = $dbw->affectedRows();
if ( $this->isAutoblocking() ) {
- // update corresponding autoblock(s) (bug 48813)
+ // update corresponding autoblock(s) (T50813)
$dbw->update(
'ipblocks',
$this->getAutoblockUpdateArray(),
} elseif ( $target === null && $vagueTarget == '' ) {
# We're not going to find anything useful here
# Be aware that the == '' check is explicit, since empty values will be
- # passed by some callers (bug 29116)
+ # passed by some callers (T31116)
return null;
} elseif ( in_array(
$this->mSubcats = $row->cat_subcats;
$this->mFiles = $row->cat_files;
- # (bug 13683) If the count is negative, then 1) it's obviously wrong
+ # (T15683) If the count is negative, then 1) it's obviously wrong
# and should not be kept, and 2) we *probably* don't have to scan many
# rows to obtain the correct figure, so let's risk a one-time recount.
if ( $this->mPages < 0 || $this->mSubcats < 0 || $this->mFiles < 0 ) {
* to reduce disk usage, limits can only be selected from a list.
* The user preference is saved as an array offset in the database, by default
* the offset is set with $wgDefaultUserOptions['imagesize']. Make sure you
- * change it if you alter the array (see bug 8858).
+ * change it if you alter the array (see T10858).
* This is the list of settings the user can choose from:
*/
$wgImageLimits = [
*
* Currently this appears to work fine in all browsers, but it's disabled by
* default because it normalizes id's a bit too aggressively, breaking preexisting
- * content (particularly Cite). See bug 27733, bug 27694, bug 27474.
+ * content (particularly Cite). See T29733, T29694, T29474.
*/
$wgExperimentalHtmlIds = false;
* Attempting to create a redirect to any of the pages in this array
* will make the redirect fail.
* Userlogout is hard-coded, so it does not need to be listed here.
- * (bug 10569) Disallow Mypage and Mytalk as well.
+ * (T12569) Disallow Mypage and Mytalk as well.
*
* As of now, this only checks special pages. Redirects to pages in
* other namespaces cannot be invalidated by this variable.
/**
* Port where you have HTTPS running
* Supports HTTPS on non-standard ports
- * @see bug 65184
+ * @see T67184
* @since 1.24
*/
$wgHttpsPort = 443;
$this->recreate = false;
// When creating a new section, we can preload a section title by passing it as the
- // preloadtitle parameter in the URL (Bug 13100)
+ // preloadtitle parameter in the URL (T15100)
if ( $this->section == 'new' && $request->getVal( 'preloadtitle' ) ) {
$this->sectiontitle = $request->getVal( 'preloadtitle' );
// Once wpSummary isn't being use for setting section titles, we should delete this.
// Don't save a new page if it's blank or if it's a MediaWiki:
// message with content equivalent to default (allow empty pages
- // in this case to disable messages, see bug 50124)
+ // in this case to disable messages, see T52124)
$defaultMessageText = $this->mTitle->getDefaultMessageText();
if ( $this->mTitle->getNamespace() === NS_MEDIAWIKI && $defaultMessageText !== false ) {
$defaultText = $defaultMessageText;
if ( $this->hasPresetSummary ) {
// If a summary has been preset using &summary= we don't want to prompt for
// a different summary. Only prompt for a summary if the summary is blanked.
- // (Bug 17416)
+ // (T19416)
$this->autoSumm = md5( '' );
}
if ( $html === null ) {
- // Omit large new page diffs, bug 29110
+ // Omit large new page diffs, T31110
// Also use diff link for non-textual content
$diffText = self::getDiffLink( $title, $newid );
} else {
/**
* Compute a binary "Adler-32" checksum as defined by LibXDiff, i.e. with
- * the bytes backwards and initialised with 0 instead of 1. See bug 34428.
+ * the bytes backwards and initialised with 0 instead of 1. See T36428.
*
* @param string $s
* @return string|bool False if the hash extension is not available
$attribs['name'] = $name;
if ( substr( $value, 0, 1 ) == "\n" ) {
- // Workaround for bug 12130: browsers eat the initial newline
+ // Workaround for T14130: browsers eat the initial newline
// assuming that it's just for show, but they do keep the later
// newlines, which we may want to preserve during editing.
// Prepending a single newline
# ThumbnailImage::toHtml() already adds page= onto the end of DjVu URLs
# So we don't need to pass it here in $query. However, the URL for the
- # zoom icon still needs it, so we make a unique query for it. See bug 14771
+ # zoom icon still needs it, so we make a unique query for it. See T16771
$url = $title->getLocalURL( $query );
if ( $page ) {
$url = wfAppendQuery( $url, [ 'page' => $page ] );
if ( $altUserName === false ) {
$altUserName = IP::prettifyIP( $userName );
}
- $classes .= ' mw-anonuserlink'; // Separate link class for anons (bug 43179)
+ $classes .= ' mw-anonuserlink'; // Separate link class for anons (T45179)
} else {
$page = Title::makeTitle( NS_USER, $userName );
}
) {
# Sanitize text a bit:
$comment = str_replace( "\n", " ", $comment );
- # Allow HTML entities (for bug 13815)
+ # Allow HTML entities (for T15815)
$comment = Sanitizer::escapeHtmlAllowEntities( $comment );
# Render autocomments and make links:
$section = str_replace( '[[', '', $section );
$section = str_replace( ']]', '', $section );
- $section = Sanitizer::normalizeSectionNameWhitespace( $section ); # bug 22784
+ $section = Sanitizer::normalizeSectionNameWhitespace( $section ); # T24784
if ( $local ) {
$sectionTitle = Title::newFromText( '#' . $section );
} else {
} else {
$suffix = '';
}
- # bug 7425
+ # T9425
$target = trim( $target );
# Look at the first character
if ( $target != '' && $target[0] === '/' ) {
if ( $context->getRequest()->getBool( 'bot' ) ) {
$query['bot'] = '1';
- $query['hidediff'] = '1'; // bug 15999
+ $query['hidediff'] = '1'; // T17999
}
$disableRollbackEditCount = false;
# multiple matched parts (variable match); some will be empty because of
# synonyms. The variable will be the second non-empty one so remove any
# blank elements and re-sort the indices.
- # See also bug 6526
+ # See also T8526
$matches = array_values( array_filter( $matches ) );
if ( $request->getCheck( 'search' ) ) {
// Compatibility with old search URLs which didn't use Special:Search
// Just check for presence here, so blank requests still
- // show the search page when using ugly URLs (bug 8054).
+ // show the search page when using ugly URLs (T10054).
$ret = SpecialPage::getTitleFor( 'Search' );
} elseif ( $curid ) {
// URLs like this are generated by RC, because rc_title isn't always accurate
$unused = null; // To pass it by reference
Hooks::run( 'BeforeInitialize', [ &$title, &$unused, &$output, &$user, $request, $this ] );
- // Invalid titles. Bug 21776: The interwikis must redirect even if the page name is empty.
+ // Invalid titles. T23776: The interwikis must redirect even if the page name is empty.
if ( is_null( $title ) || ( $title->getDBkey() == '' && !$title->isExternal() )
|| $title->isSpecial( 'Badtitle' )
) {
? [] // relies on HMAC key signature alone
: $title->getUserPermissionsErrors( 'read', $user );
if ( count( $permErrors ) ) {
- // Bug 32276: allowing the skin to generate output with $wgTitle or
+ // T34276: allowing the skin to generate output with $wgTitle or
// $this->context->title set to the input title would allow anonymous users to
// determine whether a page exists, potentially leaking private data. In fact, the
// curid and oldid request parameters would allow page titles to be enumerated even
try {
$this->main();
} catch ( ErrorPageError $e ) {
- // Bug 62091: while exceptions are convenient to bubble up GUI errors,
+ // T64091: while exceptions are convenient to bubble up GUI errors,
// they are not internal application faults. As with normal requests, this
// should commit, print the output, do deferred updates, jobs, and profiling.
$this->doPreOutputCommit();
$defaultContentModelChanging = ( $oldDefault !== $newDefault
&& $oldDefault === $contentModel );
- // bug 57084: log_page should be the ID of the *moved* page
+ // T59084: log_page should be the ID of the *moved* page
$oldid = $this->oldTitle->getArticleID();
$logTitle = clone $this->oldTitle;
);
if ( !$redirectContent ) {
- // Clean up the old title *before* reset article id - bug 45348
+ // Clean up the old title *before* reset article id - T47348
WikiPage::onArticleDelete( $this->oldTitle );
}
$this->oldTitle->resetArticleID( 0 ); // 0 == non existing
$nt->resetArticleID( $oldid );
- $newpage->loadPageData( WikiPage::READ_LOCKING ); // bug 46397
+ $newpage->loadPageData( WikiPage::READ_LOCKING ); // T48397
$newpage->updateRevisionOn( $dbw, $nullRevision );
# Recreate the redirect, this time in the other direction.
if ( $redirectContent ) {
$redirectArticle = WikiPage::factory( $this->oldTitle );
- $redirectArticle->loadFromRow( false, WikiPage::READ_LOCKING ); // bug 46397
+ $redirectArticle->loadFromRow( false, WikiPage::READ_LOCKING ); // T48397
$newid = $redirectArticle->insertOn( $dbw );
if ( $newid ) { // sanity
$this->oldTitle->resetArticleID( $newid );
* @file
*/
-# bug 30219 : can not use pathinfo() on URLs since slashes do not match
+# T32219 : can not use pathinfo() on URLs since slashes do not match
$matches = [];
$ext = 'php';
$path = '/';
'epoch' => $config->get( 'CacheEpoch' )
];
if ( $config->get( 'UseSquid' ) ) {
- // bug 44570: the core page itself may not change, but resources might
+ // T46570: the core page itself may not change, but resources might
$modifiedTimes['sepoch'] = wfTimestamp( TS_MW, time() - $config->get( 'SquidMaxage' ) );
}
Hooks::run( 'OutputPageCheckLastModified', [ &$modifiedTimes, $this ] );
ResourceLoaderModule::ORIGIN_CORE_INDIVIDUAL
);
- // Site-wide styles are controlled by a config setting, see bug 71621
+ // Site-wide styles are controlled by a config setting, see T73621
// for background on why. User styles are never allowed.
if ( $this->getConfig()->get( 'AllowSiteCSSOnRestrictedPages' ) ) {
$styleOrigin = ResourceLoaderModule::ORIGIN_USER_SITEWIDE;
) {
$displayReturnto = null;
- # Due to bug 32276, if a user does not have read permissions,
+ # Due to T34276, if a user does not have read permissions,
# $this->getTitle() will just give Special:Badtitle, which is
# not especially useful as a returnto parameter. Use the title
# from the request instead, if there was one.
$curRevisionId = 0;
$articleId = 0;
- $canonicalSpecialPageName = false; # bug 21115
+ $canonicalSpecialPageName = false; # T23115
$title = $this->getTitle();
$ns = $title->getNamespace();
$sk = $this->getSkin();
// Get the relevant title so that AJAX features can use the correct page name
- // when making API requests from certain special pages (bug 34972).
+ // when making API requests from certain special pages (T36972).
$relevantTitle = $sk->getRelevantTitle();
$relevantUser = $sk->getRelevantUser();
* $wgOut->addWikiText( "<div class='error'>\n"
* . wfMessage( 'some-error' )->plain() . "\n</div>" );
*
- * The newline after the opening div is needed in some wikitext. See bug 19226.
+ * The newline after the opening div is needed in some wikitext. See T21226.
*
* @param string $wrap
*/
}
}
- # # Make sure that form fields have their parent set. See bug 41337.
+ # # Make sure that form fields have their parent set. See T43337.
$dummyForm = new HTMLForm( [], $context );
$disable = !$user->isAllowed( 'editmyoptions' );
if ( $dateopts ) {
if ( !in_array( 'default', $dateopts ) ) {
- $dateopts[] = 'default'; // Make sure default is always valid
- // Bug 19237
+ $dateopts[] = 'default'; // Make sure default is always valid T21237
}
// FIXME KLUGE: site default might not be valid for user language
}
}
- # normalize searchKey, so aliases with spaces can be found - bug 25675
+ # normalize searchKey, so aliases with spaces can be found - T27675
$searchKey = str_replace( ' ', '_', $searchKey );
$searchKey = $wgContLang->caseFold( $searchKey );
}
foreach ( $wgContLang->getSpecialPageAliases() as $page => $aliases ) {
- if ( !in_array( $page, SpecialPageFactory::getNames() ) ) {# bug 20885
+ if ( !in_array( $page, SpecialPageFactory::getNames() ) ) {# T22885
continue;
}
$matches = [];
foreach ( $keys as $pageKey => $page ) {
if ( $searchKey === '' || strpos( $pageKey, $searchKey ) === 0 ) {
- // bug 27671: Don't use SpecialPage::getTitleFor() here because it
+ // T29671: Don't use SpecialPage::getTitleFor() here because it
// localizes its input leading to searches for e.g. Special:All
// returning Spezial:MediaWiki-Systemnachrichten and returning
// Spezial:Alle_Seiten twice when $wgLanguageCode == 'de'
// Pre-1.5 ar_text row
$attribs['text'] = self::getRevisionText( $row, 'ar_' );
if ( $attribs['text'] === false ) {
- throw new MWException( 'Unable to load text from archive row (possibly bug 22624)' );
+ throw new MWException( 'Unable to load text from archive row (possibly T24624)' );
}
}
return new self( $attribs );
$badtag = true;
} elseif ( in_array( $t, $tagstack ) && !isset( $htmlnest[$t] ) ) {
$badtag = true;
- # Is it a self closed htmlpair ? (bug 5487)
+ # Is it a self closed htmlpair ? (T7487)
} elseif ( $brace == '/>' && isset( $htmlpairs[$t] ) ) {
// Eventually we'll just remove the self-closing
// slash, in order to be consistent with HTML5
// Normalize Halfwidth and Fullwidth Unicode block that IE6 might treat as ascii
$value = preg_replace_callback(
- '/[!-[]-z]/u', // U+FF01 to U+FF5A, excluding U+FF3C (bug 58088)
+ '/[!-[]-z]/u', // U+FF01 to U+FF5A, excluding U+FF3C (T60088)
function ( $matches ) {
$cp = UtfNormal\Utils::utf8ToCodepoint( $matches[0] );
if ( $cp === false ) {
/**
* Decode any character references, numeric or named entities,
- * in the next and normalize the resulting string. (bug 14952)
+ * in the next and normalize the resulting string. (T16952)
*
* This is useful for page titles, not for text to be displayed,
* MediaWiki allows HTML entities to escape normalization as a feature.
* 3.5.
*
* This function is an implementation of the specification as requested in
- * bug 22449.
+ * T24449.
*
* Client-side forms will use the same standard validation rules via JS or
* HTML 5 validation; additional restrictions can be enforced server-side
// Please note strings below are enclosed in brackets [], this make the
// hyphen "-" a range indicator. Hence it is double backslashed below.
- // See bug 26948
+ // See T28948
$rfc5322_atext = "a-z0-9!#$%&'*+\\-\/=?^_`{|}~";
$rfc1034_ldh_str = "a-z0-9\\-";
$wgUseEnotif = $wgEnotifUserTalk || $wgEnotifWatchlist;
} else {
// Disable all other email settings automatically if $wgEnableEmail
- // is set to false. - bug 63678
+ // is set to false. - T65678
$wgAllowHTMLEmail = false;
$wgEmailAuthentication = false; // do not require auth if you're not sending email anyway
$wgEnableUserEmail = false;
/**
* @var int Namespace index when there is no namespace. Don't change the
- * following default, NS_MAIN is hardcoded in several places. See bug 696.
+ * following default, NS_MAIN is hardcoded in several places. See T2696.
* Zero except in {{transclusion}} tags.
*/
public $mDefaultNamespace = NS_MAIN;
}
}
- // Convert things like é ā or 〗 into normalized (bug 14952) text
+ // Convert things like é ā or 〗 into normalized (T16952) text
$filteredText = Sanitizer::decodeCharReferencesAndNormalize( $text );
$t = new Title();
}
$newPageName = preg_replace(
'#^' . preg_quote( $this->getDBkey(), '#' ) . '#',
- StringUtils::escapeRegexReplacement( $nt->getDBkey() ), # bug 21234
+ StringUtils::escapeRegexReplacement( $nt->getDBkey() ), # T23234
$oldSubpage->getDBkey() );
if ( $oldSubpage->isTalkPage() ) {
$newNs = $nt->getTalkPage()->getNamespace();
} else {
$newNs = $nt->getSubjectPage()->getNamespace();
}
- # Bug 14385: we need makeTitleSafe because the new page names may
+ # T16385: we need makeTitleSafe because the new page names may
# be longer than 255 characters.
$newSubpage = Title::makeTitleSafe( $newNs, $newPageName );
$conds[] = 'rc_user_text != ' . $db->addQuotes( $options['notByUser'] );
}
- // Avoid brute force searches (bug 17342)
+ // Avoid brute force searches (T19342)
$bitmask = 0;
if ( !$user->isAllowed( 'deletedhistory' ) ) {
$bitmask = Revision::DELETED_USER;
$host = $parts[0];
if ( $wgAssumeProxiesUseDefaultProtocolPorts && isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) ) {
- // Bug 70021: Assume that upstream proxy is running on the default
+ // T72021: Assume that upstream proxy is running on the default
// port based on the protocol. We have no reliable way to determine
// the actual port in use upstream.
$port = $stdPort;
* available variant URLs.
*/
public function interpolateTitle() {
- // bug 16019: title interpolation on API queries is useless and sometimes harmful
+ // T18019: title interpolation on API queries is useless and sometimes harmful
if ( defined( 'MW_API' ) ) {
return;
}
if (
IP::isPublic( $ipchain[$i + 1] ) ||
$wgUsePrivateIPs ||
- $proxyLookup->isConfiguredProxy( $curIP ) // bug 48919; treat IP as sane
+ $proxyLookup->isConfiguredProxy( $curIP ) // T50919; treat IP as sane
) {
// Follow the next IP according to the proxy
$nextIP = IP::canonicalize( $ipchain[$i + 1] );
die( 'MediaWiki does not support installations where mbstring.func_overload is non-zero.' );
}
-# bug 15461: Make IE8 turn off content sniffing. Everybody else should ignore this
+# T17461: Make IE8 turn off content sniffing. Everybody else should ignore this
# We're adding it here so that it's *always* set, even for alternate entry
# points and when $wgOut gets disabled or overridden.
header( 'X-Content-Type-Options: nosniff' );
// 4) ... finally fetch from the slow database :(
$cacheEntry = [ 'numRows' => 0, 'batches' => [] ]; // final result
- // Do the selects in batches to avoid client-side OOMs (bug 43452).
+ // Do the selects in batches to avoid client-side OOMs (T45452).
// Use a LIMIT that plays well with $batchSize to keep equal sized partitions.
$selectSize = max( $batchSize, 200000 - ( 200000 % $batchSize ) );
$start = false;
if ( $feedAge < $wgFeedCacheTimeout || $feedLastmodUnix > $lastmodUnix ) {
wfDebug( "RC: loading feed from cache ($key; $feedLastmod; $lastmod)...\n" );
if ( $feedLastmodUnix < $lastmodUnix ) {
- $wgOut->setLastModified( $feedLastmod ); // bug 21916
+ $wgOut->setLastModified( $feedLastmod ); // T23916
}
return $cache->get( $key );
} else {
public function recentChangesLine( &$rc, $watched = false, $linenumber = null ) {
$classes = $this->getHTMLClasses( $rc, $watched );
- // use mw-line-even/mw-line-odd class only if linenumber is given (feature from bug 14468)
+ // use mw-line-even/mw-line-odd class only if linenumber is given (feature from T16468)
if ( $linenumber ) {
if ( $linenumber & 1 ) {
$classes[] = 'mw-line-odd';
*/
/**
- * Workaround for incorrect collation of Estonian language ('et') in ICU (bug 54168).
+ * Workaround for incorrect collation of Estonian language ('et') in ICU (T56168).
*
* 'W' and 'V' should not be considered the same letter for the purposes of collation in modern
* Estonian. We work around this by replacing 'W' and 'w' with 'ᴡ' U+1D21 'LATIN LETTER SMALL
* can't be determined.
*
* The constant INTL_ICU_VERSION this function refers to isn't really
- * documented. It is available since PHP 5.3.7 (see PHP bug 54561).
- * This function will return false on older PHPs.
+ * documented. It is available since PHP 5.3.7 (see PHP 54561
+ * https://bugs.php.net/bug.php?id=54561). This function will return
+ * false on older PHPs.
+ *
+ * TODO: Remove the backwards-compatibility as MediaWiki now requires
+ * higher levels of PHP.
*
* @since 1.21
* @return string|bool
$onlyAuthor = $row->rev_user_text;
// Try to find a second contributor
foreach ( $res as $row ) {
- if ( $row->rev_user_text != $onlyAuthor ) { // Bug 22999
+ if ( $row->rev_user_text != $onlyAuthor ) { // T24999
$onlyAuthor = false;
break;
}
*/
class TextContentHandler extends ContentHandler {
- // @codingStandardsIgnoreStart bug 57585
+ // @codingStandardsIgnoreStart T59585
public function __construct( $modelId = CONTENT_MODEL_TEXT, $formats = [ CONTENT_FORMAT_TEXT ] ) {
parent::__construct( $modelId, $formats );
}
}
// Normalize the key in case the user is passing gibberish
- // or has old preferences (bug 69566).
+ // or has old preferences (T71566).
$normalized = Skin::normalizeKey( $userSkin );
// Skin::normalizeKey will also validate it, so
foreach ( $this->tablesToClone as $tbl ) {
if ( $wgSharedDB && in_array( $tbl, $wgSharedTables, true ) ) {
// Shared tables don't work properly when cloning due to
- // how prefixes are handled (bug 65654)
+ // how prefixes are handled (T67654)
throw new RuntimeException( "Cannot clone shared table $tbl." );
}
# Clean up from previous aborted run. So that table escaping
# If the sortkey is longer then 255 bytes,
# it truncated by DB, and then doesn't get
# matched when comparing existing vs current
- # categories, causing bug 25254.
+ # categories, causing T27254.
# Also. substr behaves weird when given "".
if ( $sortkey !== '' ) {
$sortkey = substr( $sortkey, 0, 255 );
/**
* Set this to true to add debug info to the HTML output.
* Warning: this may cause RSS readers to spuriously mark articles as "new"
- * (bug 20601)
+ * (T22601)
*/
public $enableDebugComment = false;
$this->msg = $msg;
$this->params = $params;
- // Bug 44111: Messages in the log files should be in English and not
+ // T46111: Messages in the log files should be in English and not
// customized by the local wiki. So get the default English version for
// passing to the parent constructor. Our overridden report() below
// makes sure that the page shown to the user is not forced to English.
$text .= "{$pad}#{$level} {$frame['file']}({$frame['line']}): ";
} else {
// 'file' and 'line' are unset for calls via call_user_func
- // (bug 55634) This matches behaviour of
+ // (T57634) This matches behaviour of
// Exception::getTraceAsString to instead display "[internal
// function]".
$text .= "{$pad}#{$level} [internal function]: ";
* }
* @endcode
*
- * @see bug 37627
+ * @see T39627
* @since 1.20
* @ingroup Exception
*/
'dst' => $archivePath,
// We may have 2+ identical files being deleted,
// all of which will map to the same destination file
- 'overwriteSame' => true // also see bug 31792
+ 'overwriteSame' => true // also see T33792
];
}
return $this->iconThumb();
}
$hp['width'] = $width;
- // be sure to ignore any height specification as well (bug 62258)
+ // be sure to ignore any height specification as well (T64258)
unset( $hp['height'] );
return $this->transform( $hp );
break; // not a bitmap or renderable image, don't try
}
- // Get the descriptionUrl to embed it as comment into the thumbnail. Bug 19791.
+ // Get the descriptionUrl to embed it as comment into the thumbnail. T21791.
$descriptionUrl = $this->getDescriptionUrl();
if ( $descriptionUrl ) {
$params['descriptionUrl'] = wfExpandUrl( $descriptionUrl, PROTO_CANONICAL );
$files[] = $file;
}
} catch ( FileBackendError $e ) {
- } // suppress (bug 54674)
+ } // suppress (T56674)
return $files;
}
}
}
- # (bug 34993) Note: $oldver can be empty here, if the previous
+ # (T36993) Note: $oldver can be empty here, if the previous
# version of the file was broken. Allow registration of the new
# version to continue anyway, because that's better than having
# an image that's not fixable by user operations.
$dbw = $this->repo->getMasterDB();
$makesTransaction = !$dbw->trxLevel();
$dbw->startAtomic( self::ATOMIC_SECTION_LOCK );
- // Bug 54736: use simple lock to handle when the file does not exist.
+ // T56736: use simple lock to handle when the file does not exist.
// SELECT FOR UPDATE prevents changes, not other SELECTs with FOR UPDATE.
// Also, that would cause contention on INSERT of similarly named rows.
$status = $this->acquireFileLock(); // represents all versions of the file
$status->failCount++;
}
$status->successCount += $oldRowCount;
- // Bug 34934: oldCount is based on files that actually exist.
+ // T36934: oldCount is based on files that actually exist.
// There may be more DB rows than such files, in which case $affected
// can be greater than $total. We use max() to avoid negatives here.
$status->failCount += max( 0, $this->oldCount - $oldRowCount );
foreach ( $members as $o ) {
if ( isset( $options[$o] ) ) {
// ensure that MWHttpRequest::method is always
- // uppercased. Bug 36137
+ // uppercased. T38137
if ( $o == 'method' ) {
$options[$o] = strtoupper( $options[$o] );
}
*
* Note that the multiple Location: headers are an artifact of
* CURL -- they shouldn't actually get returned this way. Rewrite
- * this when bug 29232 is taken care of (high-level redirect
+ * this when T31232 is taken care of (high-level redirect
* handling rewrite).
*
* @return string
public function doImport() {
// Calls to reader->read need to be wrapped in calls to
// libxml_disable_entity_loader() to avoid local file
- // inclusion attacks (bug 46932).
+ // inclusion attacks (T48932).
$oldDisable = libxml_disable_entity_loader( true );
$this->reader->read();
public function updateRowExists( $key ) {
$row = $this->db->selectRow(
'updatelog',
- # Bug 65813
+ # T67813
'1 AS X',
[ 'ul_key' => $key ],
__METHOD__
'_UpgradeKeySupplied' => false,
'_ExistingDBSettings' => false,
- // $wgLogo is probably wrong (bug 48084); set something that will work.
+ // $wgLogo is probably wrong (T50084); set something that will work.
// Single quotes work fine here, as LocalSettingsGenerator outputs this unescaped.
'wgLogo' => '$wgResourceBasePath/resources/assets/wiki.png',
'wgAuthenticationTokenVersion' => 1,
);
}
// Unset everyone else's hooks. Lord knows what someone might be doing
- // in ParserFirstCallInit (see bug 27171)
+ // in ParserFirstCallInit (see T29171)
$GLOBALS['wgHooks'] = [ 'LoadExtensionSchemaUpdates' => $hooksWeWant ];
return Status::newGood();
/**
* Set page_random field to a random value where it is equals to 0.
*
- * @see bug 3946
+ * @see T5946
*/
protected function doPageRandomUpdate() {
$page = $this->db->tableName( 'page' );
protected function rebuildTextSearch() {
if ( $this->updateRowExists( 'patch-textsearch_bug66650.sql' ) ) {
- $this->output( "...bug 66650 already fixed or not applicable.\n" );
+ $this->output( "...T68650 already fixed or not applicable.\n" );
return;
};
$this->applyPatch( 'patch-textsearch_bug66650.sql', false,
- 'Rebuilding text search for bug 66650' );
+ 'Rebuilding text search for T68650' );
}
}
foreach ( $varNames as $name ) {
$value = $this->request->getVal( $prefix . $name );
- // bug 30524, do not trim passwords
+ // T32524, do not trim passwords
if ( stripos( $name, 'password' ) === false ) {
$value = trim( $value );
}
$retVal = false;
}
// If they asked to subscribe to mediawiki-announce but didn't give
- // an e-mail, show an error. Bug 29332
+ // an e-mail, show an error. T31332
if ( !$email && $this->getVar( '_Subscribe' ) ) {
$this->parent->showError( 'config-subscribe-noemail' );
$retVal = false;
}
if ( $continue ) {
- // Fake submit button for enter keypress (bug 26267)
+ // Fake submit button for enter keypress (T28267)
// Messages: config-continue, config-restart, config-regenerate
$s .= Xml::submitButton(
wfMessage( "config-$continue" )->text(),
if ( $result ) {
// If they're going to possibly regenerate LocalSettings, we
- // need to create the upgrade/secret keys. Bug 26481
+ // need to create the upgrade/secret keys. T28481
if ( !$this->getVar( '_ExistingDBSettings' ) ) {
$this->parent->generateKeys();
}
continue; // try the other direction
}
} else { // table *may* have >= MAX_OFFSET rows
- // Bug 42614: "ORDER BY job_random" with a job_random inequality causes high CPU
+ // T44614: "ORDER BY job_random" with a job_random inequality causes high CPU
// in MySQL if there are many rows for some reason. This uses a small OFFSET
// instead of job_random for reducing excess claim retries.
$row = $dbw->selectRow( 'job', self::selectFields(), // find a random job
wfDebug( __METHOD__ . " : skipping, already good\n" );
}
- // Preserve fragment (bug 14904)
+ // Preserve fragment (T16904)
$newTitle = Title::makeTitle( $newTitle->getNamespace(), $newTitle->getDBkey(),
$currentDest->getFragment(), $newTitle->getInterwiki() );
$seenTitles[$titleText] = true;
if ( $title->isExternal() ) {
- // If the target is interwiki, we have to break early (bug 40352).
+ // If the target is interwiki, we have to break early (T42352).
// Otherwise it will look up a row in the local page table
// with the namespace/page of the interwiki target which can cause
// unexpected results (e.g. X -> foo:Bar -> Bar -> .. )
);
$this->setLastError( get_class( $e ) . ": " . $e->getMessage() );
// To prevent potential database referential integrity issues.
- // See bug 32551.
+ // See T34551.
MWExceptionHandler::rollbackMasterChangesAndLog( $e );
return false;
/**
* Even uglier hack to maintain backwards compatibilty with IRC bots
- * (bug 34508).
+ * (T36508).
* @see getActionText()
* @return string Text
*/
/**
* Even uglier hack to maintain backwards compatibilty with IRC bots
- * (bug 34508).
+ * (T36508).
* @see getActionText()
* @return string Text
*/
} else {
$this->mConds['log_user'] = $userid;
}
- // Paranoia: avoid brute force searches (bug 17342)
+ // Paranoia: avoid brute force searches (T19342)
$user = $this->getUser();
if ( !$user->isAllowed( 'deletedhistory' ) ) {
$this->mConds[] = $this->mDb->bitAnd( 'log_deleted', LogPage::DELETED_USER ) . ' = 0';
} else {
$this->mConds['log_title'] = $title->getDBkey();
}
- // Paranoia: avoid brute force searches (bug 17342)
+ // Paranoia: avoid brute force searches (T19342)
$user = $this->getUser();
if ( !$user->isAllowed( 'deletedhistory' ) ) {
$this->mConds[] = $db->bitAnd( 'log_deleted', LogPage::DELETED_ACTION ) . ' = 0';
$pageTitle = $this->title->getPrefixedText();
if ( $this->oldid ) {
- // Always show a link to the diff which triggered the mail. See bug 32210.
+ // Always show a link to the diff which triggered the mail. See T34210.
$keys['$NEWPAGE'] = "\n\n" . wfMessage( 'enotif_lastdiff',
$this->title->getCanonicalURL( [ 'diff' => 'next', 'oldid' => $this->oldid ] ) )
->inContentLanguage()->text();
Skin::makeInternalOrExternalUrl( wfMessage( 'helppage' )->inContentLanguage()->text() )
);
- # Replace this after transforming the message, bug 35019
+ # Replace this after transforming the message, T37019
$postTransformKeys['$PAGESUMMARY'] = $this->summary == '' ? ' - ' : $this->summary;
// Now build message's subject and body
if ( $params['interlace'] ) {
$animation_post = [ '-interlace', 'JPEG' ];
}
- # Sharpening, see bug 6193
+ # Sharpening, see T8193
if ( ( $params['physicalWidth'] + $params['physicalHeight'] )
/ ( $params['srcWidth'] + $params['srcHeight'] )
< $wgSharpenReductionThreshold
// be a total drag. :P
$scene = 0;
} elseif ( $this->isAnimatedImage( $image ) ) {
- // Coalesce is needed to scale animated GIFs properly (bug 1017).
+ // Coalesce is needed to scale animated GIFs properly (T3017).
$animation_pre = [ '-coalesce' ];
// We optimize the output, but -optimize is broken,
- // use optimizeTransparency instead (bug 11822)
+ // use optimizeTransparency instead (T13822)
if ( version_compare( $this->getMagickVersion(), "6.3.5" ) >= 0 ) {
$animation_post = [ '-fuzz', '5%', '-layers', 'optimizeTransparency' ];
}
&& $xcfMeta['colorType'] === 'greyscale-alpha'
&& version_compare( $this->getMagickVersion(), "6.8.9-3" ) < 0
) {
- // bug 66323 - Greyscale images not rendered properly.
+ // T68323 - Greyscale images not rendered properly.
// So only take the "red" channel.
$channelOnly = [ '-channel', 'R', '-separate' ];
$animation_pre = array_merge( $animation_pre, $channelOnly );
$im->readImage( $params['srcPath'] );
if ( $params['mimeType'] == 'image/jpeg' ) {
- // Sharpening, see bug 6193
+ // Sharpening, see T8193
if ( ( $params['physicalWidth'] + $params['physicalHeight'] )
/ ( $params['srcWidth'] + $params['srcHeight'] )
< $wgSharpenReductionThreshold
// be a total drag. :P
$im->setImageScene( 0 );
} elseif ( $this->isAnimatedImage( $image ) ) {
- // Coalesce is needed to scale animated GIFs properly (bug 1017).
+ // Coalesce is needed to scale animated GIFs properly (T3017).
$im = $im->coalesceImages();
}
// GIF interlacing is only available since 6.3.4
* @param string $cmd
*/
protected function logErrorForExternalProcess( $retval, $err, $cmd ) {
- # Keep error output limited (bug 57985)
+ # Keep error output limited (T59985)
$errMessage = trim( substr( $err, 0, self::MAX_ERR_LOG_SIZE ) );
wfDebugLog( 'thumbnail',
}
// Expand entities, since Adobe Illustrator uses them for xmlns
- // attributes (bug 31719). Note that libxml2 has some protection
+ // attributes (T33719). Note that libxml2 has some protection
// against large recursive entity expansions so this is not as
// insecure as it might appear to be. However, it is still extremely
// insecure. It's necessary to wrap any read() calls with
// libxml_disable_entity_loader() to avoid arbitrary local file
// inclusion, or even arbitrary code execution if the expect
- // extension is installed (bug 46859).
+ // extension is installed (T48859).
$oldDisable = libxml_disable_entity_loader( true );
$this->reader->setParserProperty( XMLReader::SUBST_ENTITIES, true );
$exptime = $this->convertExpiry( $exptime );
$encExpiry = $db->timestamp( $exptime );
}
- // (bug 24425) use a replace if the db supports it instead of
+ // (T26425) use a replace if the db supports it instead of
// delete/insert to avoid clashes with conflicting keynames
$db->update(
$tableName,
], __METHOD__, 'IGNORE' );
if ( $db->affectedRows() == 0 ) {
- // Race condition. See bug 28611
+ // Race condition. See T30611
$newValue = null;
}
} catch ( DBError $e ) {
$ns = $this->getTitle()->getNamespace();
- # Don't index user and user talk pages for blocked users (bug 11443)
+ # Don't index user and user talk pages for blocked users (T13443)
if ( ( $ns == NS_USER || $ns == NS_USER_TALK ) && !$this->getTitle()->isSubpage() ) {
$specificTarget = null;
$vagueTarget = null;
}
if ( isset( $wgArticleRobotPolicies[$this->getTitle()->getPrefixedText()] ) ) {
- # (bug 14900) site config can override user-defined __INDEX__ or __NOINDEX__
+ # (T16900) site config can override user-defined __INDEX__ or __NOINDEX__
$policy = array_merge(
$policy,
self::formatRobotPolicy( $wgArticleRobotPolicies[$this->getTitle()->getPrefixedText()] )
}
$out->addModuleStyles( [
- 'filepage', // always show the local local Filepage.css, bug 29277
+ 'filepage', // always show the local local Filepage.css, T31277
'mediawiki.action.view.filepage', // Add MediaWiki styles for a file page
] );
}
// this will get messy.
// The dirmark, however, must not be immediately adjacent
// to the filename, because it can get copied with it.
- // See bug 25277.
+ // See T27277.
// @codingStandardsIgnoreStart Ignore long line
$out->addWikiText( <<<EOT
<div class="fullMedia"><span class="dangerousLink">{$medialink}</span> $dirmark<span class="fileInfo">$longDesc</span></div>
* @return WikiPage|null
*/
public static function newFromID( $id, $from = 'fromdb' ) {
- // page id's are never 0 or negative, see bug 61166
+ // page ids are never 0 or negative, see T63166
if ( $id < 1 ) {
return null;
}
$this->mTimestamp = '';
$this->mIsRedirect = false;
$this->mLatest = false;
- // Bug 57026: do not clear mPreparedEdit since prepareTextForEdit() already checks
+ // T59026: do not clear mPreparedEdit since prepareTextForEdit() already checks
// the requested rev ID and content against the cached one for equality. For most
// content types, the output should not change during the lifetime of this cache.
// Clearing it can cause extra parses on edit for no reason.
$this->mLinksUpdated = wfTimestampOrNull( TS_MW, $data->page_links_updated );
$this->mIsRedirect = intval( $data->page_is_redirect );
$this->mLatest = intval( $data->page_latest );
- // Bug 37225: $latest may no longer match the cached latest Revision object.
+ // T39225: $latest may no longer match the cached latest Revision object.
// Double-check the ID of any cached latest Revision object for consistency.
if ( $this->mLastRevision && $this->mLastRevision->getId() != $this->mLatest ) {
$this->mLastRevision = null;
}
if ( $this->mDataLoadedFrom == self::READ_LOCKING ) {
- // Bug 37225: if session S1 loads the page row FOR UPDATE, the result always
+ // T39225: if session S1 loads the page row FOR UPDATE, the result always
// includes the latest changes committed. This is true even within REPEATABLE-READ
// transactions, where S1 normally only sees changes committed before the first S1
// SELECT. Thus we need S1 to also gets the revision row FOR UPDATE; otherwise, it
$this->getContentHandler()->getModelID() );
}
- // Bug 30711: always use current version when adding a new section
+ // T32711: always use current version when adding a new section
if ( is_null( $baseRevId ) || $sectionId === 'new' ) {
$oldContent = $this->getContent();
} else {
return $status;
} elseif ( !$oldContent ) {
- // Sanity check for bug 37225
+ // Sanity check for T39225
throw new MWException( "Could not find text for current revision {$oldid}." );
}
$dbw->endAtomic( __METHOD__ );
$this->mTimestamp = $now;
} else {
- // Bug 32948: revision ID must be set to page {{REVISIONID}} and
+ // T34948: revision ID must be set to page {{REVISIONID}} and
// related variables correctly. Likewise for {{REVISIONUSER}} (T135261).
$revision->setId( $this->getLatest() );
$revision->setUserIdAndName(
$user = is_null( $user ) ? $wgUser : $user;
// XXX: check $user->getId() here???
- // Use a sane default for $serialFormat, see bug 57026
+ // Use a sane default for $serialFormat, see T59026
if ( $serialFormat === null ) {
$serialFormat = $content->getContentHandler()->getDefaultFormat();
}
// Update the links tables and other secondary data
if ( $content ) {
- $recursive = $options['changed']; // bug 50785
+ $recursive = $options['changed']; // T52785
$updates = $content->getSecondaryDataUpdates(
$this->getTitle(), null, $recursive, $editInfo->output
);
if ( $options['created'] ) {
self::onArticleCreate( $this->mTitle );
- } elseif ( $options['changed'] ) { // bug 50785
+ } elseif ( $options['changed'] ) { // T52785
self::onArticleEdit( $this->mTitle, $revision );
}
$dbw->onTransactionPreCommitOrIdle(
function () use ( $dbw, $logEntry, $logid ) {
- // Bug 56776: avoid deadlocks (especially from FileDeleteForm)
+ // T58776: avoid deadlocks (especially from FileDeleteForm)
$logEntry->publish( $logid );
},
__METHOD__
);
// Set patrolling and bot flag on the edits, which gets rollbacked.
- // This is done even on edit failure to have patrolling in that case (bug 62157).
+ // This is done even on edit failure to have patrolling in that case (T64157).
$set = [];
if ( $bot && $guser->isAllowed( 'markbotedits' ) ) {
// Mark all reverted edits as bot
if ( $openMatch || $closeMatch ) {
$pendingPTag = false;
- # @todo bug 5718: paragraph closed
+ # @todo T7718: paragraph closed
$output .= $this->closeParagraph();
if ( $preOpenMatch && !$preCloseMatch ) {
$this->inPre = true;
}
}
}
- # somewhere above we forget to get out of pre block (bug 785)
+ # somewhere above we forget to get out of pre block (T2785)
if ( $preCloseMatch && $this->inPre ) {
$this->inPre = false;
}
}
/**
- * urlencodes a string according to one of three patterns: (bug 22474)
+ * urlencodes a string according to one of three patterns: (T24474)
*
* By default (for HTTP "query" strings), spaces are encoded as '+'.
* Or to encode a value for the HTTP "path", spaces are encoded as '%20'.
// The edit section preference may not be the appropiate one in
// the ParserOutput, as we are not storing it in the parsercache
- // key. Force it here. See bug 31445.
+ // key. Force it here. See T33445.
$value->setEditSectionTokens( $popts->getEditSection() );
$wikiPage = method_exists( $article, 'getPage' )
* when the page is rendered based on the language of the user.
*
* @note When saving, this will return the default language instead of the user's.
- * {{int: }} uses this which used to produce inconsistent link tables (bug 14404).
+ * {{int: }} uses this which used to produce inconsistent link tables (T16404).
*
* @return Language
* @since 1.19
return false;
}
- // Important to parse with correct title (bug 31469)
+ // Important to parse with correct title (T33469)
$cat = wfMessage( $msg )
->title( $title )
->inContentLanguage()
* is to assume a direct page view.
*
* The generated DOM tree must depend only on the input text and the flags.
- * The DOM tree must be the same in OT_HTML and OT_WIKI mode, to avoid a regression of bug 4899.
+ * The DOM tree must be the same in OT_HTML and OT_WIKI mode, to avoid a regression of T6899.
*
* Any flag added to the $flags parameter here, or any other parameter liable to cause a
* change in the DOM tree for a given text, must be passed through the section identifier
* included. Default is to assume a direct page view.
*
* The generated DOM tree must depend only on the input text and the flags.
- * The DOM tree must be the same in OT_HTML and OT_WIKI mode, to avoid a regression of bug 4899.
+ * The DOM tree must be the same in OT_HTML and OT_WIKI mode, to avoid a regression of T6899.
*
* Any flag added to the $flags parameter here, or any other parameter liable to cause a
* change in the DOM tree for a given text, must be passed through the section identifier
return false;
}
- // Reduce effects of race conditions for slow parses (bug 46014)
+ // Reduce effects of race conditions for slow parses (T48014)
$cacheTime = wfTimestampNow();
$time = - microtime( true );
}
public function canUse() {
- # Do not log anything if database is readonly (bug 5375)
+ # Do not log anything if database is readonly (T7375)
return !wfReadOnly();
}
$module = $this->getModule( $name );
if ( $module ) {
// Do not allow private modules to be loaded from the web.
- // This is a security issue, see bug 34907.
+ // This is a security issue, see T36907.
if ( $module->getGroup() === 'private' ) {
$this->logger->debug( "Request for private module '$name' denied" );
$this->errors[] = "Cannot show private module \"$name\"";
$styles = (array)$styles;
foreach ( $styles as $style ) {
$style = trim( $style );
- // Don't output an empty "@media print { }" block (bug 40498)
+ // Don't output an empty "@media print { }" block (T42498)
if ( $style !== '' ) {
// Transform the media type based on request params and config
// The way that this relies on $wgRequest to propagate request params is slightly evil
*/
public function getLessCompiler( $extraVars = [] ) {
// When called from the installer, it is possible that a required PHP extension
- // is missing (at least for now; see bug 47564). If this is the case, throw an
+ // is missing (at least for now; see T49564). If this is the case, throw an
// exception (caught by the installer) to prevent a fatal error later on.
if ( !class_exists( 'Less_Parser' ) ) {
throw new MWException( 'MediaWiki requires the less.php parser' );
// Special handling for the user group; because users might change their stuff
// on-wiki like user pages, or user preferences; we need to find the highest
// timestamp of these user-changeable modules so we can ensure cache misses on change
- // This should NOT be done for the site group (bug 27564) because anons get that too
+ // This should NOT be done for the site group (T29564) because anons get that too
// and we shouldn't be putting timestamps in CDN-cached HTML
if ( $group === 'user' ) {
// Must setModules() before makeVersionQuery()
if ( $this->direction === null ) {
$this->direction = $this->getRequest()->getRawVal( 'dir' );
if ( !$this->direction ) {
- // Determine directionality based on user language (bug 6100)
+ // Determine directionality based on user language (T8100)
$this->direction = Language::factory( $this->getLanguage() )->getDir();
}
}
&& substr( rtrim( $scripts ), -1 ) !== ';'
) {
// Append semicolon to prevent weird bugs caused by files not
- // terminating their statements right (bug 27054)
+ // terminating their statements right (T29054)
$scripts .= ";\n";
}
}
if ( $context->shouldIncludeStyles() ) {
$styles = [];
// Don't create empty stylesheets like [ '' => '' ] for modules
- // that don't *have* any stylesheets (bug 38024).
+ // that don't *have* any stylesheets (T40024).
$stylePairs = $this->getStyles( $context );
if ( count( $stylePairs ) ) {
// If we are in debug mode without &only= set, we'll want to return an array of URLs
'wgSearchType' => $conf->get( 'SearchType' ),
'wgVariantArticlePath' => $conf->get( 'VariantArticlePath' ),
// Force object to avoid "empty" associative array from
- // becoming [] instead of {} in JS (bug 34604)
+ // becoming [] instead of {} in JS (T36604)
'wgActionPaths' => (object)$conf->get( 'ActionPaths' ),
'wgServer' => $conf->get( 'Server' ),
'wgServerName' => $conf->get( 'ServerName' ),
return true;
}
- // Bug 68488: For other modules (i.e. ones that are called in cached html output) only check
+ // T70488: For other modules (i.e. ones that are called in cached html output) only check
// page existance. This ensures that, if some pages in a module are temporarily blanked,
// we don't end omit the module's script or link tag on some pages.
return count( $revisions ) === 0;
if ( $title->isSpecialPage() ) {
$type = 'ns-special';
- // bug 23315: provide a class based on the canonical special page name without subpages
+ // T25315: provide a class based on the canonical special page name without subpages
list( $canonicalName ) = SpecialPageFactory::resolveAlias( $title->getDBkey() );
if ( $canonicalName ) {
$type .= ' ' . Sanitizer::escapeClass( "mw-special-$canonicalName" );
$line = array_map( 'trim', explode( '|', $line, 2 ) );
if ( count( $line ) !== 2 ) {
// Second sanity check, could be hit by people doing
- // funky stuff with parserfuncs... (bug 33321)
+ // funky stuff with parserfuncs... (T35321)
continue;
}
$attribs = [];
if ( !is_null( $tooltip ) ) {
- # Bug 25462: undo double-escaping.
+ # T27462: undo double-escaping.
$tooltip = Sanitizer::decodeCharReferences( $tooltip );
$attribs['title'] = wfMessage( 'editsectionhint' )->rawParams( $tooltip )
->inLanguage( $lang )->text();
/* set up the default links for the personal toolbar */
$personal_urls = [];
- # Due to bug 32276, if a user does not have read permissions,
+ # Due to T34276, if a user does not have read permissions,
# $this->getTitle() will just give Special:Badtitle, which is
# not especially useful as a returnto parameter. Use the title
# from the request instead, if there was one.
'text' => $this->msg( 'pt-userlogout' )->text(),
'href' => self::makeSpecialUrl( 'Userlogout',
// userlogout link must always contain an & character, otherwise we might not be able
- // to detect a buggy precaching proxy (bug 17790)
+ // to detect a buggy precaching proxy (T19790)
$title->isSpecial( 'Preferences' ) ? 'noreturnto' : $returnto ),
'active' => false
];
$content_navigation['namespaces']['special'] = [
'class' => 'selected',
'text' => $this->msg( 'nstab-special' )->text(),
- 'href' => $request->getRequestURL(), // @see: bug 2457, bug 2510
+ 'href' => $request->getRequestURL(), // @see: T4457, T4510
'context' => 'subject'
];
$operator = $opts['invert'] ? '!=' : '=';
$boolean = $opts['invert'] ? 'AND' : 'OR';
- // Namespace association (bug 2429)
+ // Namespace association (T4429)
if ( !$opts['associated'] ) {
$condition = "rc_namespace $operator $selectedNS";
} else {
# 1. When switching accounts, it sucks to get automatically logged out
# 2. Do not return to PasswordReset after a successful password change
- # but goto Wiki start page (Main_Page) instead ( bug 33997 )
+ # but goto Wiki start page (Main_Page) instead ( T35997 )
$returnToTitle = Title::newFromText( $this->mReturnTo );
if ( is_object( $returnToTitle )
&& ( $returnToTitle->isSpecial( 'Userlogout' )
$user = $this->getUser();
$template = new FakeAuthTemplate();
- // Pre-fill username (if not creating an account, bug 44775).
+ // Pre-fill username (if not creating an account, T46775).
if ( $data->mUsername == '' && $this->isSignup() ) {
if ( $user->isLoggedIn() ) {
$data->mUsername = $user->getName();
$value = wfTimestamp( TS_UNIX,
$row->value );
} else {
- $value = intval( $row->value ); // @bug 14414
+ $value = intval( $row->value ); // T16414
}
} else {
$value = 0;
return [ null, null ];
}
- if ( !isset( $bits[1] ) ) { // bug 2087
+ if ( !isset( $bits[1] ) ) { // T4087
$par = null;
} else {
$par = $bits[1];
// @todo FIXME: Redirects broken due to this call
$bits = explode( '/', $title->getDBkey(), 2 );
$name = $bits[0];
- if ( !isset( $bits[1] ) ) { // bug 2087
+ if ( !isset( $bits[1] ) ) { // T4087
$par = null;
} else {
$par = $bits[1];
return $this->mTitle;
}
- // Windows may be broken with special characters, see bug 1780
+ // Windows may be broken with special characters, see T3780
if ( !preg_match( '/^[\x0-\x7f]*$/', $nt->getText() )
&& !RepoGroup::singleton()->getLocalRepo()->backendSupportsUnicodePaths()
) {
}
// Some browsers will interpret obscure xml encodings as UTF-8, while
- // PHP/expat will interpret the given encoding in the xml declaration (bug 47304)
+ // PHP/expat will interpret the given encoding in the xml declaration (T49304)
if ( $extension == 'svg' || strpos( $mime, 'image/svg' ) === 0 ) {
if ( self::checkXMLEncodingMissmatch( $file ) ) {
return true;
[ 'processing_instruction_handler' => 'UploadBase::checkSvgPICallback' ]
);
if ( $check->wellFormed !== true ) {
- // Invalid xml (bug 58553)
- // But only when non-partial (bug 65724)
+ // Invalid xml (T60553)
+ // But only when non-partial (T67724)
return $partial ? false : [ 'uploadinvalidxml' ];
} elseif ( $check->filterMatch ) {
if ( $this->mSVGNSError ) {
* @return bool (true if the filter identified something bad)
*/
public static function checkSvgPICallback( $target, $data ) {
- // Don't allow external stylesheets (bug 57550)
+ // Don't allow external stylesheets (T59550)
if ( preg_match( '/xml-stylesheet/i', $target ) ) {
return [ 'upload-scripted-pi-callback' ];
}
list( $namespace, $strippedElement ) = $this->splitXmlNamespace( $element );
// We specifically don't include:
- // http://www.w3.org/1999/xhtml (bug 60771)
+ // http://www.w3.org/1999/xhtml (T62771)
static $validNamespaces = [
'',
'adobe:ns:meta/',
$firstUser = $users[0];
if ( !$firstUser instanceof User || !$firstUser->getId() ) {
- // Don't parse username as wikitext (bug 65501)
+ // Don't parse username as wikitext (T67501)
return StatusValue::newFatal( wfMessage( 'nosuchuser', wfEscapeWikiText( $username ) ) );
}
wfEscapeWikiText( $firstUser->getName() ) ) );
}
- // We need to have a valid IP address for the hook, but per bug 18347, we should
+ // We need to have a valid IP address for the hook, but per T20347, we should
// send the user's name if they're logged in.
$ip = $performingUser->getRequest()->getIP();
if ( !$ip ) {
// Ensure that the username isn't longer than 235 bytes, so that
// (at least for the builtin skins) user javascript and css files
- // will work. (bug 23080)
+ // will work. (T25080)
if ( strlen( $name ) > 235 ) {
wfDebugLog( 'username', __METHOD__ .
": '$name' invalid due to length" );
}
// Clean up name according to title rules,
- // but only when validation is requested (bug 12654)
+ // but only when validation is requested (T14654)
$t = ( $validate !== false ) ?
Title::newFromText( $name, NS_USER ) : Title::makeTitle( NS_USER, $name );
// Check for invalid titles
}
}
- // (bug 23343) Apply IP blocks to the contents of XFF headers, if enabled
+ // (T25343) Apply IP blocks to the contents of XFF headers, if enabled
if ( !$block instanceof Block
&& $wgApplyIpBlocksToXff
&& $ip !== null
$found = false;
// @todo FIXME: IPv6 ??? (https://bugs.php.net/bug.php?id=33170)
if ( IP::isIPv4( $ip ) ) {
- // Reverse IP, bug 21255
+ // Reverse IP, T23255
$ipReversed = implode( '.', array_reverse( explode( '.', $ip ) ) );
foreach ( (array)$bases as $base ) {
* }
* // do something with $user...
*
- * However, this was vulnerable to a race condition (bug 16020). By
+ * However, this was vulnerable to a race condition (T18020). By
* initialising the user object if the user exists, we aim to support this
* calling sequence as far as possible.
*
return $this->mBlock;
}
- # bug 13611: if the IP address the user is trying to create an account from is
+ # T15611: if the IP address the user is trying to create an account from is
# blocked with createaccount disabled, prevent new account creation there even
# when the user is logged in
if ( $this->mBlockedFromCreateAccount === false && !$this->isAllowed( 'ipblock-exempt' ) ) {
* @note Since these URLs get dropped directly into emails, using the
* short English names avoids insanely long URL-encoded links, which
* also sometimes can get corrupted in some browsers/mailers
- * (bug 6957 with Gmail and Internet Explorer).
+ * (T8957 with Gmail and Internet Explorer).
*
* @param string $page Special page
* @param string $token Token
# Note that the pattern requirement will always be satisfied if the
# input is empty, so we need required in all cases.
- # @todo FIXME: Bug 23769: This needs to not claim the password is required
+ # @todo FIXME: T25769: This needs to not claim the password is required
# if e-mail confirmation is being used. Since HTML5 input validation
# is b0rked anyway in some browsers, just return nothing. When it's
# re-enabled, fix this code to not output required for e-mail