aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_user.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/functions_user.inc.php')
-rw-r--r--include/functions_user.inc.php11
1 files changed, 2 insertions, 9 deletions
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index b25105c6e..472487342 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -42,7 +42,7 @@ function validate_mail_address($user_id, $mail_address)
}
$atom = '[-a-z0-9!#$%&\'*+\\/=?^_`{|}~]'; // before arobase
- $domain = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)'; // domain name
+ $domain = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)'; // domain name
$regex = '/^' . $atom . '+' . '(\.' . $atom . '+)*' . '@' . '(' . $domain . '{1,63}\.)+' . $domain . '{2,63}$/i';
if ( !preg_match( $regex, $mail_address ) )
@@ -851,14 +851,7 @@ function get_default_language()
*/
function get_browser_language(&$lang)
{
- if (!empty($_SERVER["HTTP_ACCEPT_LANGUAGE"]))
- {
- $browser_language = substr($_SERVER["HTTP_ACCEPT_LANGUAGE"], 0, 2);
- }
- else
- {
- $browser_language = '';
- }
+ $browser_language = substr(@$_SERVER["HTTP_ACCEPT_LANGUAGE"], 0, 2);
foreach (get_languages() as $language_code => $language_name)
{
if (substr($language_code, 0, 2) == $browser_language)