Don't let underscore differences cause read whitelist matches to fail (bug 11668)
authorAaron Schulz <aaron@users.mediawiki.org>
Fri, 16 May 2008 20:06:19 +0000 (20:06 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Fri, 16 May 2008 20:06:19 +0000 (20:06 +0000)
includes/Title.php

index 28ee6fb..89e20b0 100644 (file)
@@ -1445,7 +1445,9 @@ class Title {
                         * Check for explicit whitelisting
                         */
                        $name = $this->getPrefixedText();
-                       if( in_array( $name, $wgWhitelistRead, true ) )
+                       $dbName = $this->getPrefixedDBKey();
+                       // Check with and without underscores
+                       if( in_array($name,$wgWhitelistRead,true) || in_array($dbName,$wgWhitelistRead,true) )
                                return true;
 
                        /**