if (preg_match("/_dest_([a-zA-Z]*)_([0-9]+)/", $key, $matches)) { $corres = new CCorrespondantCourrier(); $corres->compte_rendu_id = $do->_obj->_id; $corres->tag = "correspondant"; $corres->object_id = $matches[2]; $corres->object_class = $matches[1]; if ($msg = $corres->store()) { CAppUI::setMsg($msg, UI_MSG_ERROR); } } } } if (strlen($ids_corres)) { $do->_obj->_ids_corres = $ids_corres; } if ($do->ajax) { $do->doCallback(); } else { // Si c'est un compte rendu if ($do->_obj->object_id && !intval(CValue::post("del"))) { $do->redirect = "m=compteRendu&a=edit_compte_rendu&dialog=1&compte_rendu_id=" . $do->_obj->_id; } else { if (intval(CValue::post("del") && isset($_POST["_tab"]))) { $do->redirect = "m=compteRendu&a=vw_modeles"; } else { // Si c'est un modèle de compte rendu $do->redirect = "m=compteRendu&a=addedit_modeles&dialog=1&compte_rendu_id=" . $do->_obj->_id; } } $do->doRedirect(); }