Make WordPress Core

Changeset 3688


Ignore:
Timestamp:
04/04/2006 12:51:47 AM (18 years ago)
Author:
ryan
Message:

Control those newlines. Props to that Andy guy. fixes #1082

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-functions.php

    r3677 r3688  
    10781078        if ($markerdata) {
    10791079            $state = true;
    1080             foreach ($markerdata as $markerline) {
     1080            foreach ($markerdata as $n => $markerline) {
    10811081                if (strstr($markerline, "# BEGIN {$marker}"))
    10821082                    $state = false;
    1083                 if ($state)
    1084                     fwrite($f, "{$markerline}\n");
     1083                if ($state) {
     1084                    if ( $n + 1 < count($markerdata) )
     1085                        fwrite($f, "{$markerline}\n");
     1086                    else
     1087                        fwrite($f, "{$markerline}");
     1088                }
    10851089                if (strstr($markerline, "# END {$marker}")) {
    10861090                    fwrite($f, "# BEGIN {$marker}\n");
Note: See TracChangeset for help on using the changeset viewer.