From 6005d80b200f786a36926c5d6f07fe33ce0beaeb Mon Sep 17 00:00:00 2001 From: jrotty Date: Tue, 19 Sep 2017 10:42:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E9=A2=98=E7=BC=A9=E7=95=A5=E5=9B=BE?= =?UTF-8?q?=E4=BD=BF=E7=94=A8screenshot=E5=91=BD=E5=90=8D=E7=9A=84?= =?UTF-8?q?=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复主题根目录存在screenshot.png和其他图片时,主题展示图抓取其他图片的问题 --- var/Widget/Themes/List.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/Widget/Themes/List.php b/var/Widget/Themes/List.php index 6feef13e..2833b6bf 100644 --- a/var/Widget/Themes/List.php +++ b/var/Widget/Themes/List.php @@ -69,7 +69,7 @@ class Widget_Themes_List extends Typecho_Widget } $screen = array_filter(glob($theme . '/*'), function ($path) { - return preg_match("/\.(jpg|png|gif|bmp|jpeg)$/i", $path); + return preg_match("/screenshot\.(jpg|png|gif|bmp|jpeg)$/i", $path); }); if ($screen) {