From: Jakub Vrana Date: Fri, 9 Aug 2013 00:09:09 +0000 (-0700) Subject: Simplify OS detection X-Git-Tag: v4.0.0~68 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=961ec0b8573d695b33b7b046e197109bbe7c66c4;p=adminer.git Simplify OS detection --- diff --git a/editor/include/editing.inc.php b/editor/include/editing.inc.php index dd729139..62867047 100644 --- a/editor/include/editing.inc.php +++ b/editor/include/editing.inc.php @@ -17,7 +17,7 @@ function email_header($header) { * @return bool */ function send_mail($email, $subject, $message, $from = "", $files = array()) { - $eol = (strncasecmp(PHP_OS, "win", 3) ? "\n" : "\r\n"); // PHP_EOL available since PHP 4.3.10 and 5.0.2 + $eol = (DIRECTORY_SEPARATOR == "/" ? "\n" : "\r\n"); // PHP_EOL available since PHP 5.0.2 $message = str_replace("\n", $eol, wordwrap(str_replace("\r", "", "$message\n"))); $boundary = uniqid("boundary"); $attachments = "";