From 1195ed3a69f40976977520f1cefac98cc614a319 Mon Sep 17 00:00:00 2001 From: marcus Date: Fri, 31 Oct 2008 12:12:27 +0000 Subject: Changed cron to use output buffering (letting you simply echo rather than needing to pass variables around) git-svn-id: https://code.elgg.org/elgg/trunk@2374 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/handlers/cron_handler.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'engine') diff --git a/engine/handlers/cron_handler.php b/engine/handlers/cron_handler.php index acc24541c..816fb2c51 100644 --- a/engine/handlers/cron_handler.php +++ b/engine/handlers/cron_handler.php @@ -27,8 +27,13 @@ // Trigger hack $std_out = ""; // Data to return to - $std_out = trigger_plugin_hook('cron', $period, $params, $std_out); + $old_stdout = ""; + ob_start(); + + $old_stdout = trigger_plugin_hook('cron', $period, $params, $old_stdout); + + $std_out = ob_get_clean(); // Return event - echo $std_out; + echo $std_out . $old_stdout; ?> \ No newline at end of file -- cgit v1.2.3