From c909885dc1855f634057eb23bce352e6e5616643 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Fri, 28 Nov 2008 19:13:55 +0000 Subject: [PATCH] clarify code --- libraries/common.lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 7cca4bdbd..baa1f3953 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -2648,15 +2648,15 @@ function PMA_replace_binary_contents($content) { /** * - * If the first character given is \n (CR) we will add an extra \n + * If the string starts with a \r\n pair (0x0d0a) add an extra \n * * @uses strpos() * @return string with the chars replaced */ function PMA_duplicateFirstNewline($string){ - $first_occurence = strpos($string, "\n"); - if($first_occurence == 1){ + $first_occurence = strpos($string, "\r\n"); + if ($first_occurence == 0){ $string = "\n".$string; } return $string;