Skip to content

Commit

Permalink
get_user_lang() cancel sqlerr
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomlove committed Dec 6, 2024
1 parent 9afc3bd commit 035fd36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ function get_langfolder_cookie($transToLocale = false)

function get_user_lang($user_id)
{
$lang = mysql_fetch_assoc(sql_query("SELECT site_lang_folder FROM language LEFT JOIN users ON language.id = users.lang WHERE language.site_lang=1 AND users.id= ". sqlesc($user_id) ." LIMIT 1")) or sqlerr(__FILE__, __LINE__);
return $lang['site_lang_folder'];
$lang = mysql_fetch_assoc(sql_query("SELECT site_lang_folder FROM language LEFT JOIN users ON language.id = users.lang WHERE language.site_lang=1 AND users.id= ". sqlesc($user_id) ." LIMIT 1"));
return $lang['site_lang_folder'] ?: 'en';
}

function get_langfile_path($script_name ="", $target = false, $lang_folder = "")
Expand Down

0 comments on commit 035fd36

Please sign in to comment.