Merge "Add PreferencesFormPreSave hook"
[lhc/web/wiklou.git] / includes / parser / Parser.php
index cdf5e98..9157619 100644 (file)
@@ -710,7 +710,7 @@ class Parser {
                        $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( '' );
@@ -1988,7 +1988,7 @@ class Parser {
                        }
 
                        $ns = $nt->getNamespace();
-                       $iw = $nt->getInterWiki();
+                       $iw = $nt->getInterwiki();
                        wfProfileOut( __METHOD__ . "-title" );
 
                        if ( $might_be_img ) { # if this is actually an invalid link
@@ -2120,7 +2120,7 @@ class Parser {
                        # 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;
                        }