]> git.mxchange.org Git - friendica.git/commitdiff
rename get_language() to get_browser_language()
authorfriendica <info@friendica.com>
Sun, 13 May 2012 11:52:29 +0000 (04:52 -0700)
committerfriendica <info@friendica.com>
Sun, 13 May 2012 11:52:29 +0000 (04:52 -0700)
include/pgettext.php
include/security.php
index.php
util/db_update.php

index a079a468789909c9cebc6c5cfb2150c743986eb9..5a0eab0b01078267a424c65ce47e22ab32879aa5 100644 (file)
  */
 
 
-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);
index a92400b5c401a4d419a027f8d42e836ee6dce46c..af201d2af1853afd41284ee5306e49d6fe9500ea 100755 (executable)
@@ -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()),
index a409f47b41bf2dff1a48b406793a878587d677cd..94329eedc833a150f5cab8f27693fa9d3da1ed5c 100644 (file)
--- a/index.php
+++ b/index.php
@@ -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);
 
index 35620e80b756dda2e84594a9304a540896a9f9a6..978594ab9f91bc771959567e44d509024f00013b 100644 (file)
@@ -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");