From bcbb02b81e5fd525dac381e30fb13a2bb45b1b6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=81=E5=AE=81?= Date: Mon, 19 Jan 2015 14:09:14 +0800 Subject: [PATCH] =?UTF-8?q?fix=20#347=20=E4=BF=AE=E6=AD=A3=E5=A4=9A?= =?UTF-8?q?=E8=AF=AD=E8=A8=80=E6=94=AF=E6=8C=81=E6=97=A0=E6=B3=95=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E8=AF=AD=E8=A8=80=E5=90=8D=E7=A7=B0=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- var/Widget/Options/General.php | 2 +- var/Widget/Upload.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/var/Widget/Options/General.php b/var/Widget/Options/General.php index c59bca67..c6265058 100644 --- a/var/Widget/Options/General.php +++ b/var/Widget/Options/General.php @@ -35,7 +35,7 @@ class Widget_Options_General extends Widget_Abstract_Options implements Widget_I if (!empty($files)) { foreach ($files as $file) { - $getText = new Typecho_I18n_GetText($file); + $getText = new Typecho_I18n_GetText($file, false); list ($name) = explode('.', basename($file)); $title = $getText->translate('lang', $count); $langs[$name] = $count > -1 ? $title : $name; diff --git a/var/Widget/Upload.php b/var/Widget/Upload.php index 2927dca2..eb3d9d3f 100644 --- a/var/Widget/Upload.php +++ b/var/Widget/Upload.php @@ -71,7 +71,7 @@ class Widget_Upload extends Widget_Abstract_Contents implements Widget_Interface $info = pathinfo($name); $name = substr($info['basename'], 1); - return isset($info['extension']) ? $info['extension'] : ''; + return isset($info['extension']) ? strtolower($info['extension']) : ''; } /**