From 51d0146fc1d2fd65e7cf4fcca0e530a085b4a708 Mon Sep 17 00:00:00 2001
From: Antennipasi <Antennipasi@ispconfig3>
Date: Sun, 04 Jan 2009 11:28:46 -0500
Subject: [PATCH] Added more translations to monitor-module, mostly done now, couple annoyances left. merged changes with all languages.

---
 interface/web/mail/mail_user_edit.php |   19 ++++++++-----------
 1 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php
index 9bc4225..59470f2 100644
--- a/interface/web/mail/mail_user_edit.php
+++ b/interface/web/mail/mail_user_edit.php
@@ -131,7 +131,7 @@
 			$app->tform->errorMessage .= $app->tform->wordbook["error_no_pwd"]."<br>";
 		}
 		
-		// Ccheck the client limits, if user is not the admin
+		// Check the client limits, if user is not the admin
 		if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin
 			// Get the limits of the client
 			$client_group_id = $_SESSION["s"]["user"]["default_group"];
@@ -208,13 +208,12 @@
 			$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = '".mysql_real_escape_string($this->dataRecord["email"])."'");
 			if($tmp_user["id"] > 0) {
 				// There is already a record that we will update
-				$sql = "UPDATE spamfilter_users SET policy_id = $ploicy_id WHERE id = ".$tmp_user["id"];
-				$app->db->query($sql);
+				$app->db->datalogUpdate('spamfilter_users', "policy_id = $ploicy_id", 'id', $tmp_user["id"]);
 			} else {
 				// We create a new record
-				$sql = "INSERT INTO `spamfilter_users` (`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `priority`, `policy_id`, `email`, `fullname`, `local`) 
+				$insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `priority`, `policy_id`, `email`, `fullname`, `local`) 
 				        VALUES (".$_SESSION["s"]["user"]["userid"].", ".$domain["sys_groupid"].", 'riud', 'riud', '', ".$domain["server_id"].", 1, ".$policy_id.", '".mysql_real_escape_string($this->dataRecord["email"])."', '".mysql_real_escape_string($this->dataRecord["email"])."', 'Y')";
-				$app->db->query($sql);
+				$app->db->datalogInsert('spamfilter_users', $insert_data, 'id');
 			}
 		}  // endif spamfilter policy
 		
@@ -234,19 +233,17 @@
 			if($policy_id > 0) {
 				if($tmp_user["id"] > 0) {
 					// There is already a record that we will update
-					$sql = "UPDATE spamfilter_users SET policy_id = $policy_id WHERE id = ".$tmp_user["id"];
-					$app->db->query($sql);
+					$app->db->datalogUpdate('spamfilter_users', "policy_id = $ploicy_id", 'id', $tmp_user["id"]);
 				} else {
 					// We create a new record
-					$sql = "INSERT INTO `spamfilter_users` (`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `priority`, `policy_id`, `email`, `fullname`, `local`) 
+					$insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `priority`, `policy_id`, `email`, `fullname`, `local`) 
 				        	VALUES (".$_SESSION["s"]["user"]["userid"].", ".$domain["sys_groupid"].", 'riud', 'riud', '', ".$domain["server_id"].", 1, ".$policy_id.", '".mysql_real_escape_string($this->dataRecord["email"])."', '".mysql_real_escape_string($this->dataRecord["email"])."', 'Y')";
-					$app->db->query($sql);
+					$app->db->datalogInsert('spamfilter_users', $insert_data, 'id');
 				}
 			}else {
 				if($tmp_user["id"] > 0) {
 					// There is already a record but the user shall have no policy, so we delete it
-					$sql = "DELETE FROM spamfilter_users WHERE id = ".$tmp_user["id"];
-					$app->db->query($sql);
+					$app->db->datalogDelete('spamfilter_users', 'id', $tmp_user["id"]);
 				}
 			} // endif spamfilter policy
 		}

--
Gitblit v1.9.1