From: maxious Date: Wed, 06 Apr 2011 06:10:35 +0000 Subject: More buffer flush while printing unsorted lists X-Git-Url: https://maxious.lambdacomplex.org/git/?p=busui.git&a=commitdiff&h=ae533fb5f186a7038482117b6f695858f5208106 --- More buffer flush while printing unsorted lists --- --- a/labs/tripPlannerTester.kml.php +++ b/labs/tripPlannerTester.kml.php @@ -159,8 +159,7 @@ $regionTimes[] = $time; } } - flush(); - ob_flush(); + flush(); @ob_flush(); curl_close($ch); } } --- a/stop.php +++ b/stop.php @@ -95,6 +95,7 @@ echo '

'; echo '

' . midnight_seconds_to_time($row[0]) . '

'; echo ''; + flush(); @ob_flush(); } if (sizeof($trips) == 0) echo "
  • No trips in the near future.
  • "; echo ''; --- a/stopList.php +++ b/stopList.php @@ -31,6 +31,7 @@ foreach ($suburbs as $suburb) { if (startsWith($suburb, $_REQUEST['firstLetter'])) { echo '
  • ' . $suburb . '
  • '; + flush(); @ob_flush(); } } } @@ -101,6 +102,7 @@ } echo bracketsMeanNewLine(trim(preg_replace("/\(Platform.*/", "", $row[1])) . '(' . sizeof($stopsGrouped["stop_ids"]) . ' stops)'); echo "\n"; + flush(); @ob_flush(); $stopsGrouped = Array(); } else { @@ -113,6 +115,7 @@ } echo bracketsMeanNewLine($row[1]); echo "\n"; + flush(); @ob_flush(); } } else { --- a/trip.php +++ b/trip.php @@ -40,12 +40,14 @@ foreach ($routetrips as $othertrip) { echo '' . midnight_seconds_to_time($othertrip[0]) . ' '; } +flush(); @ob_flush(); echo '

    Other directions/timing periods:

    '; $url = $APIurl . "/json/routesearch?routeshortname=" . rawurlencode($trips[1]->route_short_name); $json = json_decode(getPage($url)); foreach ($json as $row) { if ($row[0] != $routeid) echo '' . $row[2] . ' (' . ucwords($row[3]) . ') '; } +flush(); @ob_flush(); echo ' "; }