From c719dc0b1dd696e0cd6b51f09ee13c8263375f7c Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Wed, 07 Sep 2011 05:57:38 -0400
Subject: [PATCH] Fixed a warning in maildrop plugin.

---
 interface/web/monitor/show_log.php |   45 +++++++++++++++++++++++++++++++++------------
 1 files changed, 33 insertions(+), 12 deletions(-)

diff --git a/interface/web/monitor/show_log.php b/interface/web/monitor/show_log.php
index b657307..c033c9c 100644
--- a/interface/web/monitor/show_log.php
+++ b/interface/web/monitor/show_log.php
@@ -30,6 +30,7 @@
 
 require_once('../../lib/config.inc.php');
 require_once('../../lib/app.inc.php');
+require_once('tools.inc.php');
 
 //* Check permissions for module
 $app->auth->check_module_permissions('monitor');
@@ -43,6 +44,10 @@
 $refresh = (isset($_GET["refresh"]))?intval($_GET["refresh"]):0;
 $logParam = $_GET["log"];
 
+/* Get some translations */
+$monTransDate = $app->lng("monitor_settings_datafromdate_txt");
+$monTransSrv = $app->lng("monitor_settings_server_txt");
+$monTransRefreshsq = $app->lng("monitor_settings_refreshsq_txt");
 
 /*
  Setting the db-type and the caption
@@ -50,45 +55,58 @@
 switch($logParam) {
 	case 'log_mail':
 		$logId = 'log_mail';
-		$title = 'Mail - Log (Server: ' . $_SESSION['monitor']['server_name'] . ')';
+		$title = $app->lng("monitor_logs_mail_txt").' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')';
+		$description = '';
 		break;
 	case 'log_mail_warn':
 		$logId = 'log_mail_warn';
-		$title = 'Mail-Warn - Log (Server: ' . $_SESSION['monitor']['server_name'] . ')';
+		$title = $app->lng("monitor_logs_mailwarn_txt").' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')';
+		$description = '';
 		break;
 	case 'log_mail_err':
 		$logId = 'log_mail_err';
-		$title = 'Mail-Error - Log (Server: ' . $_SESSION['monitor']['server_name'] . ')';
+		$title = $app->lng("monitor_logs_mailerr_txt").' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')';
+		$description = '';
 		break;
 	case 'log_messages':
 		$logId = 'log_messages';
-		$title = 'Messages (Server: ' . $_SESSION['monitor']['server_name'] . ')';
+		$title = $app->lng("monitor_logs_messages_txt").' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')';
+		$description = '';
+		break;
+	case 'log_ispc_cron':
+		$logId = 'log_ispc_cron';
+		$title = $app->lng("monitor_logs_ispccron_txt").' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')';
+		$description = '';
 		break;
 	case 'log_freshclam':
 		$logId = 'log_freshclam';
-		$title = 'Freshclam - Log (Server: ' . $_SESSION['monitor']['server_name'] . ')';
+		$title = $app->lng("monitor_logs_freshclam_txt").' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')';
+		$description = '';
 		break;
 	case 'log_clamav':
 		$logId = 'log_clamav';
-		$title = 'Clamav - Log (Server: ' . $_SESSION['monitor']['server_name'] . ')';
+		$title = $app->lng("monitor_logs_clamav_txt").' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')';
+		$description = '';
 		break;
 	case 'log_ispconfig':
 		$logId = 'log_ispconfig';
-		$title = 'ISP Config - Log (Server: ' . $_SESSION['monitor']['server_name'] . ')';
+		$title = $app->lng("monitor_logs_ispc_txt").' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')';
+		$description = '';
 		break;
 	default:
 		$logId = '???';
 		$title = '???';
+		$description = '';
 		break;
 }
 
 
 /*
  Creating the array with the refresh intervals
- Attention: the core-moule ist triggered every 5 minutes, 
+ Attention: the core-moule ist triggered every 5 minutes,
             so reload every 2 minutes is impossible!
 */
-$refresh_values = array('0' => '- '.$app->lng("No Refresh").' -','5' => '5 '.$app->lng("minutes"),'10' => '10 '.$app->lng("minutes"),'15' => '15 '.$app->lng("minutes"),'30' => '30 '.$app->lng("minutes"),'60 ' => '60'.$app->lng("minutes"));
+$refresh_values = array('0' => '- '.$app->lng("No Refresh").' -','5' => '5 '.$app->lng("minutes"),'10' => '10 '.$app->lng("minutes"),'15' => '15 '.$app->lng("minutes"),'30' => '30 '.$app->lng("minutes"),'60' => '60 '.$app->lng("minutes"));
 $tmp = '';
 foreach($refresh_values as $key => $val) {
 	if($key == $refresh) {
@@ -113,10 +131,13 @@
 	$app->tpl->setVar("log_data", $app->lng("no_logdata_txt"));
 }
 
-$app->tpl->setVar("title", $title);
+$app->tpl->setVar("list_head_txt", $title);
 $app->tpl->setVar("log_id",$logId);
-
+$app->tpl->setVar("list_desc_txt", $description);
+$app->tpl->setVar("time", getDataTime($logId));
+$app->tpl->setVar("monTransDate", $monTransDate);
+$app->tpl->setVar("monTransRefreshsq", $monTransRefreshsq);
 
 $app->tpl_defaults();
 $app->tpl->pparse();
-?>
\ No newline at end of file
+?>

--
Gitblit v1.9.1