function _drupal_clean_form_sessions in Drupal 5
Remove form information that's at least a day old from the $_SESSION['form'] array.
Related topics
1 call to _drupal_clean_form_sessions()
- drupal_get_form in includes/
form.inc - Retrieves a form from a builder function, passes it on for processing, and renders the form or redirects to its destination as appropriate. In multi-step form scenarios, it handles properly processing the values using the previous step's form…
File
- includes/
form.inc, line 106
Code
function _drupal_clean_form_sessions() {
if (isset($_SESSION['form'])) {
foreach ($_SESSION['form'] as $build_id => $data) {
if ($data['timestamp'] < time() - 84600) {
unset($_SESSION['form'][$build_id]);
}
}
}
}