You are here

function imagefield_clear_session in ImageField 5.2

Same name and namespace in other branches
  1. 5 imagefield.module \imagefield_clear_session()
1 call to imagefield_clear_session()
_imagefield_widget_prepare_form_values in ./imagefield.module

File

./imagefield.module, line 534
Defines an image field type. imagefield uses content.module to store the fid, and the drupal files table to store the actual file data.

Code

function imagefield_clear_session() {
  if (is_array($_SESSION['imagefield']) && count($_SESSION['imagefield'])) {
    foreach (array_keys($_SESSION['imagefield']) as $fieldname) {
      imagefield_clear_field_session($fieldname);
    }
    unset($_SESSION['imagefield']);
  }
}