$t = Title::newFromText( 'NO TITLE' );
}
- if ( strval( $t->getFragment() ) !== '' ) {
+ if ( $t->hasFragment() ) {
# Strip the fragment to avoid various odd effects
$this->mTitle = clone $t;
$this->mTitle->setFragment( '' );
}
$ns = $nt->getNamespace();
- $iw = $nt->getInterWiki();
+ $iw = $nt->getInterwiki();
wfProfileOut( __METHOD__ . "-title" );
if ( $might_be_img ) { # if this is actually an invalid link
# Self-link checking. For some languages, variants of the title are checked in
# LinkHolderArray::doVariants() to allow batching the existence checks necessary
# for linking to a different variant.
- if ( $ns != NS_SPECIAL && $nt->equals( $this->mTitle ) && $nt->getFragment() === '' ) {
+ if ( $ns != NS_SPECIAL && $nt->equals( $this->mTitle ) && !$nt->hasFragment() ) {
$s .= $prefix . Linker::makeSelfLinkObj( $nt, $text, '', $trail );
continue;
}
case 'contentlanguage':
global $wgLanguageCode;
return $wgLanguageCode;
+ case 'cascadingsources':
+ $value = CoreParserFunctions::cascadingsources( $this );
+ break;
default:
$ret = null;
wfRunHooks( 'ParserGetVariableValueSwitch', array( &$this, &$this->mVarCache, &$index, &$ret, &$frame ) );
* cache may be implemented at a later date which takes further advantage of these strict
* dependency requirements.
*
- * @private
- *
* @return PPNode
*/
function preprocessToDom( $text, $flags = 0 ) {
if ( $file && !$title->equals( $file->getTitle() ) ) {
# Update fetched file title
$title = $file->getTitle();
- if ( is_null( $file->getRedirectedTitle() ) ) {
- # This file was not a redirect, but the title does not match.
- # Register under the new name because otherwise the link will
- # get lost.
- $this->mOutput->addImage( $title->getDBkey(), $time, $sha1 );
- }
+ $this->mOutput->addImage( $title->getDBkey(), $time, $sha1 );
}
return array( $file, $title );
}