summaryrefslogtreecommitdiff
path: root/modules/update
diff options
context:
space:
mode:
Diffstat (limited to 'modules/update')
-rw-r--r--modules/update/update.compare.inc6
-rw-r--r--modules/update/update.fetch.inc4
-rw-r--r--modules/update/update.module4
-rw-r--r--modules/update/update.report.inc2
4 files changed, 8 insertions, 8 deletions
diff --git a/modules/update/update.compare.inc b/modules/update/update.compare.inc
index e10479cba..efca6e928 100644
--- a/modules/update/update.compare.inc
+++ b/modules/update/update.compare.inc
@@ -30,7 +30,7 @@ function update_get_projects() {
_update_process_info_list($projects, module_rebuild_cache(), 'module');
_update_process_info_list($projects, system_theme_data(), 'theme');
// Set the projects array into the cache table.
- cache_set('update_project_projects', $projects, 'cache_update', time() + 3600);
+ cache_set('update_project_projects', $projects, 'cache_update', $_SERVER['REQUEST_TIME'] + 3600);
}
}
return $projects;
@@ -551,7 +551,7 @@ function update_calculate_project_data($available) {
drupal_alter('update_status', $projects);
// Set the projects array into the cache table.
- cache_set('update_project_data', $projects, 'cache_update', time() + 3600);
+ cache_set('update_project_data', $projects, 'cache_update', $_SERVER['REQUEST_TIME'] + 3600);
return $projects;
}
@@ -588,7 +588,7 @@ function update_project_cache($cid) {
}
else {
$cache = cache_get($cid, 'cache_update');
- if (!empty($cache->data) && $cache->expire > time()) {
+ if (!empty($cache->data) && $cache->expire > $_SERVER['REQUEST_TIME']) {
$projects = $cache->data;
}
}
diff --git a/modules/update/update.fetch.inc b/modules/update/update.fetch.inc
index 17cf06f48..d23370296 100644
--- a/modules/update/update.fetch.inc
+++ b/modules/update/update.fetch.inc
@@ -52,8 +52,8 @@ function _update_refresh() {
}
if (!empty($available) && is_array($available)) {
$frequency = variable_get('update_check_frequency', 1);
- cache_set('update_info', $available, 'cache_update', time() + (60 * 60 * 24 * $frequency));
- variable_set('update_last_check', time());
+ cache_set('update_info', $available, 'cache_update', $_SERVER['REQUEST_TIME'] + (60 * 60 * 24 * $frequency));
+ variable_set('update_last_check', $_SERVER['REQUEST_TIME']);
watchdog('update', 'Fetched information about all available new releases and updates.', array(), WATCHDOG_NOTICE, l(t('view'), 'admin/reports/updates'));
}
else {
diff --git a/modules/update/update.module b/modules/update/update.module
index 8a08f986c..15ca24d25 100644
--- a/modules/update/update.module
+++ b/modules/update/update.module
@@ -276,7 +276,7 @@ function _update_requirement_check($project, $type) {
function update_cron() {
$frequency = variable_get('update_check_frequency', 1);
$interval = 60 * 60 * 24 * $frequency;
- if (time() - variable_get('update_last_check', 0) > $interval) {
+ if ($_SERVER['REQUEST_TIME'] - variable_get('update_last_check', 0) > $interval) {
update_refresh();
_update_cron_notify();
}
@@ -342,7 +342,7 @@ function update_get_available($refresh = FALSE) {
}
}
if (!$needs_refresh && ($cache = cache_get('update_info', 'cache_update'))
- && $cache->expire > time()) {
+ && $cache->expire > $_SERVER['REQUEST_TIME']) {
$available = $cache->data;
}
elseif ($needs_refresh || $refresh) {
diff --git a/modules/update/update.report.inc b/modules/update/update.report.inc
index 152302061..193284f1c 100644
--- a/modules/update/update.report.inc
+++ b/modules/update/update.report.inc
@@ -27,7 +27,7 @@ function update_status() {
*/
function theme_update_report($data) {
$last = variable_get('update_last_check', 0);
- $output = '<div class="update checked">' . ($last ? t('Last checked: @time ago', array('@time' => format_interval(time() - $last))) : t('Last checked: never'));
+ $output = '<div class="update checked">' . ($last ? t('Last checked: @time ago', array('@time' => format_interval($_SERVER['REQUEST_TIME'] - $last))) : t('Last checked: never'));
$output .= ' <span class="check-manually">(' . l(t('Check manually'), 'admin/reports/updates/check') . ')</span>';
$output .= "</div>\n";