Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0
This commit is contained in:
commit
ca878b2d76
8 changed files with 24 additions and 8 deletions
|
|
@ -2941,4 +2941,20 @@ class Contrat extends CommonObject
|
|||
|
||||
return $return;
|
||||
}
|
||||
|
||||
// @Todo getLibSignedStatus, LibSignedStatus
|
||||
|
||||
/**
|
||||
* Set signed status
|
||||
*
|
||||
* @param User $user Object user that modify
|
||||
* @param int $status Newsigned status to set (often a constant like self::STATUS_XXX)
|
||||
* @param int $notrigger 1 = Does not execute triggers, 0 = Execute triggers
|
||||
* @param string $triggercode Trigger code to use
|
||||
* @return int 0 < if KO, > 0 if OK
|
||||
*/
|
||||
public function setSignedStatus(User $user, int $status = 0, int $notrigger = 0, $triggercode = ''): int
|
||||
{
|
||||
return $this->setSignedStatusCommon($user, $status, $notrigger, $triggercode);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -723,8 +723,8 @@ class CMailFile
|
|||
$adressEmailFrom = array();
|
||||
$emailMatchs = preg_match_all($regexp, $from, $adressEmailFrom);
|
||||
$adressEmailFrom = reset($adressEmailFrom);
|
||||
if ($emailMatchs !== false && filter_var($conf->global->MAIN_MAIL_SMTPS_ID, FILTER_VALIDATE_EMAIL) && $conf->global->MAIN_MAIL_SMTPS_ID !== $adressEmailFrom) {
|
||||
$this->message->setFrom($conf->global->MAIN_MAIL_SMTPS_ID);
|
||||
if ($emailMatchs !== false && filter_var(getDolGlobalString('MAIN_MAIL_SMTPS_ID'), FILTER_VALIDATE_EMAIL) && getDolGlobalString('MAIN_MAIL_SMTPS_ID') !== $adressEmailFrom[0]) {
|
||||
$this->message->setFrom(getDolGlobalString('MAIN_MAIL_SMTPS_ID'));
|
||||
} else {
|
||||
$this->message->setFrom($this->getArrayAddress($this->addr_from));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6391,7 +6391,7 @@ class Form
|
|||
*
|
||||
* @param string $page Page
|
||||
* @param int $socid Id third party (-1=all, 0=only projects not linked to a third party, id=projects not linked or linked to third party id)
|
||||
* @param string $selected Id preselected project
|
||||
* @param int|string $selected Id preselected project
|
||||
* @param string $htmlname Name of select field
|
||||
* @param int<0,2> $discard_closed Discard closed projects (0=Keep,1=hide completely except $selected,2=Disable)
|
||||
* @param int $maxlength Max length
|
||||
|
|
|
|||
|
|
@ -1206,7 +1206,7 @@ if ($action == 'create') {
|
|||
$morehtmlref .= '<input type="submit" class="button valignmiddle" value="' . $langs->trans("Modify") . '">';
|
||||
$morehtmlref .= '</form>';
|
||||
} else {
|
||||
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, (string) $object->fk_project, 'none', 0, 0, 0, 1, '', 'maxwidth300');
|
||||
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, (getDolGlobalString('PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS') ? $object->socid : -1), $object->fk_project, 'none', 0, 0, 0, 1, '', 'maxwidth300');
|
||||
}
|
||||
} else {
|
||||
if (!empty($object->fk_project)) {
|
||||
|
|
|
|||
|
|
@ -1655,7 +1655,7 @@ if ($action == 'create') {
|
|||
if ($action != 'classify') {
|
||||
$morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> ';
|
||||
}
|
||||
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
|
||||
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, (getDolGlobalString('PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS') ? $object->socid : -1), $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
|
||||
} else {
|
||||
if (!empty($object->fk_project)) {
|
||||
$proj = new Project($db);
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ if ($object->id > 0) {
|
|||
if ($action != 'classify') {
|
||||
$morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> ';
|
||||
}
|
||||
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
|
||||
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, (getDolGlobalString('PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS') ? $object->socid : -1), $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
|
||||
} else {
|
||||
if (!empty($object->fk_project)) {
|
||||
$proj = new Project($db);
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ if (isModEnabled('project')) {
|
|||
if ($action != 'classify') {
|
||||
$morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> ';
|
||||
}
|
||||
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
|
||||
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, (getDolGlobalString('PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS') ? $object->socid : -1), $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
|
||||
} else {
|
||||
if (!empty($object->fk_project)) {
|
||||
$proj = new Project($db);
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
if ($action != 'classify') {
|
||||
$morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> ';
|
||||
}
|
||||
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
|
||||
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, (getDolGlobalString('PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS') ? $object->socid : -1), $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
|
||||
} else {
|
||||
if (!empty($object->fk_project)) {
|
||||
$proj = new Project($db);
|
||||
|
|
|
|||
Loading…
Reference in a new issue