diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-09-06 08:36:22 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-09-06 08:36:22 +0000 |
commit | e5b0e5f76c0695a01d13c55147a8287df8750594 (patch) | |
tree | d4acfc3f1d038bccaea83e168fdd380d0dfa0708 /modules/system/system.install | |
parent | cbb639a16ffec82f498ae689818b010e040bf5b4 (diff) | |
download | brdo-e5b0e5f76c0695a01d13c55147a8287df8750594.tar.gz brdo-e5b0e5f76c0695a01d13c55147a8287df8750594.tar.bz2 |
- Patch #302763 by Dave Reid, Rob Loach: replace time() by ['REQUEST_TIME'] as per Rasmus' suggestion. Removed drupal_referrer() for consistency.
Diffstat (limited to 'modules/system/system.install')
-rw-r--r-- | modules/system/system.install | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/system/system.install b/modules/system/system.install index e4d7d8756..e133d55ec 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -143,10 +143,10 @@ function system_requirements($phase) { // Determine severity based on time since cron last ran. $severity = REQUIREMENT_OK; - if (time() - $cron_last > $threshold_error) { + if ($_SERVER['REQUEST_TIME'] - $cron_last > $threshold_error) { $severity = REQUIREMENT_ERROR; } - else if ($never_run || (time() - $cron_last > $threshold_warning)) { + else if ($never_run || ($_SERVER['REQUEST_TIME'] - $cron_last > $threshold_warning)) { $severity = REQUIREMENT_WARNING; } @@ -163,7 +163,7 @@ function system_requirements($phase) { $description = $t('Cron has not run.') . ' ' . $help; } else { - $summary = $t('Last run !time ago', array('!time' => format_interval(time() - $cron_last))); + $summary = $t('Last run !time ago', array('!time' => format_interval($_SERVER['REQUEST_TIME'] - $cron_last))); $description = ''; if ($severity != REQUIREMENT_OK) { $description = $t('Cron has not run recently.') . ' ' . $help; @@ -371,7 +371,7 @@ function system_install() { // presumed to be a serialized array. Install will change uid 1 immediately // anyways. So we insert the superuser here, the uid is 2 here for now, but // very soon it will be changed to 1. - db_query("INSERT INTO {users} (name, mail, created, data) VALUES('%s', '%s', %d, '%s')", 'placeholder-for-uid-1', 'placeholder-for-uid-1', time(), serialize(array())); + db_query("INSERT INTO {users} (name, mail, created, data) VALUES('%s', '%s', %d, '%s')", 'placeholder-for-uid-1', 'placeholder-for-uid-1', $_SERVER['REQUEST_TIME'], serialize(array())); // This sets the above two users uid 0 (anonymous). We avoid an explicit 0 // otherwise MySQL might insert the next auto_increment value. db_query("UPDATE {users} SET uid = uid - uid WHERE name = '%s'", ''); |