* ISO-8859-7 characters from 11/04 (0xB4) to 11/06 (0xB6)
* These are Unicode 900-902
*/
- $string = preg_replace("/([\264-\266])/","'&#' . (ord(\\1)+720)",$string);
+ $string = preg_replace("/([\264-\266])/e","'&#' . (ord('\\1')+720);",$string);
/* 11/07 (0xB7) Middle dot is the same in iso-8859-1 */
$string = str_replace("\267", '·', $string);
* ISO-8859-7 characters from 11/08 (0xB8) to 11/10 (0xBA)
* These are Unicode 900-902
*/
- $string = preg_replace("/([\270-\272])/","'&#' . (ord(\\1)+720)",$string);
+ $string = preg_replace("/([\270-\272])/e","'&#' . (ord('\\1')+720);",$string);
/*
* 11/11 (0xBB) Right angle quotation mark is the same as in
$string = str_replace("\273", '»', $string);
/* And now the rest of the charset */
- $string = preg_replace("/([\274-\376])/","'&#' . (ord(\\1)+720)",$string);
+ $string = preg_replace("/([\274-\376])/e","'&#'.(ord('\\1')+720);",$string);
return $string;
}
function set_up_language($sm_language, $do_search = false) {
static $SetupAlready = 0;
- global $HTTP_ACCEPT_LANGUAGE, $use_gettext, $languages,
+ global $use_gettext, $languages,
$squirrelmail_language, $squirrelmail_default_language,
$sm_notAlias;
}
$SetupAlready = TRUE;
- if ($do_search && ! $sm_language && isset($HTTP_ACCEPT_LANGUAGE)) {
- $sm_language = substr($HTTP_ACCEPT_LANGUAGE, 0, 2);
+ if ($do_search && ! $sm_language && isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
+ $sm_language = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
}
if (!$sm_language && isset($squirrelmail_default_language)) {
/* If we can fake gettext, try that */
elseif ($gettext_flags == 0) {
$use_gettext = true;
- include_once('../functions/gettext.php');
+ include_once(SM_PATH . 'functions/gettext.php');
} else {
/* Uh-ho. A weird install */
if (! $gettext_flags & 1) {
return $ret;
}
-?>
\ No newline at end of file
+?>