From d9f78403c75851c7f9e04e3959875955bef2b1b2 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 25 Nov 2004 22:42:33 +0000 Subject: [PATCH] Suppress hidden files from skin list; some backup and magic-filesystem-stuff systems put junk in there. --- includes/Skin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/Skin.php b/includes/Skin.php index 2d254a6693..118f90cebb 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -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(); -- 2.20.1