Fix r42022, always returning true for isValidInterwiki as I forgot to add the check.
authorMatt Johnston <mattj@users.mediawiki.org>
Mon, 13 Oct 2008 09:31:46 +0000 (09:31 +0000)
committerMatt Johnston <mattj@users.mediawiki.org>
Mon, 13 Oct 2008 09:31:46 +0000 (09:31 +0000)
includes/Interwiki.php
includes/Title.php

index 9bd33ea..33e69a1 100644 (file)
@@ -50,7 +50,7 @@ class Interwiki {
                        unset( self::$smCache[ key( self::$smCache ) ] );
                }
                self::$smCache[$prefix] = $iw;
-               return true;
+               return ($iw != false);
        }
 
        /**
@@ -175,7 +175,9 @@ class Interwiki {
                $iw = false;
                if( $mc && is_array( $mc ) ){ // is_array is hack for old keys
                        $iw = Interwiki::loadFromArray( $mc );
-                       return $iw;
+                       if( $iw ){
+                               return $iw;
+                       }
                }
                
                $db = wfGetDB( DB_SLAVE );
index 36d0f2c..47e68b2 100644 (file)
@@ -675,7 +675,7 @@ class Title {
                        $query = wfArrayToCGI( $query );
                }
 
-               if ( '' == $this->mInterwiki ) {
+               if ( '' == $this->mInterwiki || !Interwiki::isValidInterwiki( $this->mInterwiki ) ) {
                        $url = $this->getLocalUrl( $query, $variant );
 
                        // Ugly quick hack to avoid duplicate prefixes (bug 4571 etc)