diff --git a/var/Typecho/Common.php b/var/Typecho/Common.php index 2579fc07..02f7b8e1 100644 --- a/var/Typecho/Common.php +++ b/var/Typecho/Common.php @@ -202,13 +202,7 @@ class Typecho_Common public static function init() { /** 设置自动载入函数 */ - if (function_exists('spl_autoload_register')) { - spl_autoload_register(array('Typecho_Common', '__autoLoad')); - } else { - function __autoLoad($className) { - Typecho_Common::__autoLoad($className); - } - } + spl_autoload_register(array('Typecho_Common', '__autoLoad')); /** 兼容php6 */ if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) { 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) {