Merge changes from nighthawk and scribus back together
authorDan
Wed, 07 Nov 2007 16:33:26 -0500
changeset 245 54392ae2c222
parent 242 78a94f7bb5e3 (diff)
parent 244 09f8a9a03ccf (current diff)
child 247 e876c75a9149
Merge changes from nighthawk and scribus back together
--- 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) )
   {
--- 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 @@
     <?php
     $template->footer();
   }
-}                                                                                                                                                          
+}                                                     
 
 function page_Special_DownloadFile()
 {