diff options
Diffstat (limited to 'includes/form.inc')
-rw-r--r-- | includes/form.inc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/includes/form.inc b/includes/form.inc index d50c9efeb..06252cbf5 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -235,9 +235,9 @@ function form_set_cache($form_build_id, $form, $form_state) { // 6 hours cache life time for forms should be plenty. $expire = 21600; - cache_set('form_' . $form_build_id, $form, 'cache_form', $_SERVER['REQUEST_TIME'] + $expire); + cache_set('form_' . $form_build_id, $form, 'cache_form', REQUEST_TIME + $expire); if (!empty($form_state['storage'])) { - cache_set('storage_' . $form_build_id, $form_state['storage'], 'cache_form', $_SERVER['REQUEST_TIME'] + $expire); + cache_set('storage_' . $form_build_id, $form_state['storage'], 'cache_form', REQUEST_TIME + $expire); } } @@ -1645,9 +1645,9 @@ function theme_date($element) { function form_process_date($element) { // Default to current date if (empty($element['#value'])) { - $element['#value'] = array('day' => format_date($_SERVER['REQUEST_TIME'], 'custom', 'j'), - 'month' => format_date($_SERVER['REQUEST_TIME'], 'custom', 'n'), - 'year' => format_date($_SERVER['REQUEST_TIME'], 'custom', 'Y')); + $element['#value'] = array('day' => format_date(REQUEST_TIME, 'custom', 'j'), + 'month' => format_date(REQUEST_TIME, 'custom', 'n'), + 'year' => format_date(REQUEST_TIME, 'custom', 'Y')); } $element['#tree'] = TRUE; @@ -2483,7 +2483,7 @@ function batch_process($redirect = NULL, $url = NULL) { // Initiate db storage in order to get a batch id. We have to provide // at least an empty string for the (not null) 'token' column. - db_query("INSERT INTO {batch} (token, timestamp) VALUES ('', %d)", $_SERVER['REQUEST_TIME']); + db_query("INSERT INTO {batch} (token, timestamp) VALUES ('', %d)", REQUEST_TIME); $batch['id'] = db_last_insert_id('batch', 'bid'); // Now that we have a batch id, we can generate the redirection link in |