Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0

This commit is contained in:
Laurent Destailleur
2023-10-01 15:50:25 +02:00
6 changed files with 38 additions and 18 deletions

View File

@@ -1271,22 +1271,34 @@ abstract class CommonObject
// phpcs:enable
global $user;
$error = 0;
$this->db->begin();
$sql = "DELETE FROM ".$this->db->prefix()."element_contact";
$sql .= " WHERE rowid = ".((int) $rowid);
dol_syslog(get_class($this)."::delete_contact", LOG_DEBUG);
if ($this->db->query($sql)) {
if (!$notrigger) {
$result = $this->call_trigger(strtoupper($this->element).'_DELETE_CONTACT', $user);
if ($result < 0) {
$this->db->rollback();
return -1;
}
if (!$error && empty($notrigger)) {
// Call trigger
$this->context['contact_id'] = ((int) $rowid);
$result = $this->call_trigger(strtoupper($this->element).'_DELETE_CONTACT', $user);
if ($result < 0) {
$error++;
}
// End call triggers
}
if (!$error) {
dol_syslog(get_class($this)."::delete_contact", LOG_DEBUG);
$sql = "DELETE FROM ".MAIN_DB_PREFIX."element_contact";
$sql .= " WHERE rowid = ".((int) $rowid);
$result = $this->db->query($sql);
if (!$result) {
$error++;
$this->errors[] = $this->db->lasterror();
}
}
if (!$error) {
$this->db->commit();
return 1;
} else {

View File

@@ -77,7 +77,7 @@ function getOnlineSignatureUrl($mode, $type, $ref = '', $localorexternal = 1)
$securekeyseed = '';
if ($type == 'proposal') {
$securekeyseed = isset($conf->global->PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN) ? $conf->global->PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN : '';
$securekeyseed = getDolGlobalString('PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN');
$out = $urltouse.'/public/onlinesign/newonlinesign.php?source=proposal&ref='.($mode ? '<span style="color: #666666">' : '');
if ($mode == 1) {