diff --git a/gosa-plugins/mail/addons/mailqueue/class_si_mailqueue.inc b/gosa-plugins/mail/addons/mailqueue/class_si_mailqueue.inc
index f73e2ca009eaff54a46cdd321945b47c37f9c36c..3eb055bde5f576fed9d53d28dc24c389fdf9df65 100644 (file)
/*! \brief Returns a list of all mail queue entries
@return Array s.a.
*/
- public function query_mailqueue($server,$sortby,$direction,$search_str,$time)
+ public function query_mailqueue($server,$search_str,$time)
{
- $attrs = array("Size","Recipient","Sender","Arrival","MailID","Hold","Active","Error","Server");
-
- /* Check sorting paramter
- */
- if(!in_array($sortby,$attrs)){
- trigger_error("Invalid sorting option '".$sortby."'.");
- $sortby = "Arrival";
- }
-
- /* Check sorting direction
- */
- if(!in_array($direction,array("down","up"))){
- trigger_error("Invalid sorting direction '".$direction."'.");
- $direction = "down";
- }
+ $attrs = array("Size","Recipient","Sender","Arrival","MailID","Hold","Active","Status","Server");
/* Prepare search filter
*/
- $search_str = preg_replace("/\\\\\*/",".*",normalizePreg($search_str));
+ $search_str = preg_replace("/\\\\\*/",".*",preg_quote($search_str, '/'));
/* Query mailqueue
*/
if(preg_match("/^ANSWER[0-9]*$/",$name)){
$attrs = array(
"MSG_SIZE" => "Size",
+ "MSG_STATUS" => "Status",
"RECIPIENT" => "Recipient",
"SENDER" => "Sender",
"ARRIVAL_TIME" => "Arrival",
$ids[] = $val['MailID'];
$attrs = array(
"MSG_HOLD" => "Hold",
- "MSG_ACTIVE" => "Active",
- "ERROR" => "Error");
+ "MSG_ACTIVE" => "Active");
foreach($attrs as $source => $dest){
if(isset($entry[0][$source][0]['VALUE'])){
$val[$dest] = $entry[0][$source][0]['VALUE'];
break;
}
}
-
- if($found){
- $n = uniqid($val[$sortby]);
- $items[$n] = $val;
+ if($found){
+ $items[] = $val;
}
}
}
}
-
- /* Sort entries by given direction
- */
- if($direction == "down"){
- ksort($items);
- }else{
- krsort($items);
- }
return($items);
}
$data['msg_id'] = $msg_ids;
- print_a(array("gosa_mailqueue_".$action,$server,$data));;
$this->send_data("gosa_mailqueue_".$action,$server,$data,FALSE);
// There is no answer for this requests
}