bug #2107583 [GUI] Leading newline truncated, thanks to Isart Montane
This commit is contained in:
@@ -2610,4 +2610,21 @@ function PMA_replace_binary_contents($content) {
|
||||
$result = str_replace("\x1a", '\Z', $result);
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* If the first character given is \n (CR) we will 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){
|
||||
$string = "\n".$string;
|
||||
}
|
||||
return $string;
|
||||
}
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user