Merge changes back from Nighthawk
authorDan
Tue, 06 Nov 2007 16:40:19 -0500
changeset 242 78a94f7bb5e3
parent 241 c671f3bb8aed
child 245 54392ae2c222
Merge changes back from Nighthawk
includes/functions.php
plugins/SpecialUpdownload.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) )
   {
--- 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 @@
     <?php
     $template->footer();
   }
-}                                                                                                                                                          
+}                                                     
 
 function page_Special_DownloadFile()
 {