PHP7.2
This commit is contained in:
parent
5d8674a9f4
commit
ede1f3fdfc
@ -115,7 +115,8 @@ $actioncomm_fields= array(
|
||||
// fetch optionals attributes and labels
|
||||
$extrafields=new ExtraFields($db);
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('actioncomm',true);
|
||||
if (count($extrafields)>0) {
|
||||
$extrafield_array=null;
|
||||
if (is_array($extrafields) && count($extrafields)>0) {
|
||||
$extrafield_array = array();
|
||||
}
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
|
||||
@ -120,7 +120,8 @@ $contact_fields = array(
|
||||
// fetch optionals attributes and labels
|
||||
$extrafields=new ExtraFields($db);
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('socpeople',true);
|
||||
if (count($extrafields)>0) {
|
||||
$extrafield_array=null;
|
||||
if (is_array($extrafields) && count($extrafields)>0) {
|
||||
$extrafield_array = array();
|
||||
}
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
|
||||
@ -116,7 +116,8 @@ $line_fields = array(
|
||||
// fetch optionals attributes and labels
|
||||
$extrafields=new ExtraFields($db);
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('commandedet',true);
|
||||
if (count($extrafields)>0) {
|
||||
$extrafield_line_array=null;
|
||||
if (is_array($extrafields) && count($extrafields)>0) {
|
||||
$extrafield_line_array = array();
|
||||
}
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
|
||||
@ -134,7 +134,8 @@ $productorservice_fields = array(
|
||||
// fetch optionals attributes and labels
|
||||
$extrafields=new ExtraFields($db);
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('product',true);
|
||||
if (count($extrafields)>0) {
|
||||
$extrafield_array=null;
|
||||
if (is_array($extrafields) && count($extrafields) > 0) {
|
||||
$extrafield_array = array();
|
||||
}
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
|
||||
@ -163,7 +163,8 @@ $project_fields = array(
|
||||
// fetch optionals attributes and labels
|
||||
$extrafields=new ExtraFields($db);
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('project',true);
|
||||
if (count($extrafields)>0) {
|
||||
$extrafield_array=null;
|
||||
if (is_array($extrafields) && count($extrafields)>0) {
|
||||
$extrafield_array = array();
|
||||
}
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
|
||||
@ -124,7 +124,8 @@ $thirdparty_fields= array(
|
||||
// fetch optionals attributes and labels
|
||||
$extrafields=new ExtraFields($db);
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('societe',true);
|
||||
if (count($extrafields)>0) {
|
||||
$extrafield_array=null;
|
||||
if (is_array($extrafields) && count($extrafields)>0) {
|
||||
$extrafield_array = array();
|
||||
}
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
@ -780,7 +781,7 @@ function deleteThirdParty($authentication,$id='',$ref='',$ref_ext='')
|
||||
$errorcode='BAD_PARAMETERS'; $errorlabel="Parameter id, ref and ref_ext can't be both provided. You must choose one or other but not both.";
|
||||
}
|
||||
dol_syslog("Function: deleteThirdParty 1");
|
||||
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$fuser->getrights();
|
||||
@ -789,21 +790,21 @@ function deleteThirdParty($authentication,$id='',$ref='',$ref_ext='')
|
||||
{
|
||||
$thirdparty=new Societe($db);
|
||||
$result=$thirdparty->fetch($id,$ref,$ref_ext);
|
||||
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
$db->begin();
|
||||
|
||||
|
||||
$result=$thirdparty->delete($thirdparty->id, $fuser);
|
||||
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
$db->commit();
|
||||
|
||||
|
||||
$objectresp = array('result'=>array('result_code'=>'OK', 'result_label'=>''));
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
$db->rollback();
|
||||
$error++;
|
||||
$errorcode='KO';
|
||||
@ -815,7 +816,7 @@ function deleteThirdParty($authentication,$id='',$ref='',$ref_ext='')
|
||||
{
|
||||
$error++;
|
||||
$errorcode='NOT_FOUND'; $errorlabel='Object not found for id='.$id.' nor ref='.$ref.' nor ref_ext='.$ref_ext;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@ -187,7 +187,8 @@ $thirdpartywithuser_fields = array(
|
||||
// fetch optionals attributes and labels
|
||||
$extrafields=new ExtraFields($db);
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('socpeople',true);
|
||||
if (count($extrafields)>0) {
|
||||
$extrafield_array=null;
|
||||
if (is_array($extrafields) && count($extrafields)>0) {
|
||||
$extrafield_array = array();
|
||||
}
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user