function post_updateItem($history = 1) { global $CFG_GLPI; $fup = new PluginProjetTask(); $fup->getFromDB($this->input["plugin_projet_tasks_id"]); $timestart = strtotime($this->input["begin"]); $timeend = strtotime($this->input["end"]); $updates2[] = "actiontime"; $fup->fields["actiontime"] = $timeend - $timestart; $updates2[] = "plugin_projet_taskstates_id"; $fup->fields["plugin_projet_taskstates_id"] = PluginProjetTaskState::getStatusForPlanning(); $fup->updateInDB($updates2); }