diff modules/update/update.module @ 11:589fb7c02327 6.5

Drupal 6.5
author Franck Deroche <webmaster@defr.org>
date Tue, 23 Dec 2008 14:32:19 +0100
parents c1f4ac30525a
children
line wrap: on
line diff
--- a/modules/update/update.module	Tue Dec 23 14:32:08 2008 +0100
+++ b/modules/update/update.module	Tue Dec 23 14:32:19 2008 +0100
@@ -1,5 +1,5 @@
 <?php
-// $Id: update.module,v 1.17 2008/01/30 10:14:42 goba Exp $
+// $Id: update.module,v 1.17.2.1 2008/09/23 10:19:02 goba Exp $
 
 /**
  * @file
@@ -286,7 +286,9 @@
 function update_cron() {
   $frequency = variable_get('update_check_frequency', 1);
   $interval = 60 * 60 * 24 * $frequency;
-  if (time() - variable_get('update_last_check', 0) > $interval) {
+  // Cron should check for updates if there is no update data cached or if the configured
+  // update interval has elapsed.
+  if (!cache_get('update_info', 'cache_update') || ((time() - variable_get('update_last_check', 0)) > $interval)) {
     update_refresh();
     _update_cron_notify();
   }