summaryrefslogtreecommitdiff
path: root/modules/system/system.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-09-06 08:36:22 +0000
committerDries Buytaert <dries@buytaert.net>2008-09-06 08:36:22 +0000
commite5b0e5f76c0695a01d13c55147a8287df8750594 (patch)
treed4acfc3f1d038bccaea83e168fdd380d0dfa0708 /modules/system/system.module
parentcbb639a16ffec82f498ae689818b010e040bf5b4 (diff)
downloadbrdo-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.module')
-rw-r--r--modules/system/system.module8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/system/system.module b/modules/system/system.module
index 005d21a89..9b9791f0f 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -1391,12 +1391,12 @@ function system_get_module_admin_tasks($module) {
*/
function system_cron() {
// Cleanup the flood.
- db_query('DELETE FROM {flood} WHERE timestamp < %d', time() - 3600);
+ db_query('DELETE FROM {flood} WHERE timestamp < %d', $_SERVER['REQUEST_TIME'] - 3600);
// Cleanup the batch table.
- db_query('DELETE FROM {batch} WHERE timestamp < %d', time() - 864000);
+ db_query('DELETE FROM {batch} WHERE timestamp < %d', $_SERVER['REQUEST_TIME'] - 864000);
// Remove temporary files that are older than DRUPAL_MAXIMUM_TEMP_FILE_AGE.
- $result = db_query('SELECT * FROM {files} WHERE status = %d and timestamp < %d', FILE_STATUS_TEMPORARY, time() - DRUPAL_MAXIMUM_TEMP_FILE_AGE);
+ $result = db_query('SELECT * FROM {files} WHERE status = %d and timestamp < %d', FILE_STATUS_TEMPORARY, $_SERVER['REQUEST_TIME'] - DRUPAL_MAXIMUM_TEMP_FILE_AGE);
while ($file = db_fetch_object($result)) {
if (file_exists($file->filepath)) {
// If files that exist cannot be deleted, continue so the database remains
@@ -2027,7 +2027,7 @@ function system_block_ip_action() {
* Generate an array of time zones and their local time&date.
*/
function _system_zonelist() {
- $timestamp = time();
+ $timestamp = $_SERVER['REQUEST_TIME'];
$zonelist = array(-11, -10, -9.5, -9, -8, -7, -6, -5, -4, -3.5, -3, -2, -1, 0, 1, 2, 3, 3.5, 4, 5, 5.5, 5.75, 6, 6.5, 7, 8, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.75, 13, 14);
$zones = array();
foreach ($zonelist as $offset) {