Fix: convert lines delimiters
This commit is contained in:
parent
a7e45ae10d
commit
c6d703de54
@ -133,11 +133,11 @@ if ($action == 'delete')
|
||||
{
|
||||
if (!empty($id))
|
||||
{
|
||||
$classname = "MailingTargets";
|
||||
$obj = new $classname($db);
|
||||
$obj->update_nb($id);
|
||||
|
||||
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$id);
|
||||
$classname = "MailingTargets";
|
||||
$obj = new $classname($db);
|
||||
$obj->update_nb($id);
|
||||
|
||||
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
|
||||
@ -121,7 +121,7 @@ class Mailing extends CommonObject
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
$this->error=$this->db->lasterror();
|
||||
dol_syslog("Mailing::Create ".$this->error, LOG_ERR);
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
|
||||
@ -41,11 +41,11 @@ $action=GETPOST('action','alpha');
|
||||
$confirm=GETPOST('confirm','alpha');
|
||||
$urlfrom=GETPOST('urlfrom');
|
||||
|
||||
$mesg='';
|
||||
if (isset($_SESSION['DolMessage']))
|
||||
{
|
||||
$mesg=$_SESSION['DolMessage'];
|
||||
unset($_SESSION['DolMessage']);
|
||||
$mesg='';
|
||||
if (isset($_SESSION['DolMessage']))
|
||||
{
|
||||
$mesg=$_SESSION['DolMessage'];
|
||||
unset($_SESSION['DolMessage']);
|
||||
}
|
||||
|
||||
$object=new Mailing($db);
|
||||
@ -53,9 +53,9 @@ $result=$object->fetch($id);
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
||||
$hookmanager=new HookManager($db);
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
||||
$hookmanager=new HookManager($db);
|
||||
$hookmanager->initHooks(array('mailingcard'));
|
||||
|
||||
// Tableau des substitutions possibles
|
||||
@ -109,11 +109,11 @@ if ($conf->global->MAILING_EMAIL_UNSUBSCRIBE)
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
* Actions
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
$parameters=array();
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
// Action clone object
|
||||
@ -557,61 +557,61 @@ if ($action == 'update' && empty($_POST["removedfile"]) && empty($_POST["cancel"
|
||||
|
||||
// Action confirmation validation
|
||||
if ($action == 'confirm_valid' && $confirm == 'yes')
|
||||
{
|
||||
if ($object->id > 0)
|
||||
{
|
||||
{
|
||||
if ($object->id > 0)
|
||||
{
|
||||
$object->valid($user);
|
||||
|
||||
$_SESSION['DolMessage']='<div class="ok">'.$langs->trans("MailingSuccessfullyValidated").'</div>';
|
||||
|
||||
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
$_SESSION['DolMessage']='<div class="ok">'.$langs->trans("MailingSuccessfullyValidated").'</div>';
|
||||
|
||||
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
|
||||
// Resend
|
||||
if ($action == 'confirm_reset' && $confirm == 'yes')
|
||||
{
|
||||
if ($object->id > 0)
|
||||
{
|
||||
$db->begin();
|
||||
|
||||
$result=$object->valid($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
$result=$object->reset_targets_status($user);
|
||||
}
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
$db->commit();
|
||||
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$mesg=$object->error;
|
||||
$db->rollback();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
{
|
||||
if ($object->id > 0)
|
||||
{
|
||||
$db->begin();
|
||||
|
||||
$result=$object->valid($user);
|
||||
if ($result > 0)
|
||||
{
|
||||
$result=$object->reset_targets_status($user);
|
||||
}
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
$db->commit();
|
||||
Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$mesg=$object->error;
|
||||
$db->rollback();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
|
||||
// Action confirmation suppression
|
||||
if ($action == 'confirm_delete' && $confirm == 'yes')
|
||||
{
|
||||
if ($object->delete($object->id))
|
||||
{
|
||||
if ($object->delete($object->id))
|
||||
{
|
||||
$url= (! empty($urlfrom) ? $urlfrom : 'liste.php');
|
||||
Header("Location: ".$url);
|
||||
exit;
|
||||
$url= (! empty($urlfrom) ? $urlfrom : 'liste.php');
|
||||
Header("Location: ".$url);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
@ -626,7 +626,7 @@ if (! empty($_POST["cancel"]))
|
||||
* View
|
||||
*/
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels=$extrafields->fetch_name_optionals_label('mailing');
|
||||
|
||||
$help_url='EN:Module_EMailing|FR:Module_Mailing|ES:Módulo_Mailing';
|
||||
@ -651,18 +651,18 @@ if ($action == 'create')
|
||||
print '<tr><td width="25%" class="fieldrequired">'.$langs->trans("MailFrom").'</td><td><input class="flat" name="from" size="40" value="'.$conf->global->MAILING_EMAIL_FROM.'"></td></tr>';
|
||||
print '<tr><td width="25%">'.$langs->trans("MailErrorsTo").'</td><td><input class="flat" name="errorsto" size="40" value="'.(!empty($conf->global->MAILING_EMAIL_ERRORSTO)?$conf->global->MAILING_EMAIL_ERRORSTO:$conf->global->MAIN_MAIL_ERRORS_TO).'"></td></tr>';
|
||||
|
||||
// Other attributes
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
print '<tr><td>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
// Other attributes
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
print '<tr><td>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
@ -809,18 +809,18 @@ else
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Other attributes
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
print '<tr><td>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
// Other attributes
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
print '<tr><td>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
@ -861,11 +861,11 @@ else
|
||||
|
||||
//print '<a class="butAction" href="fiche.php?action=test&id='.$object->id.'">'.$langs->trans("PreviewMailing").'</a>';
|
||||
|
||||
if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! $user->rights->mailing->mailing_advance->send)
|
||||
{
|
||||
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv("NotEnoughPermissions")).'">'.$langs->trans("TestMailing").'</a>';
|
||||
}
|
||||
else
|
||||
if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! $user->rights->mailing->mailing_advance->send)
|
||||
{
|
||||
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv("NotEnoughPermissions")).'">'.$langs->trans("TestMailing").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=test&id='.$object->id.'">'.$langs->trans("TestMailing").'</a>';
|
||||
}
|
||||
@ -1043,18 +1043,18 @@ else
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Other attributes
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
print '<tr><td>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
// Other attributes
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||
{
|
||||
foreach($extrafields->attribute_label as $key=>$label)
|
||||
{
|
||||
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
|
||||
print '<tr><td>'.$label.'</td><td colspan="3">';
|
||||
print $extrafields->showInputField($key,$value);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
@ -1119,9 +1119,9 @@ else
|
||||
// Message
|
||||
print '<tr><td width="25%" valign="top">'.$langs->trans("MailMessage").'<br>';
|
||||
print '<br><i>'.$langs->trans("CommonSubstitutions").':<br>';
|
||||
foreach($object->substitutionarray as $key => $val)
|
||||
{
|
||||
print $key.' = '.$langs->trans($val).'<br>';
|
||||
foreach($object->substitutionarray as $key => $val)
|
||||
{
|
||||
print $key.' = '.$langs->trans($val).'<br>';
|
||||
}
|
||||
print '</i></td>';
|
||||
print '<td colspan="3">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user