Mail Queue format is different than all the others - Monitor
The Mail Queue format is different than other formats that are given. I have attempted to correct this in the code below.
File: /usr/local/ispconfig/interface/web/monitor/lib/module.conf.php
Original:
$items[] = array( 'title' => "Show Mail-Queue", 'target' => 'content', 'link' => 'monitor/show_data.php?type=mailq', 'html_id' => 'mailq');
Corrected:
$items[] = array( 'title' => "Show Mail-Queue", 'target' => 'content', 'link' => 'monitor/show_log.php?log=mailq', 'html_id' => 'mailq');
Remove mailq from this file:
/usr/local/ispconfig/interface/web/monitor/show_data.php
case 'mailq': $template = 'templates/show_data.htm'; $output .= $app->tools_monitor->showMailq(); $time = $app->tools_monitor->getDataTime('mailq'); $title = $app->lng("monitor_title_mailq_txt"). ' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')'; $description = ''; break;
Add mailq:
/usr/local/ispconfig/interface/web/monitor/show_log.php
case 'mailq': $logId = 'mailq'; $title = $app->lng("monitor_title_mailq_txt"). ' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')'; $description = ''; break;
Adjust the display statement to account for the slight difference in the mailq monitor module.
if(isset($record['data'])) {
if ( $logId == "mailq") {
data = unserialize(
record['data']);
$logData = nl2br($data['output']);
$app->tpl->setVar("log_data", $logData);
} else {
$data = unserialize($record['data']);
$logData = nl2br(htmlspecialchars($data));
$app->tpl->setVar("log_data", $logData);
};
} else { $app->tpl->setVar("log_data", $app->lng("no_logdata_txt")); };