Mercurial > defr > drupal > core
comparison 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 |
comparison
equal
deleted
inserted
replaced
10:6f15c9d74937 | 11:589fb7c02327 |
---|---|
1 <?php | 1 <?php |
2 // $Id: update.module,v 1.17 2008/01/30 10:14:42 goba Exp $ | 2 // $Id: update.module,v 1.17.2.1 2008/09/23 10:19:02 goba Exp $ |
3 | 3 |
4 /** | 4 /** |
5 * @file | 5 * @file |
6 * The "Update status" module checks for available updates of Drupal core and | 6 * The "Update status" module checks for available updates of Drupal core and |
7 * any installed contributed modules and themes. It warns site administrators | 7 * any installed contributed modules and themes. It warns site administrators |
284 * Implementation of hook_cron(). | 284 * Implementation of hook_cron(). |
285 */ | 285 */ |
286 function update_cron() { | 286 function update_cron() { |
287 $frequency = variable_get('update_check_frequency', 1); | 287 $frequency = variable_get('update_check_frequency', 1); |
288 $interval = 60 * 60 * 24 * $frequency; | 288 $interval = 60 * 60 * 24 * $frequency; |
289 if (time() - variable_get('update_last_check', 0) > $interval) { | 289 // Cron should check for updates if there is no update data cached or if the configured |
290 // update interval has elapsed. | |
291 if (!cache_get('update_info', 'cache_update') || ((time() - variable_get('update_last_check', 0)) > $interval)) { | |
290 update_refresh(); | 292 update_refresh(); |
291 _update_cron_notify(); | 293 _update_cron_notify(); |
292 } | 294 } |
293 } | 295 } |
294 | 296 |