rename get_language() to get_browser_language()
This commit is contained in:
parent
eaf028c9fb
commit
3811fe288f
4 changed files with 6 additions and 6 deletions
|
@ -15,10 +15,10 @@
|
|||
*/
|
||||
|
||||
|
||||
if(! function_exists('get_language')) {
|
||||
function get_language() {
|
||||
if(! function_exists('get_browser_language')) {
|
||||
function get_browser_language() {
|
||||
|
||||
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
|
||||
if (x($_SERVER,'HTTP_ACCEPT_LANGUAGE')) {
|
||||
// break up string into pieces (languages and q factors)
|
||||
preg_match_all('/([a-z]{1,8}(-[a-z]{1,8})?)\s*(;\s*q\s*=\s*(1|0\.[0-9]+))?/i',
|
||||
$_SERVER['HTTP_ACCEPT_LANGUAGE'], $lang_parse);
|
||||
|
|
|
@ -76,7 +76,7 @@ function authenticate_success($user_record, $login_initial = false, $interactive
|
|||
header('X-Account-Management-Status: active; name="' . $a->user['username'] . '"; id="' . $a->user['nickname'] .'"');
|
||||
|
||||
if($login_initial) {
|
||||
$l = get_language();
|
||||
$l = get_browser_language();
|
||||
|
||||
q("UPDATE `user` SET `login_date` = '%s', `language` = '%s' WHERE `uid` = %d LIMIT 1",
|
||||
dbesc(datetime_convert()),
|
||||
|
|
|
@ -27,7 +27,7 @@ $install = ((file_exists('.htconfig.php') && filesize('.htconfig.php')) ? false
|
|||
|
||||
@include(".htconfig.php");
|
||||
|
||||
$lang = get_language();
|
||||
$lang = get_browser_language();
|
||||
|
||||
load_translation_table($lang);
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ require_once("boot.php");
|
|||
$a = new App;
|
||||
@include(".htconfig.php");
|
||||
|
||||
$lang = get_language();
|
||||
$lang = get_browser_language();
|
||||
load_translation_table($lang);
|
||||
|
||||
require_once("dba.php");
|
||||
|
|
Loading…
Reference in a new issue