clarify code
This commit is contained in:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user