[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] sitemgr/sitemgr-site/inc class.sitebo.inc.php [skwash
From: |
Dave Hall |
Subject: |
[Phpgroupware-cvs] sitemgr/sitemgr-site/inc class.sitebo.inc.php [skwashd-16-compat] |
Date: |
Mon, 15 Jan 2007 00:45:20 +0000 |
CVSROOT: /cvsroot/phpgroupware
Module name: sitemgr
Branch: skwashd-16-compat
Changes by: Dave Hall <skwashd> 07/01/15 00:45:20
Modified files:
sitemgr-site/inc: class.sitebo.inc.php
Log message:
notices
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/sitemgr/sitemgr-site/inc/class.sitebo.inc.php?cvsroot=phpgroupware&only_with_tag=skwashd-16-compat&r1=1.1.2.3.4.7&r2=1.1.2.3.4.8
Patches:
Index: class.sitebo.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/sitemgr-site/inc/class.sitebo.inc.php,v
retrieving revision 1.1.2.3.4.7
retrieving revision 1.1.2.3.4.8
diff -u -b -r1.1.2.3.4.7 -r1.1.2.3.4.8
--- class.sitebo.inc.php 15 Oct 2006 11:14:11 -0000 1.1.2.3.4.7
+++ class.sitebo.inc.php 15 Jan 2007 00:45:19 -0000 1.1.2.3.4.8
@@ -8,7 +8,7 @@
* Free Software Foundation; either version 2 of the License, or (at
your *
* option) any later version.
*
\*************************************************************************/
- /* $Id: class.sitebo.inc.php,v 1.1.2.3.4.7 2006/10/15 11:14:11 skwashd
Exp $ */
+ /* $Id: class.sitebo.inc.php,v 1.1.2.3.4.8 2007/01/15 00:45:19 skwashd
Exp $ */
class sitebo
{
@@ -430,9 +430,7 @@
return;
}
- $client_langs = split('[,;]',
$_SERVER['HTTP_ACCEPT_LANGUAGE']);
- if(is_array($client_langs))
- {
+ $client_langs = isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])
? split('[,;]', $_SERVER['HTTP_ACCEPT_LANGUAGE']) : array();
foreach($client_langs as $lang)
{
if(strlen($lang) != 2)
@@ -447,7 +445,6 @@
return;
}
}
- }
if ($this->isuser)
{
@@ -464,19 +461,20 @@
}
// create a array of languages the user is accepting
- $userLanguages =
explode(',',$GLOBALS['HTTP_ACCEPT_LANGUAGE']);
+ $userLanguages =
isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? explode(',' ,
$_SERVER['HTTP_ACCEPT_LANGUAGE']) : array();
// find usersupported language
- while (list($key,$value) = each($userLanguages))
+ $browserlang = '';
+ foreach ( $userLanguages as $lang )
{
// remove everything behind '-' example: de-de
- $value = trim($value);
- $pieces = explode('-', $value);
- $value = $pieces[0];
+ $lang = trim($lang);
+ $pieces = explode('-', $lang);
+ $lang = $pieces[0];
//print "current lang $value<br>";
- if (in_array($value,$supportedLanguages))
+ if (in_array($lang, $supportedLanguages))
{
- $browserlang = $value;
+ $browserlang = $lang;
break;
}
}
- [Phpgroupware-cvs] sitemgr/sitemgr-site/inc class.sitebo.inc.php [skwashd-16-compat],
Dave Hall <=