From: hickert Date: Fri, 12 Sep 2008 09:19:42 +0000 (+0000) Subject: Mailqueue addon X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=af8b1b14a08892e0162b003cc1a54694dd9b6394;p=gosa.git Mailqueue addon -Implemented mail header git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12442 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/mail/addons/mailqueue/class_mailqueue.inc b/gosa-plugins/mail/addons/mailqueue/class_mailqueue.inc index 8030879ad..6dd6bfe99 100644 --- a/gosa-plugins/mail/addons/mailqueue/class_mailqueue.inc +++ b/gosa-plugins/mail/addons/mailqueue/class_mailqueue.inc @@ -100,6 +100,7 @@ class mailqueue extends plugin /* Create table which displays the header informations */ $data = $this->si_queue->header($entry,$server); + $data = preg_replace("/([^\s]*:)/","\n\\1",$data); $this->disp_header = $data; if($this->si_queue->is_error()){ msg_dialog::display(_("Error"),msgPool::siError($this->si_queue->get_error()),ERROR_DIALOG); diff --git a/gosa-plugins/mail/addons/mailqueue/class_si_mailqueue.inc b/gosa-plugins/mail/addons/mailqueue/class_si_mailqueue.inc index 3ef982717..f73e2ca00 100644 --- a/gosa-plugins/mail/addons/mailqueue/class_si_mailqueue.inc +++ b/gosa-plugins/mail/addons/mailqueue/class_si_mailqueue.inc @@ -131,22 +131,10 @@ class si_mailqueue extends gosaSupportDaemon $data = array(); $data['msg_id'] = $msg_id; $res = $this->send_data("gosa_mailqueue_header",$server,$data,TRUE); - - $attrs = array( - "RECIPIENT", - "SENDER", - "SUBJECT"); - - $data = array(); - if(isset($res['XML'])){ - foreach($attrs as $attr){ - $data[$attr] = ""; - if(isset($res['XML'][0][$attr])){ - $data[$attr] = $res['XML'][0][$attr][0]['VALUE']; - } - } + if(isset($res['XML'][0]['MSG_HEADER'][0]['VALUE'])){ + return($res['XML'][0]['MSG_HEADER'][0]['VALUE']); } - return($data); + return(""); } diff --git a/gosa-plugins/mail/addons/mailqueue/header.tpl b/gosa-plugins/mail/addons/mailqueue/header.tpl index fe88ee2d3..f5aaab53a 100644 --- a/gosa-plugins/mail/addons/mailqueue/header.tpl +++ b/gosa-plugins/mail/addons/mailqueue/header.tpl @@ -1,17 +1,5 @@ - - - - - - - - - - - - - -
{t}Sender{/t} :{$header.SENDER}
{t}Recipient{/t} :{$header.RECIPIENT}
{t}Subject{/t} :{$header.SUBJECT}
+
{$header}
+