mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Rename global variable from MAIN_SOCIETE_UNSUBSCRIBE to
MAILING_EMAIL_UNSUBSCRIBE to be reliable on dolibarr implementation Conflicts: htdocs/admin/mailing.php
This commit is contained in:
@@ -49,6 +49,8 @@ if ($action == 'setvalue' && $user->admin)
|
||||
if (! $res > 0) $error++;
|
||||
$res=dolibarr_set_const($db, "MAILING_EMAIL_ERRORSTO",$mailerror,'chaine',0,'',$conf->entity);
|
||||
if (! $res > 0) $error++;
|
||||
$res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE",$checkread,'chaine',0,'',$conf->entity);
|
||||
if (! $res > 0) $error++;
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
@@ -101,6 +103,25 @@ print '<input size="32" type="text" name="MAILING_EMAIL_ERRORSTO" value="'.$conf
|
||||
if (!empty($conf->global->MAILING_EMAIL_ERRORSTO) && ! isValidEmail($conf->global->MAILING_EMAIL_ERRORSTO)) print ' '.img_warning($langs->trans("BadEMail"));
|
||||
print '</td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("ActivateCheckRead").'</td><td>';
|
||||
if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE==1)
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setvalue&value=0">';
|
||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||
print '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setvalue&value=1">';
|
||||
print img_picto($langs->trans("Disabled"),'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
|
||||
print '<tr><td colspan="3" align="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td></tr>';
|
||||
print '</table></form>';
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ $substitutionarray=array(
|
||||
'__SIGNATURE__' => 'Signature',
|
||||
'__PERSONALIZED__' => 'Personalized'
|
||||
);
|
||||
if ($conf->global->MAIN_SOCIETE_UNSUBSCRIBE)
|
||||
if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE)
|
||||
{
|
||||
$substitutionarray=array_merge(
|
||||
$substitutionarray,
|
||||
@@ -81,7 +81,7 @@ $substitutionarrayfortest=array(
|
||||
'__SIGNATURE__' => 'TESTSignature',
|
||||
'__PERSONALIZED__' => 'TESTPersonalized'
|
||||
);
|
||||
if ($conf->global->MAIN_SOCIETE_UNSUBSCRIBE)
|
||||
if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE)
|
||||
{
|
||||
$substitutionarrayfortest=array_merge(
|
||||
$substitutionarrayfortest,
|
||||
@@ -1043,7 +1043,7 @@ else
|
||||
print '<br><i>'.$langs->trans("CommonSubstitutions").':<br>';
|
||||
print '__ID__ = '.$langs->trans("IdRecord").'<br>';
|
||||
print '__EMAIL__ = '.$langs->trans("EMail").'<br>';
|
||||
if ($conf->global->MAIN_SOCIETE_UNSUBSCRIBE)
|
||||
if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE)
|
||||
{
|
||||
print '__CHECK_READ__ = '.$langs->trans("CheckRead").'<br>';
|
||||
print '__UNSUSCRIBE__ = '.$langs->trans("MailUnsubcribe").'<br>';
|
||||
|
||||
@@ -32,7 +32,7 @@ require("../../main.inc.php");
|
||||
|
||||
$id=GETPOST('tag');
|
||||
|
||||
if (empty($conf->global->MAIN_SOCIETE_UNSUBSCRIBE)) accessforbidden('Option not enabled');
|
||||
if (empty($conf->global->MAILING_EMAIL_UNSUBSCRIBE)) accessforbidden('Option not enabled');
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -39,7 +39,7 @@ $langs->load("mails");
|
||||
$id=GETPOST('tag');
|
||||
$unsuscrib=GETPOST('unsuscrib');
|
||||
|
||||
if (empty($conf->global->MAIN_SOCIETE_UNSUBSCRIBE)) accessforbidden('Option not enabled');
|
||||
if (empty($conf->global->MAILING_EMAIL_UNSUBSCRIBE)) accessforbidden('Option not enabled');
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user