Suppress hidden files from skin list; some backup and magic-filesystem-stuff systems...
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 25 Nov 2004 22:42:33 +0000 (22:42 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 25 Nov 2004 22:42:33 +0000 (22:42 +0000)
includes/Skin.php

index 2d254a6..118f90c 100644 (file)
@@ -23,9 +23,9 @@ $skinDir = dir($IP.'/skins');
 
 # while code from www.php.net
 while (false !== ($file = $skinDir->read())) {
-       if(preg_match('/^(.*).php$/',$file, $matches)) {
+       if(preg_match('/^([^.].*)\.php$/',$file, $matches)) {
                $aSkin = $matches[1];
-       $wgValidSkinNames[strtolower($aSkin)] = $aSkin;
+               $wgValidSkinNames[strtolower($aSkin)] = $aSkin;
        }
 }
 $skinDir->close();