From 0e99f8eb4493ef8b765731b4edd1c20017d7514f Mon Sep 17 00:00:00 2001 From: conory Date: Sun, 6 Mar 2016 23:42:06 +0900 Subject: [PATCH] =?UTF-8?q?lang()=20=ED=95=A8=EC=88=98=EC=9D=98=20langType?= =?UTF-8?q?=20=EA=B8=B0=EB=8A=A5=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/functions.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/common/functions.php b/common/functions.php index 388e8d78e..154d60455 100644 --- a/common/functions.php +++ b/common/functions.php @@ -32,7 +32,7 @@ function config($key, $value = null) * @param string $value `$code`s value * @return mixed */ -function lang($code = null, $value = null) +function lang($code, $value = null) { if (!$GLOBALS['lang'] instanceof Rhymix\Framework\Lang) { @@ -40,17 +40,13 @@ function lang($code = null, $value = null) $GLOBALS['lang']->loadDirectory(RX_BASEDIR . 'common/lang', 'common'); } - if ($code !== null && $value === null) + if ($value === null) { return $GLOBALS['lang']->get($code); } - else if ($code !== null && $value !== null) - { - $GLOBALS['lang']->set($code, $value); - } else { - return $GLOBALS['lang']->langType(); + $GLOBALS['lang']->set($code, $value); } }