diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index c585f1632fc..a6f7471060f 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -65,14 +65,14 @@ if ($_POST["action"] == 'add_action') if ($_POST['cancel']) { - $back=''; - if (! empty($_POST["back"])) $back=$_POST["back"]; - if (! $back) + $backtopage=''; + if (! empty($_POST["backtopage"])) $backtopage=$_POST["backtopage"]; + if (! $backtopage) { - if ($_POST['socid'] > 0) $back=DOL_URL_ROOT.'/comm/fiche.php?socid='.$_POST['socid']; - else $back=DOL_URL_ROOT.'/comm/action/indexactions.php'; + if ($_POST['socid'] > 0) $backtopage=DOL_URL_ROOT.'/comm/fiche.php?socid='.$_POST['socid']; + else $backtopage=DOL_URL_ROOT.'/comm/action/indexactions.php'; } - header("Location: ".$back); + header("Location: ".$backtopage); exit; } @@ -411,9 +411,8 @@ if ($_GET["action"] == 'create') } print '
'; - if (! empty($_REQUEST["backtopage"])) print ''; print ''; - print ''; + if (! empty($_REQUEST["backtopage"])) print ''; if ($_GET["actioncode"] == 'AC_RDV') print_titre ($langs->trans("AddActionRendezVous")); else print_titre ($langs->trans("AddAnAction")); diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 709462d2521..cb59adb78f7 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -676,7 +676,7 @@ if ($socid > 0) // Lien click to dial print ''; if ($conf->agenda->enabled && $user->rights->agenda->myactions->create) - print ''; + print ''; print dolibarr_print_phone($obj->phone); if ($conf->agenda->enabled && $user->rights->agenda->myactions->create) print ''; @@ -684,14 +684,14 @@ if ($socid > 0) print ''; print ''; if ($conf->agenda->enabled && $user->rights->agenda->myactions->create) - print ''; + print ''; print dolibarr_print_phone($obj->fax); if ($conf->agenda->enabled && $user->rights->agenda->myactions->create) print ''; print ' '; print ''; if ($conf->agenda->enabled && $user->rights->agenda->myactions->create) - print ''; + print ''; print $obj->email; if ($conf->agenda->enabled && $user->rights->agenda->myactions->create) print ''; @@ -704,7 +704,7 @@ if ($socid > 0) if ($conf->agenda->enabled && $user->rights->agenda->myactions->create) { - print ''; + print ''; print img_object($langs->trans("Rendez-Vous"),"action"); print ''; } diff --git a/htdocs/contact/index.php b/htdocs/contact/index.php index 37ac610f9fd..5b94825bae3 100644 --- a/htdocs/contact/index.php +++ b/htdocs/contact/index.php @@ -104,8 +104,9 @@ llxHeader(); $form=new Form($db); -$sql = "SELECT s.rowid as socid, s.nom, s.fk_pays,"; -$sql.= " p.rowid as cidp, p.name, p.firstname, p.email, p.phone, p.phone_mobile, p.fax, p.priv,"; +$sql = "SELECT s.rowid as socid, s.nom,"; +$sql.= " p.rowid as cidp, p.name, p.firstname, p.email,"; +$sql.= " p.phone, p.phone_mobile, p.fax, p.fk_pays, p.priv,"; $sql.= " ".$db->pdate("p.tms")." as tms"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as p"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = p.fk_soc"; @@ -312,9 +313,9 @@ if ($result) // Phone print ''; if ($conf->agenda->enabled && $user->rights->agenda->myactions->create) - print ''.dolibarr_print_phone($obj->phone,$obj->fk_pays).''; + print ''.dolibarr_print_phone($obj->phone,$obj->pays_code).''; else - print dolibarr_print_phone($obj->phone,$obj->fk_pays); + print dolibarr_print_phone($obj->phone,$obj->pays_code); print ''; if ($_GET["view"] == 'phone')