Merge branch 'master' of github.com:typecho/typecho

This commit is contained in:
joyqi 2017-09-28 13:06:02 +08:00
commit 0e7b399ba8
2 changed files with 2 additions and 8 deletions

View File

@ -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()) {

View File

@ -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) {