|
@@ -54,7 +54,7 @@ $extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
|
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
|
|
$hookmanager->initHooks(array('mailingcard'));
|
|
|
|
|
|
-// Tableau des substitutions possibles
|
|
|
+// Array of possible substitutions (See also file mailing-send.php that should manage same substitutions)
|
|
|
$object->substitutionarray=array(
|
|
|
'__ID__' => 'IdRecord',
|
|
|
'__EMAIL__' => 'EMail',
|
|
@@ -213,19 +213,20 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes')
|
|
|
$tmpfield=explode('=',$other[2],2); $other3=(isset($tmpfield[1])?$tmpfield[1]:$tmpfield[0]);
|
|
|
$tmpfield=explode('=',$other[3],2); $other4=(isset($tmpfield[1])?$tmpfield[1]:$tmpfield[0]);
|
|
|
$tmpfield=explode('=',$other[4],2); $other5=(isset($tmpfield[1])?$tmpfield[1]:$tmpfield[0]);
|
|
|
+ // Array of possible substitutions (See also fie mailing-send.php that should manage same substitutions)
|
|
|
$substitutionarray=array(
|
|
|
'__ID__' => $obj->source_id,
|
|
|
'__EMAIL__' => $obj->email,
|
|
|
- '__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"/>',
|
|
|
- '__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>',
|
|
|
- '__MAILTOEMAIL__' => '<a href="mailto:'.$obj->email.'">'.$obj->email.'</a>',
|
|
|
'__LASTNAME__' => $obj->lastname,
|
|
|
'__FIRSTNAME__' => $obj->firstname,
|
|
|
+ '__MAILTOEMAIL__' => '<a href="mailto:'.$obj->email.'">'.$obj->email.'</a>',
|
|
|
'__OTHER1__' => $other1,
|
|
|
'__OTHER2__' => $other2,
|
|
|
'__OTHER3__' => $other3,
|
|
|
'__OTHER4__' => $other4,
|
|
|
- '__OTHER5__' => $other5
|
|
|
+ '__OTHER5__' => $other5,
|
|
|
+ '__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"/>',
|
|
|
+ '__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>'
|
|
|
);
|
|
|
if (! empty($conf->paypal->enabled) && ! empty($conf->global->PAYPAL_SECURITY_TOKEN))
|
|
|
{
|
|
@@ -731,7 +732,7 @@ else
|
|
|
// Pour des raisons de securite, on ne permet pas cette fonction via l'IHM,
|
|
|
// on affiche donc juste un message
|
|
|
$mesgembedded.='<div class="warning">'.$langs->trans("MailingNeedCommand").'</div>';
|
|
|
- $mesgembedded.='<br><textarea cols="60" rows="'.ROWS_2.'" wrap="soft">php ./scripts/emailings/mailing-send.php '.$object->id.'</textarea>';
|
|
|
+ $mesgembedded.='<br><textarea cols="60" rows="'.ROWS_1.'" wrap="soft">php ./scripts/emailings/mailing-send.php '.$object->id.'</textarea>';
|
|
|
$mesgembedded.='<br><br><div class="warning">'.$langs->trans("MailingNeedCommand2").'</div>';
|
|
|
$_GET["action"]='';
|
|
|
}
|
|
@@ -915,7 +916,11 @@ else
|
|
|
print '<br><br></div>';
|
|
|
}
|
|
|
|
|
|
- if (! empty($mesgembedded)) dol_htmloutput_mesg($mesgembedded,'','warning',1);
|
|
|
+ if (! empty($mesgembedded))
|
|
|
+ {
|
|
|
+ dol_htmloutput_mesg($mesgembedded,'','warning',1);
|
|
|
+ print '<br>';
|
|
|
+ }
|
|
|
|
|
|
// Affichage formulaire de TEST
|
|
|
if ($action == 'test')
|