Mail Error shows blank
While the mail error file is correctly black, it would be nice to include a statement for the user to see that no errors have been found.
I have a corrected the file to allow this to happen.
File: /usr/local/ispconfig/server/lib/classes/monitor_tools.inc.php
Original:
public function monitorMailErrLog() { global $conf;
/* the id of the server as int */
$server_id = intval($conf['server_id']);
/** The type of the data */
$type = 'log_mail_err';
/* Get the data of the log */
$data = 'No mail errors found.';
/*
* actually this info has no state.
* maybe someone knows better...???...
*/
$state = 'no_state';
/*
* Return the Result
*/
$res['server_id'] = $server_id;
$res['type'] = $type;
$res['data'] = $data;
$res['state'] = $state;
return $res;
}
Corrected:
public function monitorMailErrLog() { global $conf;
/* the id of the server as int */
$server_id = intval($conf['server_id']);
/** The type of the data */
$type = 'log_mail_err';
/* Get the data of the log */
if ( $this->_getLogData($type) == ''){
$data = 'No mail errors found.';
} else {
$data = $this->_getLogData($type);
};
/*
* actually this info has no state.
* maybe someone knows better...???...
*/
$state = 'no_state';
/*
* Return the Result
*/
$res['server_id'] = $server_id;
$res['type'] = $type;
$res['data'] = $data;
$res['state'] = $state;
return $res;
}
I know this seems like a trivial fix, but I do think that it is an improvement over the current blank or empty file.
Thanks.