forked from Wavyzz/dolibarr
Standardize substition keys.
This commit is contained in:
@@ -13,14 +13,16 @@ NEW: complete_head_from_modules() in ldap_prepare_head()
|
|||||||
WARNING:
|
WARNING:
|
||||||
|
|
||||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||||
* The methode "cloture" on contact were renamed into "closeAll".
|
* The methode "cloture" on contract were renamed into "closeAll".
|
||||||
* The substitution key for reference of object is now __REF__ whatever is the object (it replaces __ORDERREF__,
|
* The substitution key for reference of object is now __REF__ whatever is the object (it replaces __ORDERREF__,
|
||||||
__PROPALREF__, ...)
|
__PROPALREF__, ...)
|
||||||
|
* The substition key __SIGNATURE__ was renamed into __USER_SIGNATURE__ to standardize naming conventions.
|
||||||
|
* Substitution keys with syntax %XXX% were renamed into __XXX__ to match others.
|
||||||
* Some REST API to access the dictionary (country, town, ...) were moved into a common API.
|
* Some REST API to access the dictionary (country, town, ...) were moved into a common API.
|
||||||
* Page bank/index.php and bank/bankentries.php were renamed into bank/list.php and bank/bankentries_list.php to
|
* Page bank/index.php and bank/bankentries.php were renamed into bank/list.php and bank/bankentries_list.php to
|
||||||
follow page naming conventions (so default filter/sort order features can also work).
|
follow page naming conventions (so default filter/sort order features can also work).
|
||||||
* The trigger ORDER_SUPPLIER_STATUS_ONPROCESS was renamed ORDER_SUPPLIER_STATUS_ORDERED
|
* The trigger ORDER_SUPPLIER_STATUS_ONPROCESS was renamed into ORDER_SUPPLIER_STATUS_ORDERED
|
||||||
* The trigger ORDER_SUPPLIER_STATUS_RECEIVED_ALL was renamed ORDER_SUPPLIER_STATUS_RECEIVED_COMPLETELY
|
* The trigger ORDER_SUPPLIER_STATUS_RECEIVED_ALL was renamed into ORDER_SUPPLIER_STATUS_RECEIVED_COMPLETELY
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 6.0.2 compared to 6.0.1 *****
|
***** ChangeLog for 6.0.2 compared to 6.0.1 *****
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ $substitutionarrayfortest=array(
|
|||||||
'__ID__' => 'RecipientIdRecord',
|
'__ID__' => 'RecipientIdRecord',
|
||||||
//'__EMAIL__' => 'RecipientEMail', // Done into actions_sendmails
|
//'__EMAIL__' => 'RecipientEMail', // Done into actions_sendmails
|
||||||
'__CHECK_READ__' => (is_object($object) && is_object($object->thirdparty))?'<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$object->thirdparty->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>':'',
|
'__CHECK_READ__' => (is_object($object) && is_object($object->thirdparty))?'<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$object->thirdparty->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>':'',
|
||||||
'__SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))?$usersignature:''), // Done into actions_sendmails
|
'__USER_SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))?$usersignature:''), // Done into actions_sendmails
|
||||||
'__LOGIN__' => 'RecipientLogin',
|
'__LOGIN__' => 'RecipientLogin',
|
||||||
'__LASTNAME__' => 'RecipientLastname',
|
'__LASTNAME__' => 'RecipientLastname',
|
||||||
'__FIRSTNAME__' => 'RecipientFirstname',
|
'__FIRSTNAME__' => 'RecipientFirstname',
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ $substitutionarrayfortest=array(
|
|||||||
'__EMAIL__' => 'TESTEMail',
|
'__EMAIL__' => 'TESTEMail',
|
||||||
'__LASTNAME__' => 'TESTLastname',
|
'__LASTNAME__' => 'TESTLastname',
|
||||||
'__FIRSTNAME__' => 'TESTFirstname',
|
'__FIRSTNAME__' => 'TESTFirstname',
|
||||||
'__SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))?$usersignature:''),
|
'__USER_SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))?$usersignature:''),
|
||||||
//'__PERSONALIZED__' => 'TESTPersonalized' // Hiden because not used yet
|
//'__PERSONALIZED__' => 'TESTPersonalized' // Hiden because not used yet
|
||||||
);
|
);
|
||||||
complete_substitutions_array($substitutionarrayfortest, $langs);
|
complete_substitutions_array($substitutionarrayfortest, $langs);
|
||||||
|
|||||||
@@ -216,7 +216,8 @@ if (empty($reshook))
|
|||||||
$substitutionarray['__OTHER3__'] = $other3;
|
$substitutionarray['__OTHER3__'] = $other3;
|
||||||
$substitutionarray['__OTHER4__'] = $other4;
|
$substitutionarray['__OTHER4__'] = $other4;
|
||||||
$substitutionarray['__OTHER5__'] = $other5;
|
$substitutionarray['__OTHER5__'] = $other5;
|
||||||
$substitutionarray['__SIGNATURE__'] = $signature; // Signature is empty when ran from command line or taken from user in parameter)
|
$substitutionarray['__USER_SIGNATURE__'] = $signature; // Signature is empty when ran from command line or taken from user in parameter)
|
||||||
|
$substitutionarray['__SIGNATURE__'] = $signature; // For backward compatibility
|
||||||
$substitutionarray['__CHECK_READ__'] = '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>';
|
$substitutionarray['__CHECK_READ__'] = '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>';
|
||||||
$substitutionarray['__UNSUBSCRIBE__'] = '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>';
|
$substitutionarray['__UNSUBSCRIBE__'] = '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>';
|
||||||
|
|
||||||
|
|||||||
@@ -858,9 +858,9 @@ class FormMail extends Form
|
|||||||
$defaultmessage=str_replace('\n',"\n",$defaultmessage);
|
$defaultmessage=str_replace('\n',"\n",$defaultmessage);
|
||||||
|
|
||||||
// Deal with format differences between message and signature (text / HTML)
|
// Deal with format differences between message and signature (text / HTML)
|
||||||
if(dol_textishtml($defaultmessage) && !dol_textishtml($this->substit['__SIGNATURE__'])) {
|
if(dol_textishtml($defaultmessage) && !dol_textishtml($this->substit['__USER_SIGNATURE__'])) {
|
||||||
$this->substit['__SIGNATURE__'] = dol_nl2br($this->substit['__SIGNATURE__']);
|
$this->substit['__USER_SIGNATURE__'] = dol_nl2br($this->substit['__USER_SIGNATURE__']);
|
||||||
} else if(!dol_textishtml($defaultmessage) && dol_textishtml($this->substit['__SIGNATURE__'])) {
|
} else if(!dol_textishtml($defaultmessage) && dol_textishtml($this->substit['__USER_SIGNATURE__'])) {
|
||||||
$defaultmessage = dol_nl2br($defaultmessage);
|
$defaultmessage = dol_nl2br($defaultmessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1213,7 +1213,7 @@ class FormMail extends Form
|
|||||||
$tmparray['__OTHER3__'] = 'Other3';
|
$tmparray['__OTHER3__'] = 'Other3';
|
||||||
$tmparray['__OTHER4__'] = 'Other4';
|
$tmparray['__OTHER4__'] = 'Other4';
|
||||||
$tmparray['__OTHER5__'] = 'Other5';
|
$tmparray['__OTHER5__'] = 'Other5';
|
||||||
$tmparray['__SIGNATURE__'] = 'TagSignature';
|
$tmparray['__USER_SIGNATURE__'] = 'TagSignature';
|
||||||
$tmparray['__CHECK_READ__'] = 'TagCheckMail';
|
$tmparray['__CHECK_READ__'] = 'TagCheckMail';
|
||||||
$tmparray['__UNSUBSCRIBE__'] = 'TagUnsubscribe';
|
$tmparray['__UNSUBSCRIBE__'] = 'TagUnsubscribe';
|
||||||
//,'__PERSONALIZED__' => 'Personalized' // Hidden because not used yet in mass emailing
|
//,'__PERSONALIZED__' => 'Personalized' // Hidden because not used yet in mass emailing
|
||||||
|
|||||||
@@ -5511,7 +5511,9 @@ function make_substitutions($text, $substitutionarray, $outputlangs=null)
|
|||||||
// Make substitition for array $substitutionarray
|
// Make substitition for array $substitutionarray
|
||||||
foreach ($substitutionarray as $key => $value)
|
foreach ($substitutionarray as $key => $value)
|
||||||
{
|
{
|
||||||
if ($key == '__SIGNATURE__' && (! empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))) $value='';
|
if ($key == '__SIGNATURE__' && (! empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))) $value=''; // Protection
|
||||||
|
if ($key == '__USER_SIGNATURE__' && (! empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))) $value=''; // Protection
|
||||||
|
|
||||||
$text=str_replace("$key","$value",$text); // We must keep the " to work when value is 123.5 for example
|
$text=str_replace("$key","$value",$text); // We must keep the " to work when value is 123.5 for example
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -76,19 +76,19 @@ MaxSize=Maximum size
|
|||||||
AttachANewFile=Attach a new file/document
|
AttachANewFile=Attach a new file/document
|
||||||
LinkedObject=Linked object
|
LinkedObject=Linked object
|
||||||
NbOfActiveNotifications=Number of notifications (nb of recipient emails)
|
NbOfActiveNotifications=Number of notifications (nb of recipient emails)
|
||||||
PredefinedMailTest=This is a test mail sent to __EMAIL__.\nThe two lines are separated by a carriage return.\n\n__SIGNATURE__
|
PredefinedMailTest=__(Hello)__\nThis is a test mail sent to __EMAIL__.\nThe two lines are separated by a carriage return.\n\n__USER_SIGNATURE__
|
||||||
PredefinedMailTestHtml=This is a <b>test</b> mail (the word test must be in bold).<br>The two lines are separated by a carriage return.<br><br>__SIGNATURE__
|
PredefinedMailTestHtml=__(Hello)__\nThis is a <b>test</b> mail (the word test must be in bold).<br>The two lines are separated by a carriage return.<br><br>__USER_SIGNATURE__
|
||||||
PredefinedMailContentSendInvoice=__CONTACTCIVNAME__\n\nYou will find here the invoice __REF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
|
PredefinedMailContentSendInvoice=__(Hello)__\n\nYou will find here the invoice __REF__\n\n__ONLINE_PAYMENT_URL__\n\n__(Sincerely)__\n\n__USER_SIGNATURE__
|
||||||
PredefinedMailContentSendInvoiceReminder=__CONTACTCIVNAME__\n\nWe would like to warn you that the invoice __REF__ seems to not be payed. So this is the invoice in attachment again, as a reminder.\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
|
PredefinedMailContentSendInvoiceReminder=__(Hello)__\n\nWe would like to warn you that the invoice __REF__ seems to not be payed. So this is the invoice in attachment again, as a reminder.\n\n__ONLINE_PAYMENT_URL__\n\n__(Sincerely)__\n\n__USER_SIGNATURE__
|
||||||
PredefinedMailContentSendProposal=__CONTACTCIVNAME__\n\nYou will find here the commercial proposal __PREF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
|
PredefinedMailContentSendProposal=__(Hello)__\n\nYou will find here the commercial proposal __PREF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__
|
||||||
PredefinedMailContentSendSupplierProposal=__CONTACTCIVNAME__\n\nYou will find here the price request __REF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
|
PredefinedMailContentSendSupplierProposal=__(Hello)__\n\nYou will find here the price request __REF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__
|
||||||
PredefinedMailContentSendOrder=__CONTACTCIVNAME__\n\nYou will find here the order __REF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
|
PredefinedMailContentSendOrder=__(Hello)__\n\nYou will find here the order __REF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__
|
||||||
PredefinedMailContentSendSupplierOrder=__CONTACTCIVNAME__\n\nYou will find here our order __REF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
|
PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nYou will find here our order __REF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__
|
||||||
PredefinedMailContentSendSupplierInvoice=__CONTACTCIVNAME__\n\nYou will find here the invoice __REF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
|
PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nYou will find here the invoice __REF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__
|
||||||
PredefinedMailContentSendShipping=__CONTACTCIVNAME__\n\nYou will find here the shipping __REF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
|
PredefinedMailContentSendShipping=__(Hello)__\n\nYou will find here the shipping __REF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__
|
||||||
PredefinedMailContentSendFichInter=__CONTACTCIVNAME__\n\nYou will find here the intervention __REF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
|
PredefinedMailContentSendFichInter=__(Hello)__\n\nYou will find here the intervention __REF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__
|
||||||
PredefinedMailContentThirdparty=\n\n__SIGNATURE__
|
PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__
|
||||||
PredefinedMailContentUser=\n\n__SIGNATURE__
|
PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__
|
||||||
DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available.
|
DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available.
|
||||||
ChooseYourDemoProfil=Choose the demo profile that best suits your needs...
|
ChooseYourDemoProfil=Choose the demo profile that best suits your needs...
|
||||||
ChooseYourDemoProfilMore=...or build your own profile<br>(manual module selection)
|
ChooseYourDemoProfilMore=...or build your own profile<br>(manual module selection)
|
||||||
|
|||||||
@@ -178,7 +178,8 @@ if ($resql)
|
|||||||
$substitutionarray['__OTHER3__'] = $other3;
|
$substitutionarray['__OTHER3__'] = $other3;
|
||||||
$substitutionarray['__OTHER4__'] = $other4;
|
$substitutionarray['__OTHER4__'] = $other4;
|
||||||
$substitutionarray['__OTHER5__'] = $other5;
|
$substitutionarray['__OTHER5__'] = $other5;
|
||||||
$substitutionarray['__SIGNATURE__'] = $signature; // Signature is empty when ran from command line or taken from user in parameter)
|
$substitutionarray['__USER_SIGNATURE__'] = $signature; // Signature is empty when ran from command line or taken from user in parameter)
|
||||||
|
$substitutionarray['__SIGNATURE__'] = $signature; // For backward compatibility
|
||||||
$substitutionarray['__CHECK_READ__'] = '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>';
|
$substitutionarray['__CHECK_READ__'] = '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>';
|
||||||
$substitutionarray['__UNSUBSCRIBE__'] = '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>';
|
$substitutionarray['__UNSUBSCRIBE__'] = '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user