includes/functions.php
changeset 542 5841df0ab575
parent 541 acb7e23b6ffa
child 556 63e131c38876
--- a/includes/functions.php	Sun May 04 21:57:48 2008 -0400
+++ b/includes/functions.php	Mon May 05 20:06:37 2008 -0400
@@ -2854,11 +2854,11 @@
     $gzip_contents = ob_get_contents();
     ob_end_clean();
     
-    $return = @ob_gzhandler($gzip_contents);
+    $return = @ob_gzhandler($gzip_contents, PHP_OUTPUT_HANDLER_START);
     if ( $return )
     {
       header('Content-encoding: gzip');
-      echo $gzip_contents;
+      echo $return;
     }
     else
     {
@@ -3351,6 +3351,19 @@
 }
 
 /**
+ * Gets the timestamp for the next estimated cron run.
+ * @return int
+ */
+
+function get_cron_next_run()
+{
+  global $cron_tasks;
+  $lowest_ivl = min(array_keys($cron_tasks));
+  $last_run = intval(getConfig("cron_lastrun_ivl_$lowest_ivl"));
+  return intval($last_run + ( 3600 * $lowest_ivl )) - 30;
+}
+
+/**
  * Installs a language.
  * @param string The ISO-639-3 identifier for the language. Maximum of 6 characters, usually 3.
  * @param string The name of the language in English (Spanish)