From c97f558898663442f8404e5a45c9f80a73ba0c78 Mon Sep 17 00:00:00 2001 From: Loui Chang Date: Sat, 9 Jan 2010 18:24:53 -0500 Subject: Remove useless or redundant code for translations. Signed-off-by: Loui Chang --- web/lib/aur.inc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'web/lib/aur.inc') diff --git a/web/lib/aur.inc b/web/lib/aur.inc index 821288d..e0521ab 100644 --- a/web/lib/aur.inc +++ b/web/lib/aur.inc @@ -275,9 +275,8 @@ function set_lang() { $q.= "AND Sessions.SessionID = '"; $q.= mysql_real_escape_string($_COOKIE["AURSID"])."'"; $result = db_query($q, $dbh); - if (!$result) { - $LANG = "en"; - } else { + + if ($result) { $row = mysql_fetch_array($result); $LANG = $row[0]; } @@ -293,10 +292,8 @@ function set_lang() { setcookie("AURLANG", $LANG, 0, "/"); } - if ($LANG != DEFAULT_LANG ) { + if ($LANG != "en" ) { include_once("$LANG.po"); - } else { - include_once(DEFAULT_LANG.".po"); } return; -- cgit v1.2.3-54-g00ecf