diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-09-17 07:11:59 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-09-17 07:11:59 +0000 |
commit | 7f29b142770cba60259a22f3760e2376b8e79790 (patch) | |
tree | d9ff4c7dfb29dfafb442c2cd1f2e91b2592e63bc /modules/system/system.install | |
parent | 6f8b5f9a5baaea6874ffe050ba0210b680070140 (diff) | |
download | brdo-7f29b142770cba60259a22f3760e2376b8e79790.tar.gz brdo-7f29b142770cba60259a22f3760e2376b8e79790.tar.bz2 |
- Patch #305645 by pwolanin: ['REQUEST_TIME'] -> REQUEST_TIME. Improved developer experience.
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 af2ceab33..45a690198 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 ($_SERVER['REQUEST_TIME'] - $cron_last > $threshold_error) { + if (REQUEST_TIME - $cron_last > $threshold_error) { $severity = REQUIREMENT_ERROR; } - else if ($never_run || ($_SERVER['REQUEST_TIME'] - $cron_last > $threshold_warning)) { + else if ($never_run || (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($_SERVER['REQUEST_TIME'] - $cron_last))); + $summary = $t('Last run !time ago', array('!time' => format_interval(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', $_SERVER['REQUEST_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', 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'", ''); |