mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 21:27:25 +02:00
Fix: Emails could be blank under some circumstances.
This commit is contained in:
@@ -1576,8 +1576,8 @@ class mailout_recipients_ui extends e_admin_ui
|
|||||||
protected $fields = array(
|
protected $fields = array(
|
||||||
'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'),
|
'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'),
|
||||||
'mail_target_id' => array('title' => LAN_MAILOUT_143, 'thclass' => 'left', 'forced' => TRUE),
|
'mail_target_id' => array('title' => LAN_MAILOUT_143, 'thclass' => 'left', 'forced' => TRUE),
|
||||||
'mail_recipient_id' => array('title' => LAN_MAILOUT_142, 'type'=>'number', 'data'=>'int', 'thclass' => 'left'),
|
'mail_recipient_id' => array('title' => LAN_MAILOUT_142, 'type'=>'number', 'data'=>'int', 'thclass' => 'left', 'readonly'=>2),
|
||||||
'mail_recipient_name' => array('title' => LAN_MAILOUT_141, 'forced' => TRUE),
|
'mail_recipient_name' => array('title' => LAN_MAILOUT_141, 'type'=>'text', 'readonly'=>2, 'forced' => TRUE),
|
||||||
'mail_recipient_email' => array('title' => LAN_MAILOUT_140, 'thclass' => 'left', 'forced' => TRUE),
|
'mail_recipient_email' => array('title' => LAN_MAILOUT_140, 'thclass' => 'left', 'forced' => TRUE),
|
||||||
'mail_status' => array('title' => LAN_MAILOUT_138, 'type'=>'method', 'filter'=>true, 'data'=>'int', 'thclass' => 'left', 'class'=>'left', 'writeParms'=>''),
|
'mail_status' => array('title' => LAN_MAILOUT_138, 'type'=>'method', 'filter'=>true, 'data'=>'int', 'thclass' => 'left', 'class'=>'left', 'writeParms'=>''),
|
||||||
'mail_detail_id' => array('title' => LAN_MAILOUT_137, 'type'=>'dropdown', 'filter'=>true),
|
'mail_detail_id' => array('title' => LAN_MAILOUT_137, 'type'=>'dropdown', 'filter'=>true),
|
||||||
@@ -1683,7 +1683,7 @@ class mailout_recipients_form_ui extends e_admin_form_ui
|
|||||||
|
|
||||||
if($mode == 'write')
|
if($mode == 'write')
|
||||||
{
|
{
|
||||||
return $curVal;
|
return $this->select('mail_status', $this->mailStatus, $curVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($mode == 'filter')
|
if($mode == 'filter')
|
||||||
@@ -1702,7 +1702,17 @@ class mailout_recipients_form_ui extends e_admin_form_ui
|
|||||||
$preview = e_SELF."?mode=main&action=preview&id=".$eid.'&user='.$user;
|
$preview = e_SELF."?mode=main&action=preview&id=".$eid.'&user='.$user;
|
||||||
$text = "<a rel='external' class='btn e-modal' data-modal-caption='Email preview' href='".$preview."' class='btn' title='Preview'>".E_32_SEARCH."</a>";
|
$text = "<a rel='external' class='btn e-modal' data-modal-caption='Email preview' href='".$preview."' class='btn' title='Preview'>".E_32_SEARCH."</a>";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(E107_DEBUG_LEVEL > 0)
|
||||||
|
{
|
||||||
|
$att['readParms']['editClass'] = e_UC_MAINADMIN;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$att['readParms']['editClass'] = e_UC_NOBODY;
|
$att['readParms']['editClass'] = e_UC_NOBODY;
|
||||||
|
}
|
||||||
|
|
||||||
$text .= $this->renderValue('options',$value,$att,$id);
|
$text .= $this->renderValue('options',$value,$att,$id);
|
||||||
return $text;
|
return $text;
|
||||||
|
|
||||||
|
@@ -212,6 +212,7 @@ class e107
|
|||||||
'userlogin' => '{e_HANDLER}login.php',
|
'userlogin' => '{e_HANDLER}login.php',
|
||||||
'validatorClass' => '{e_HANDLER}validator_class.php',
|
'validatorClass' => '{e_HANDLER}validator_class.php',
|
||||||
'xmlClass' => '{e_HANDLER}xml_class.php',
|
'xmlClass' => '{e_HANDLER}xml_class.php',
|
||||||
|
'e107MailManager' => '{e_HANDLER}mail_manager_class.php'
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -601,7 +601,7 @@ class e107MailManager
|
|||||||
AND mt.`mail_status` <= ".MAIL_STATUS_MAX_ACTIVE."
|
AND mt.`mail_status` <= ".MAIL_STATUS_MAX_ACTIVE."
|
||||||
AND mt.`mail_send_date` <= ".time()."
|
AND mt.`mail_send_date` <= ".time()."
|
||||||
AND (ms.`mail_last_date` >= ".time()." OR ms.`mail_last_date`=0)
|
AND (ms.`mail_last_date` >= ".time()." OR ms.`mail_last_date`=0)
|
||||||
ORDER BY ms.`mail_e107_priority` DESC {$count}";
|
ORDER BY ms.`mail_e107_priority` DESC, mt.mail_target_id ASC {$count}";
|
||||||
// echo $query.'<br />';
|
// echo $query.'<br />';
|
||||||
$result = $this->db->gen($query);
|
$result = $this->db->gen($query);
|
||||||
|
|
||||||
@@ -704,7 +704,7 @@ class e107MailManager
|
|||||||
|
|
||||||
if (!$this->currentMailBody)
|
if (!$this->currentMailBody)
|
||||||
{
|
{
|
||||||
if (isset($email['mail_body_templated']))
|
if (!empty($email['mail_body_templated']))
|
||||||
{
|
{
|
||||||
$this->currentMailBody = $email['mail_body_templated'];
|
$this->currentMailBody = $email['mail_body_templated'];
|
||||||
}
|
}
|
||||||
@@ -712,6 +712,7 @@ class e107MailManager
|
|||||||
{
|
{
|
||||||
$this->currentMailBody = $email['mail_body'];
|
$this->currentMailBody = $email['mail_body'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->currentTextBody = $email['mail_body_alt']; // May be null
|
$this->currentTextBody = $email['mail_body_alt']; // May be null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user