Fix: strict mode and $mesgs
This commit is contained in:
parent
a4f35bbfd5
commit
812d02ebe0
@ -78,7 +78,7 @@ if ($action == 'setcustomeraccountancycode')
|
||||
$result=$object->update($object->id,$user,1,1,0);
|
||||
if ($result < 0)
|
||||
{
|
||||
$mesg=join(',',$object->errors);
|
||||
$mesgs[]=join(',',$object->errors);
|
||||
}
|
||||
$action="";
|
||||
}
|
||||
@ -158,11 +158,6 @@ if ($id > 0)
|
||||
dol_print_error($db,$object->error);
|
||||
}
|
||||
|
||||
if ($errmesg)
|
||||
{
|
||||
print "<b>".$errmesg."</b><br>";
|
||||
}
|
||||
|
||||
/*
|
||||
* Affichage onglets
|
||||
*/
|
||||
@ -821,6 +816,7 @@ else
|
||||
dol_print_error($db,'Bad value for socid parameter');
|
||||
}
|
||||
|
||||
dol_htmloutput_mesg('',$mesgs);
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
|
||||
@ -389,6 +389,7 @@ function getFormeJuridiqueLabel($code)
|
||||
function show_projects($conf,$langs,$db,$object,$backtopage='')
|
||||
{
|
||||
global $user;
|
||||
global $bc;
|
||||
|
||||
$i = -1 ;
|
||||
|
||||
@ -517,13 +518,13 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
print '<td>'.$langs->trans("Poste").'</td><td>'.$langs->trans("Tel").'</td>';
|
||||
print '<td>'.$langs->trans("Fax").'</td><td>'.$langs->trans("EMail").'</td>';
|
||||
print "<td> </td>";
|
||||
if ($conf->agenda->enabled && $user->rights->agenda->myactions->create)
|
||||
if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create)
|
||||
{
|
||||
print '<td> </td>';
|
||||
}
|
||||
print "</tr>";
|
||||
|
||||
$sql = "SELECT p.rowid, p.name, p.firstname, p.poste, p.phone, p.fax, p.email, p.note ";
|
||||
$sql = "SELECT p.rowid, p.name, p.firstname, p.fk_pays, p.poste, p.phone, p.fax, p.email, p.note ";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p";
|
||||
$sql .= " WHERE p.fk_soc = ".$object->id;
|
||||
$sql .= " ORDER by p.datec";
|
||||
@ -552,12 +553,14 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
|
||||
print '<td>'.$obj->poste.'</td>';
|
||||
|
||||
$country_code = getCountry($obj->fk_pays, 2);
|
||||
|
||||
// Lien click to dial
|
||||
print '<td>';
|
||||
print dol_print_phone($obj->phone,$obj->pays_code,$obj->rowid,$object->id,'AC_TEL');
|
||||
print dol_print_phone($obj->phone,$country_code,$obj->rowid,$object->id,'AC_TEL');
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print dol_print_phone($obj->fax,$obj->pays_code,$obj->rowid,$object->id,'AC_FAX');
|
||||
print dol_print_phone($obj->fax,$country_code,$obj->rowid,$object->id,'AC_FAX');
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print dol_print_email($obj->email,$obj->rowid,$object->id,'AC_EMAIL');
|
||||
|
||||
@ -84,20 +84,20 @@ $error=$hookmanager->error; $errors=array_merge($errors, (array) $hookmanager->e
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
if ($_POST["getcustomercode"])
|
||||
if (GETPOST('getcustomercode'))
|
||||
{
|
||||
// We defined value code_client
|
||||
$_POST["code_client"]="Acompleter";
|
||||
}
|
||||
|
||||
if ($_POST["getsuppliercode"])
|
||||
if (GETPOST('getsuppliercode'))
|
||||
{
|
||||
// We defined value code_fournisseur
|
||||
$_POST["code_fournisseur"]="Acompleter";
|
||||
}
|
||||
|
||||
// Add new third party
|
||||
if ((! $_POST["getcustomercode"] && ! $_POST["getsuppliercode"])
|
||||
if ((! GETPOST('getcustomercode') && ! GETPOST('getsuppliercode'))
|
||||
&& ($action == 'add' || $action == 'update') && $user->rights->societe->creer)
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php");
|
||||
@ -1444,7 +1444,7 @@ else
|
||||
dol_htmloutput_errors($error,$errors);
|
||||
|
||||
$showlogo=$object->logo;
|
||||
$showbarcode=($conf->barcode->enabled && $user->rights->barcode->lire);
|
||||
$showbarcode=(! empty($conf->barcode->enabled) && $user->rights->barcode->lire);
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -1467,9 +1467,9 @@ else
|
||||
// Logo+barcode
|
||||
$rowspan=4;
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) $rowspan++;
|
||||
if ($object->client) $rowspan++;
|
||||
if ($conf->fournisseur->enabled && $object->fournisseur && ! empty($user->rights->fournisseur->lire)) $rowspan++;
|
||||
if ($conf->global->MAIN_MODULE_BARCODE) $rowspan++;
|
||||
if (! empty($object->client)) $rowspan++;
|
||||
if (! empty($conf->fournisseur->enabled) && $object->fournisseur && ! empty($user->rights->fournisseur->lire)) $rowspan++;
|
||||
if (! empty($conf->global->MAIN_MODULE_BARCODE)) $rowspan++;
|
||||
if (empty($conf->global->SOCIETE_DISABLE_STATE)) $rowspan++;
|
||||
$htmllogobar='';
|
||||
if ($showlogo || $showbarcode)
|
||||
@ -1502,7 +1502,7 @@ else
|
||||
}
|
||||
|
||||
// Supplier code
|
||||
if ($conf->fournisseur->enabled && $object->fournisseur && ! empty($user->rights->fournisseur->lire))
|
||||
if (! empty($conf->fournisseur->enabled) && $object->fournisseur && ! empty($user->rights->fournisseur->lire))
|
||||
{
|
||||
print '<tr><td>';
|
||||
print $langs->trans('SupplierCode').'</td><td colspan="'.(2+(($showlogo || $showbarcode)?0:1)).'">';
|
||||
@ -1514,7 +1514,7 @@ else
|
||||
}
|
||||
|
||||
// Barcode
|
||||
if ($conf->global->MAIN_MODULE_BARCODE)
|
||||
if (! empty($conf->global->MAIN_MODULE_BARCODE))
|
||||
{
|
||||
print '<tr><td>';
|
||||
print $langs->trans('Gencod').'</td><td colspan="'.(2+(($showlogo || $showbarcode)?0:1)).'">'.$object->barcode;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user