Merge remote-tracking branch 'upstream/6.0' into 6.0
This commit is contained in:
commit
c434136ba5
@ -397,13 +397,13 @@ class Notify
|
|||||||
break;
|
break;
|
||||||
case 'FICHINTER_ADD_CONTACT':
|
case 'FICHINTER_ADD_CONTACT':
|
||||||
$link='/fichinter/card.php?id='.$object->id;
|
$link='/fichinter/card.php?id='.$object->id;
|
||||||
$dir_output = $conf->facture->dir_output;
|
$dir_output = $conf->ficheinter->dir_output;
|
||||||
$object_type = 'ficheinter';
|
$object_type = 'ficheinter';
|
||||||
$mesg = $langs->transnoentitiesnoconv("EMailTextInterventionAddedContact",$object->ref);
|
$mesg = $langs->transnoentitiesnoconv("EMailTextInterventionAddedContact",$object->ref);
|
||||||
break;
|
break;
|
||||||
case 'FICHINTER_VALIDATE':
|
case 'FICHINTER_VALIDATE':
|
||||||
$link='/fichinter/card.php?id='.$object->id;
|
$link='/fichinter/card.php?id='.$object->id;
|
||||||
$dir_output = $conf->facture->dir_output;
|
$dir_output = $conf->ficheinter->dir_output;
|
||||||
$object_type = 'ficheinter';
|
$object_type = 'ficheinter';
|
||||||
$mesg = $langs->transnoentitiesnoconv("EMailTextInterventionValidated",$object->ref);
|
$mesg = $langs->transnoentitiesnoconv("EMailTextInterventionValidated",$object->ref);
|
||||||
break;
|
break;
|
||||||
@ -651,8 +651,9 @@ class Notify
|
|||||||
}
|
}
|
||||||
dol_syslog("Replace the __SUPERVISOREMAIL__ key into recipient email string with ".$newval);
|
dol_syslog("Replace the __SUPERVISOREMAIL__ key into recipient email string with ".$newval);
|
||||||
$sendto = preg_replace('/__SUPERVISOREMAIL__/', $newval, $sendto);
|
$sendto = preg_replace('/__SUPERVISOREMAIL__/', $newval, $sendto);
|
||||||
$sendto = preg_replace('/^[\s,]+/','',$sendto); // Clean start of string
|
$sendto = preg_replace('/,\s*,/', ',', $sendto); // in some case you can have $sendto like "email, __SUPERVISOREMAIL__ , otheremail" then you have "email, , othermail" and it's not valid
|
||||||
$sendto = preg_replace('/[\s,]+$/','',$sendto); // Clean end of string
|
$sendto = preg_replace('/^[\s,]+/', '', $sendto); // Clean start of string
|
||||||
|
$sendto = preg_replace('/[\s,]+$/', '', $sendto); // Clean end of string
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($sendto)
|
if ($sendto)
|
||||||
|
|||||||
@ -140,7 +140,7 @@ class Fichinter extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function create($user, $notrigger=0)
|
function create($user, $notrigger=0)
|
||||||
{
|
{
|
||||||
global $conf, $user, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::create ref=".$this->ref);
|
dol_syslog(get_class($this)."::create ref=".$this->ref);
|
||||||
|
|
||||||
|
|||||||
@ -101,6 +101,21 @@ if (empty($reshook))
|
|||||||
$result=$object->setPaymentMethods(GETPOST('mode_reglement_supplier_id','int'));
|
$result=$object->setPaymentMethods(GETPOST('mode_reglement_supplier_id','int'));
|
||||||
if ($result < 0) dol_print_error($db,$object->error);
|
if ($result < 0) dol_print_error($db,$object->error);
|
||||||
}
|
}
|
||||||
|
if ($action == 'update_extras') {
|
||||||
|
$object->fetch($id);
|
||||||
|
|
||||||
|
// Fill array 'array_options' with data from update form
|
||||||
|
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
|
$ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute'));
|
||||||
|
|
||||||
|
if ($ret < 0) $error++;
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$result = $object->insertExtraFields();
|
||||||
|
if ($result < 0) $error++;
|
||||||
|
}
|
||||||
|
if ($error) $action = 'edit_extras';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user