Code comment

This commit is contained in:
Laurent Destailleur 2022-01-20 16:32:30 +01:00
parent dfa2cab408
commit de30b68f9e
3 changed files with 12 additions and 5 deletions

View File

@ -192,6 +192,7 @@ if (!empty($triggers)) {
} }
if ($search_event === '' || preg_match('/'.preg_quote($search_event, '/').'/i', $trigger['code'])) { if ($search_event === '' || preg_match('/'.preg_quote($search_event, '/').'/i', $trigger['code'])) {
print '<!-- '.$trigger['position'].' -->';
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.$trigger['code'].'</td>'; print '<td>'.$trigger['code'].'</td>';
print '<td>'.$trigger['label'].'</td>'; print '<td>'.$trigger['label'].'</td>';

View File

@ -30,6 +30,7 @@
/** /**
* Class to send SMS * Class to send SMS
* Usage: $smsfile = new CSMSFile($subject,$sendto,$replyto,$message,$filepath,$mimetype,$filename,$cc,$ccc,$deliveryreceipt,$msgishtml,$errors_to); * Usage: $smsfile = new CSMSFile($subject,$sendto,$replyto,$message,$filepath,$mimetype,$filename,$cc,$ccc,$deliveryreceipt,$msgishtml,$errors_to);
* $smsfile->socid=...; $smsfile->contact_id=...; $smsfile->member_id=...; $smsfile->fk_project=...;
* $smsfile->sendfile(); * $smsfile->sendfile();
*/ */
class CSMSFile class CSMSFile
@ -48,7 +49,8 @@ class CSMSFile
public $nostop; public $nostop;
public $socid; public $socid;
public $contactid; public $contact_id;
public $member_id;
public $fk_project; public $fk_project;
@ -135,6 +137,7 @@ class CSMSFile
$sms->socid = $this->socid; $sms->socid = $this->socid;
$sms->contact_id = $this->contact_id; $sms->contact_id = $this->contact_id;
$sms->member_id = $this->member_id;
$sms->project = $this->fk_project; $sms->project = $this->fk_project;
$res = $sms->SmsSend(); $res = $sms->SmsSend();
@ -167,6 +170,7 @@ class CSMSFile
$sms->socid = $this->socid; $sms->socid = $this->socid;
$sms->contact_id = $this->contact_id; $sms->contact_id = $this->contact_id;
$sms->member_id = $this->member_id;
$sms->fk_project = $this->fk_project; $sms->fk_project = $this->fk_project;
$res = $sms->SmsSend(); $res = $sms->SmsSend();

View File

@ -66,7 +66,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
* $object->elementtype (->element of object to link action to) * $object->elementtype (->element of object to link action to)
* $object->module (if defined, elementtype in llx_actioncomm will be elementtype@module) * $object->module (if defined, elementtype in llx_actioncomm will be elementtype@module)
* *
* @param string $action Event action code ('CONTRACT_MODIFY', 'RECRUITMENTCANDIDATURE_MODIFIY', ...) * @param string $action Event action code ('CONTRACT_MODIFY', 'RECRUITMENTCANDIDATURE_MODIFIY', or example by external module: 'SENTBYSMS'...)
* @param Object $object Object * @param Object $object Object
* @param User $user Object user * @param User $user Object user
* @param Translate $langs Object langs * @param Translate $langs Object langs
@ -88,6 +88,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
//var_dump($action.' - '.$conf->global->$key);exit; //var_dump($action.' - '.$conf->global->$key);exit;
// Do not log events not enabled for this action // Do not log events not enabled for this action
// GUI allow to set this option only if entry exists into table llx_c_action_trigger
if (empty($conf->global->$key)) { if (empty($conf->global->$key)) {
return 0; return 0;
} }
@ -887,8 +888,9 @@ class InterfaceActionsAuto extends DolibarrTriggers
} else { } else {
// TODO Merge all previous cases into this generic one // TODO Merge all previous cases into this generic one
// $action = BILL_DELETE, TICKET_CREATE, TICKET_MODIFY, TICKET_DELETE, CONTACT_SENTBYMAIL, RECRUITMENTCANDIDATURE_MODIFY, ... // $action = BILL_DELETE, TICKET_CREATE, TICKET_MODIFY, TICKET_DELETE, CONTACT_SENTBYMAIL, RECRUITMENTCANDIDATURE_MODIFY, ...
// Can also be a value defined by an external module like SENTBYSMS, COMPANY_SENTBYSMS, MEMBER_SENTBYSMS, ...
// Note: We are here only if $conf->global->MAIN_AGENDA_ACTIONAUTO_action is on (tested at begining of this function). // Note: We are here only if $conf->global->MAIN_AGENDA_ACTIONAUTO_action is on (tested at begining of this function).
// Note that these key can be set in agenda setup, only if defined into c_action_trigger // Note that these key can be set in agenda setup, only if defined into llx_c_action_trigger
// Load translation files required by the page // Load translation files required by the page
if (empty($object->actionmsg2)) { if (empty($object->actionmsg2)) {
$langs->loadLangs(array("agenda", "other")); $langs->loadLangs(array("agenda", "other"));