function post_updateItem($history = 1)
{
global $DB;
if (count($this->profileRight) > 0) {
ProfileRight::updateProfileRights($this->getID(), $this->profileRight);
unset($this->profileRight);
}
if (in_array('is_default', $this->updates) && $this->input["is_default"] == 1) {
$query = "UPDATE " . $this->getTable() . "\n SET `is_default` = '0'\n WHERE `id` <> '" . $this->input['id'] . "'";
$DB->query($query);
}
// To avoid log out and login when rights change (very useful in debug mode)
if (isset($_SESSION['glpiactiveprofile']['id']) && $_SESSION['glpiactiveprofile']['id'] == $this->input['id']) {
if (in_array('helpdesk_item_type', $this->updates)) {
$_SESSION['glpiactiveprofile']['helpdesk_item_type'] = importArrayFromDB($this->input['helpdesk_item_type']);
}
///TODO other needed fields
}
}