Add Title::hasFragment and use it
[lhc/web/wiklou.git] / includes / parser / CoreParserFunctions.php
index 1cc7a18..3966b9e 100644 (file)
@@ -387,7 +387,7 @@ class CoreParserFunctions {
 
                if ( !$wgRestrictDisplayTitle ) {
                        $parser->mOutput->setDisplayTitle( $text );
-               } elseif ( $title instanceof Title && $title->getFragment() == '' && $title->equals( $parser->mTitle ) ) {
+               } elseif ( $title instanceof Title && !$title->hasFragment() && $title->equals( $parser->mTitle ) ) {
                        $parser->mOutput->setDisplayTitle( $text );
                }