function _manage_flashdata()
{
// if there is flashdata to be handled
if (!empty($this->flashdata)) {
// iterate through all the entries
foreach ($this->flashdata as $variable => $counter) {
// increment counter representing server requests
$this->flashdata[$variable]++;
// if we're past the first server request
if ($this->flashdata[$variable] > 1) {
// unset the session variable
unset($_SESSION[$variable]);
// stop tracking
unset($this->flashdata[$variable]);
}
}
// if there is any flashdata left to be handled
if (!empty($this->flashdata)) {
// store data in a temporary session variable
$_SESSION[$this->flashdata_varname] = serialize($this->flashdata);
}
}
}