# HG changeset patch # User Dan # Date 1194471206 18000 # Node ID 54392ae2c222f9069e6989accc2c18b9411069ff # Parent 78a94f7bb5e3446bf5e8efb7f23cd5d8fb5a7a96# Parent 09f8a9a03ccfbab64466d00b7a1c97eb5e6d69ff Merge changes from nighthawk and scribus back together diff -r 09f8a9a03ccf -r 54392ae2c222 includes/functions.php --- a/includes/functions.php Wed Nov 07 15:22:41 2007 -0500 +++ b/includes/functions.php Wed Nov 07 16:33:26 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 09f8a9a03ccf -r 54392ae2c222 plugins/SpecialUpdownload.php --- a/plugins/SpecialUpdownload.php Wed Nov 07 15:22:41 2007 -0500 +++ b/plugins/SpecialUpdownload.php Wed Nov 07 16:33:26 2007 -0500 @@ -210,7 +210,7 @@ footer(); } -} +} function page_Special_DownloadFile() {