clarify code

This commit is contained in:
Marc Delisle
2008-11-28 19:13:55 +00:00
parent 4a0c232707
commit c909885dc1

View File

@@ -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() * @uses strpos()
* @return string with the chars replaced * @return string with the chars replaced
*/ */
function PMA_duplicateFirstNewline($string){ function PMA_duplicateFirstNewline($string){
$first_occurence = strpos($string, "\n"); $first_occurence = strpos($string, "\r\n");
if($first_occurence == 1){ if ($first_occurence == 0){
$string = "\n".$string; $string = "\n".$string;
} }
return $string; return $string;