From: Arno H. <aho...@us...> - 2000-11-22 22:17:10
|
Update of /cvsroot/phpwiki/phpwiki/lib In directory slayer.i.sourceforge.net:/tmp/cvs-serv12483 Modified Files: stdlib.php Log Message: fix newline bug in UpdateRecentChanges / fix for-loop boundary Index: stdlib.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/stdlib.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** stdlib.php 2000/11/16 08:52:51 1.12 --- stdlib.php 2000/11/22 22:17:06 1.13 *************** *** 407,411 **** // scroll through the page to the first date and break // dates are marked with "____" at the beginning of the line ! for ($i = 0; $i < ($numlines + 1); $i++) { if (preg_match("/^____/", $recentchanges["content"][$i])) { --- 407,411 ---- // scroll through the page to the first date and break // dates are marked with "____" at the beginning of the line ! for ($i = 0; $i < $numlines; $i++) { if (preg_match("/^____/", $recentchanges["content"][$i])) { *************** *** 419,428 **** // name to the array ! if ($isNewDay) { ! $newpage[$k++] = "____$today\r"; ! $newpage[$k++] = "\r"; ! } else { ! $newpage[$k++] = $recentchanges["content"][$i++]; ! } if($isnewpage) { $newpage[$k++] = "* [$pagename] (new) ..... $remoteuser\r"; --- 419,424 ---- // name to the array ! $newpage[$k++] = $isNewDay ? "____$today\r" ! : $recentchanges["content"][$i++]; if($isnewpage) { $newpage[$k++] = "* [$pagename] (new) ..... $remoteuser\r"; *************** *** 431,434 **** --- 427,432 ---- $newpage[$k++] = "* [$pagename] ([diff|$diffurl]) ..... $remoteuser\r"; } + if ($isNewDay) + $newpage[$k++] = "\r"; // copy the rest of the page into the new array |