if ($action=='add') $action='create'; if ($action=='update') $action='edit'; } else $reshook+=$resaction; } } } } } // ---------- start deprecated. Use hook to hook actions. // If canvas actions are defined, because on url, or because contact was created with canvas feature on, we use the canvas feature. // If canvas actions are not defined, we use standard feature. if (method_exists($objcanvas->control,'doActions')) { $objcanvas->doActions($id); if (! empty($objcanvas->error) || (! empty($objcanvas->errors) && sizeof($objcanvas->errors) > 0)) { $error=$objcanvas->error; $errors=$objcanvas->errors; if ($action=='add') { $objcanvas->action='create'; $action='create'; } if ($action=='update') { $objcanvas->action='edit'; $action='edit'; } } } // ---------- end deprecated. if (empty($reshook)) { // Cancel if (GETPOST("cancel") && GETPOST('backtopage')) { header("Location: ".GETPOST('backtopage'));
else { $reshook+=$resaction; } } } } } } // ---------- start deprecated. Use hook to hook actions. // If canvas actions are defined, because on url, or because contact was created with canvas feature on, we use the canvas feature. // If canvas actions are not defined, we use standard feature. if (method_exists($objcanvas->control,'doActions')) { $objcanvas->doActions($socid); if (! empty($objcanvas->error) || (! empty($objcanvas->errors) && sizeof($objcanvas->errors) > 0)) { $error=$objcanvas->error; $errors=$objcanvas->errors; if ($action=='add') { $objcanvas->action='create'; $action='create'; } if ($action=='update') { $objcanvas->action='edit'; $action='edit'; } } } // ---------- end deprecated. if (empty($reshook)) { if ($_POST["getcustomercode"]) { // We defined value code_client