Control those newlines. Props to that Andy guy. fixes #1082
git-svn-id: https://develop.svn.wordpress.org/trunk@3688 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
63ca6724f0
commit
4ac65f4a10
@ -1077,11 +1077,15 @@ function insert_with_markers($filename, $marker, $insertion) {
|
||||
$foundit = false;
|
||||
if ($markerdata) {
|
||||
$state = true;
|
||||
foreach ($markerdata as $markerline) {
|
||||
foreach ($markerdata as $n => $markerline) {
|
||||
if (strstr($markerline, "# BEGIN {$marker}"))
|
||||
$state = false;
|
||||
if ($state)
|
||||
if ($state) {
|
||||
if ( $n + 1 < count($markerdata) )
|
||||
fwrite($f, "{$markerline}\n");
|
||||
else
|
||||
fwrite($f, "{$markerline}");
|
||||
}
|
||||
if (strstr($markerline, "# END {$marker}")) {
|
||||
fwrite($f, "# BEGIN {$marker}\n");
|
||||
if (is_array($insertion))
|
||||
|
Loading…
Reference in New Issue
Block a user