# HG changeset patch # User Dan # Date 1194385219 18000 # Node ID 78a94f7bb5e3446bf5e8efb7f23cd5d8fb5a7a96 # Parent c671f3bb8aed2b2da2e71d80f3ab42be394b9e26 Merge changes back from Nighthawk diff -r c671f3bb8aed -r 78a94f7bb5e3 includes/functions.php --- a/includes/functions.php Tue Nov 06 16:22:43 2007 -0500 +++ b/includes/functions.php Tue Nov 06 16:40:19 2007 -0500 @@ -3177,6 +3177,20 @@ } /** + * Registers a task that will be run every X hours. Scheduled tasks should always be scheduled at runtime - they are not stored in the DB. + * @param string Function name to call, or array(object, string method) + * @param int Interval between runs, in hours. Defaults to 24. + */ + +function register_cron_task($func, $hour_interval = 24) +{ + global $cron_tasks; + if ( !isset($cron_tasks[$hour_interval]) ) + $cron_tasks[$hour_interval] = array(); + $cron_tasks[$hour_interval][] = $func; +} + +/** * 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) @@ -3216,8 +3230,6 @@ { $lang = new Language($lang_id); $lang->import($lang_file); - $lang->fetch(false); - $lang->regen_caches(); } else if ( is_string($lang_file) && !file_exists($lang_file) ) { diff -r c671f3bb8aed -r 78a94f7bb5e3 plugins/SpecialUpdownload.php --- a/plugins/SpecialUpdownload.php Tue Nov 06 16:22:43 2007 -0500 +++ b/plugins/SpecialUpdownload.php Tue Nov 06 16:40:19 2007 -0500 @@ -210,7 +210,7 @@ footer(); } -} +} function page_Special_DownloadFile() {