taken into account Mac case
This commit is contained in:
@@ -642,8 +642,7 @@ if (!defined('__LIB_COMMON__')){
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines the <CR><LF> value depending on the user OS that may be grabbed
|
* Defines the <CR><LF> value depending on the user OS.
|
||||||
* from the 'HTTP_USER_AGENT' variable.
|
|
||||||
*
|
*
|
||||||
* @return string the <CR><LF> value to use
|
* @return string the <CR><LF> value to use
|
||||||
*
|
*
|
||||||
@@ -653,16 +652,19 @@ if (!defined('__LIB_COMMON__')){
|
|||||||
{
|
{
|
||||||
$the_crlf = "\n";
|
$the_crlf = "\n";
|
||||||
|
|
||||||
// The 'HTTP_USER_AGENT' variable has already been grabbed in
|
// The 'USR_OS' constant is defined in "./libraries/defines.lib.php3"
|
||||||
// "./libraries/defines.lib.php3"
|
// Win case
|
||||||
|
if (USR_OS == 'Win') {
|
||||||
// Searches for the word 'win'
|
$the_crlf = "\r\n";
|
||||||
if (!empty($GLOBALS['HTTP_USER_AGENT'])
|
}
|
||||||
&& ereg('[^(]*\((.*)\)[^)]*', $GLOBALS['HTTP_USER_AGENT'], $regs)) {
|
// Mac case
|
||||||
if (eregi('Win', $regs[1])) {
|
else if (USR_OS == 'Mac') {
|
||||||
$the_crlf = "\r\n";
|
$the_crlf = "\r";
|
||||||
}
|
}
|
||||||
} // end if
|
// Others
|
||||||
|
else {
|
||||||
|
$the_crlf = "\n";
|
||||||
|
}
|
||||||
|
|
||||||
return $the_crlf;
|
return $the_crlf;
|
||||||
} // end of the 'which_crlf()' function
|
} // end of the 'which_crlf()' function
|
||||||
|
Reference in New Issue
Block a user