From a76fcfb06ba8dc6ca7a39a3c87247ba147202274 Mon Sep 17 00:00:00 2001 From: zero Date: Fri, 28 Aug 2009 02:50:23 +0000 Subject: [PATCH] =?UTF-8?q?#18255979=20cache=20=EB=94=94=EB=A0=89=ED=86=A0?= =?UTF-8?q?=EB=A6=AC=EC=97=90=20=EB=B3=B4=EA=B4=80=EB=90=98=EB=8D=98=20?= =?UTF-8?q?=EA=B4=80=EB=A6=AC=EC=9E=90=20=EC=96=B8=EC=96=B4=20=EC=84=A0?= =?UTF-8?q?=ED=83=9D=20=EC=A0=95=EB=B3=B4=EB=A5=BC=20./files/config?= =?UTF-8?q?=EC=97=90=20=EC=A0=80=EC=9E=A5=ED=95=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=ED=95=98=EC=97=AC=20cache=20=EB=94=94=EB=A0=89=ED=86=A0?= =?UTF-8?q?=EB=A6=AC=EA=B0=80=20=EC=B4=88=EA=B8=B0=ED=99=94=EB=90=98?= =?UTF-8?q?=EB=8D=94=EB=9D=BC=EB=8F=84=20=EB=8D=B0=EC=9D=B4=ED=84=B0?= =?UTF-8?q?=EB=A5=BC=20=EC=9C=A0=EC=A7=80=ED=95=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6762 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/context/Context.class.php | 10 +++++++++- modules/install/install.admin.controller.php | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 76cdbbfc3..542db98a1 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -317,7 +317,15 @@ static $lang_selected = null; if(is_null($lang_selected)) { $orig_lang_file = _XE_PATH_.'common/lang/lang.info'; - $selected_lang_file = _XE_PATH_.'files/cache/lang_selected.info'; + $selected_lang_file = _XE_PATH_.'files/config/lang_selected.info'; + if(!file_exists($selected_lang_file) || !filesize($selected_lang_file)) { + $old_selected_lang_file = _XE_PATH_.'files/cache/lang_selected.info'; + if(file_exists($old_selected_lang_file)) { + FileHandler::copyFile($old_selected_lang_file, $selected_lang_file); + FileHandler::removeFile($old_selected_lang_file); + } + } + if(!file_exists($selected_lang_file) || !filesize($selected_lang_file)) { $buff = FileHandler::readFile($orig_lang_file); FileHandler::writeFile($selected_lang_file, $buff); diff --git a/modules/install/install.admin.controller.php b/modules/install/install.admin.controller.php index 51f916c72..cf7385e12 100644 --- a/modules/install/install.admin.controller.php +++ b/modules/install/install.admin.controller.php @@ -110,7 +110,7 @@ $buff .= sprintf("%s,%s\n", $langs[$i], $lang_supported[$langs[$i]]); } - FileHandler::writeFile(_XE_PATH_.'files/cache/lang_selected.info', trim($buff)); + FileHandler::writeFile(_XE_PATH_.'files/config/lang_selected.info', trim($buff)); $this->setMessage('success_updated'); }