quote in separate function as well
authorGabriel Wicke <gwicke@users.mediawiki.org>
Mon, 10 May 2004 19:16:50 +0000 (19:16 +0000)
committerGabriel Wicke <gwicke@users.mediawiki.org>
Mon, 10 May 2004 19:16:50 +0000 (19:16 +0000)
includes/Title.php

index 3bee660..7f1c63d 100644 (file)
@@ -522,7 +522,7 @@ class Title {
                # protect css/js subpages of user pages
                # XXX: this might be better using restrictions
                global $wgUser;
-               return ( $wgUser->isSysop() or preg_match("/^".$wgUser->getName()."/", $this->mTextform) );
+               return ( $wgUser->isSysop() or preg_match("/^".preg_quote($wgUser->getName())."/", $this->mTextform) );
        }
 
        # Accessor/initialisation for mRestrictions