equal
deleted
inserted
replaced
2852 if ( $do_gzip && function_exists('ob_gzhandler') ) |
2852 if ( $do_gzip && function_exists('ob_gzhandler') ) |
2853 { |
2853 { |
2854 $gzip_contents = ob_get_contents(); |
2854 $gzip_contents = ob_get_contents(); |
2855 ob_end_clean(); |
2855 ob_end_clean(); |
2856 |
2856 |
2857 $return = @ob_gzhandler($gzip_contents); |
2857 $return = @ob_gzhandler($gzip_contents, PHP_OUTPUT_HANDLER_START); |
2858 if ( $return ) |
2858 if ( $return ) |
2859 { |
2859 { |
2860 header('Content-encoding: gzip'); |
2860 header('Content-encoding: gzip'); |
2861 echo $gzip_contents; |
2861 echo $return; |
2862 } |
2862 } |
2863 else |
2863 else |
2864 { |
2864 { |
2865 echo $gzip_contents; |
2865 echo $gzip_contents; |
2866 } |
2866 } |
3346 global $cron_tasks; |
3346 global $cron_tasks; |
3347 $hour_interval = strval($hour_interval); |
3347 $hour_interval = strval($hour_interval); |
3348 if ( !isset($cron_tasks[$hour_interval]) ) |
3348 if ( !isset($cron_tasks[$hour_interval]) ) |
3349 $cron_tasks[$hour_interval] = array(); |
3349 $cron_tasks[$hour_interval] = array(); |
3350 $cron_tasks[$hour_interval][] = $func; |
3350 $cron_tasks[$hour_interval][] = $func; |
|
3351 } |
|
3352 |
|
3353 /** |
|
3354 * Gets the timestamp for the next estimated cron run. |
|
3355 * @return int |
|
3356 */ |
|
3357 |
|
3358 function get_cron_next_run() |
|
3359 { |
|
3360 global $cron_tasks; |
|
3361 $lowest_ivl = min(array_keys($cron_tasks)); |
|
3362 $last_run = intval(getConfig("cron_lastrun_ivl_$lowest_ivl")); |
|
3363 return intval($last_run + ( 3600 * $lowest_ivl )) - 30; |
3351 } |
3364 } |
3352 |
3365 |
3353 /** |
3366 /** |
3354 * Installs a language. |
3367 * Installs a language. |
3355 * @param string The ISO-639-3 identifier for the language. Maximum of 6 characters, usually 3. |
3368 * @param string The ISO-639-3 identifier for the language. Maximum of 6 characters, usually 3. |