mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 07:30:12 +01:00
fixed a bug in bulk restore
This commit is contained in:
parent
1744ff986d
commit
653b5e8c18
@ -36,17 +36,6 @@ class ControllerMessageBulkrestore extends Controller {
|
|||||||
|
|
||||||
$this->data['username'] = Registry::get('username');
|
$this->data['username'] = Registry::get('username');
|
||||||
|
|
||||||
$rcpt = array();
|
|
||||||
|
|
||||||
|
|
||||||
/* send the email to all the recipients of the original email if we are admin or auditor users */
|
|
||||||
|
|
||||||
if(Registry::get('admin_user') == 1 || Registry::get('auditor_user') == 1) {
|
|
||||||
$rcpt = $this->model_search_search->get_message_recipients($this->data['id']);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
array_push($rcpt, $_SESSION['email']);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$this->data['restored'] = 0;
|
$this->data['restored'] = 0;
|
||||||
@ -55,6 +44,17 @@ class ControllerMessageBulkrestore extends Controller {
|
|||||||
|
|
||||||
AUDIT(ACTION_RESTORE_MESSAGE, '', '', $id, '');
|
AUDIT(ACTION_RESTORE_MESSAGE, '', '', $id, '');
|
||||||
|
|
||||||
|
$rcpt = array();
|
||||||
|
|
||||||
|
/* send the email to all the recipients of the original email if we are admin or auditor users */
|
||||||
|
|
||||||
|
if(Registry::get('auditor_user') == 1) {
|
||||||
|
$rcpt = $this->model_search_search->get_message_recipients($id);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
array_push($rcpt, $_SESSION['email']);
|
||||||
|
}
|
||||||
|
|
||||||
$x = $this->model_mail_mail->send_smtp_email(SMARTHOST, SMARTHOST_PORT, SMTP_DOMAIN, SMTP_FROMADDR, $rcpt,
|
$x = $this->model_mail_mail->send_smtp_email(SMARTHOST, SMARTHOST_PORT, SMTP_DOMAIN, SMTP_FROMADDR, $rcpt,
|
||||||
"Received: by piler" . EOL . PILER_HEADER_FIELD . $id . EOL . $this->model_search_message->get_raw_message($id) );
|
"Received: by piler" . EOL . PILER_HEADER_FIELD . $id . EOL . $this->model_search_message->get_raw_message($id) );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user