diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 30f4e8c3ebf..243f7d809a8 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -56,7 +56,6 @@ $contact = new Contact($db); /* * Action creation de l'action - * */ if ($_POST["action"] == 'add_action') { diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index e04571a8bf6..8b3edff6c0e 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -552,7 +552,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$action print ''; if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create) { - print ''; + print ''; print img_picto($langs->trans("NewAction"),'edit_add.png'); print ''; } diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 437a285d12f..e528c275c05 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -46,7 +46,7 @@ if (!empty($conf->global->MAIN_MODULE_CHRONODOCS)) $langs->load("chronodocs"); // Security check $socid = isset($_GET["socid"])?$_GET["socid"]:''; -if ($user->societe_id) $socid=$user->societe_id; +if ($user->societe_id > 0) $socid=$user->societe_id; $result = restrictedArea($user,'societe',$socid,''); $sortorder=$_GET["sortorder"]; @@ -101,6 +101,14 @@ if ($_POST["action"] == 'setassujtva' && $user->rights->societe->creer) * View */ +llxHeader('',$langs->trans('CustomerCard')); + + +$userstatic=new User($db); + +$form = new Form($db); + + if ($mode == 'search') { if ($mode-search == 'soc') @@ -124,11 +132,6 @@ if ($mode == 'search') } } -llxHeader('',$langs->trans('CustomerCard')); - -$userstatic=new User($db); - -$form = new Form($db); if ($socid > 0) { diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index 696000bd4b8..190b91721a8 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -1541,7 +1541,7 @@ function restrictedArea($user, $feature='societe', $objectid=0, $dbtablename='', } // If we have a particular object to check permissions on - if ($objectid) + if ($objectid > 0) { $sql='';