From e691a373b57aa75333daafa84f1760d85dde6ca2 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sun, 19 Sep 2010 18:49:31 +0000 Subject: [PATCH] MDL-24276 improved coding style --- admin/cron.php | 5 ++++- admin/health.php | 6 ++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/admin/cron.php b/admin/cron.php index 091d5b711bc..eed68d31b52 100644 --- a/admin/cron.php +++ b/admin/cron.php @@ -75,7 +75,10 @@ if (check_browser_version('MSIE')) { } // no more headers and buffers -while(@ob_end_flush()); +@ob_implicit_flush(true); +while(ob_get_level()) { + ob_end_clean(); +} // execute the cron cron_run(); diff --git a/admin/health.php b/admin/health.php index d6a22e240e4..385792604d0 100644 --- a/admin/health.php +++ b/admin/health.php @@ -5,11 +5,9 @@ // extra whitespace test - intentionally breaks cookieless mode $extraws = ''; - while (true) { + while (ob_get_level()) { $extraws .= ob_get_contents(); - if (!@ob_end_clean()) { - break; - } + ob_end_clean(); } require_once($CFG->libdir.'/adminlib.php'); -- 2.36.1