From b9a3ef486ebcde18a5ade37865ff8f397185d24f Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Sun, 24 Jul 2016 05:30:59 -0400
Subject: [PATCH] Fixed #3979 Mailbox users unable to save autoresponders

---
 server/lib/classes/modules.inc.php |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/server/lib/classes/modules.inc.php b/server/lib/classes/modules.inc.php
index e5ccaaf..aa95d47 100644
--- a/server/lib/classes/modules.inc.php
+++ b/server/lib/classes/modules.inc.php
@@ -141,7 +141,7 @@
 							$f_params[] = $fieldname;
 							$params[] = $val;
 						}
-						$params = $f_params + $params;
+						$params = array_merge($f_params, $params);
 						unset($f_params);
 						
 						$tmp_sql1 = substr($tmp_sql1, 0, -1);
@@ -152,12 +152,14 @@
 						$app->db->errorNumber = 0;
 						$app->db->errorMessage = '';
 						$app->db->query($sql, true, $params);
-						unset($params);
 						if($app->db->errorNumber > 0) {
 							$replication_error = true;
 							$app->log("Replication failed. Error: (" . $d['dbtable'] . ") in MySQL server: (".$app->db->dbHost.") " . $app->db->errorMessage . " # SQL: " . $sql, LOGLEVEL_ERROR);
 						}
-						$app->log('Replicated from master: '.$sql, LOGLEVEL_DEBUG);
+						$log = $app->db->_build_query_string($sql, true, $params);
+						$app->log('Replicated from master: '.$log, LOGLEVEL_DEBUG);
+						unset($params);
+						unset($log);
 					}
 					
 					if($d['action'] == 'd') {
@@ -169,7 +171,9 @@
 							$replication_error = true;
 							$app->log("Replication failed. Error: (" . $d[dbtable] . ") " . $app->db->errorMessage . " # SQL: " . $sql, LOGLEVEL_ERROR);
 						}
-						$app->log('Replicated from master: '.$sql, LOGLEVEL_DEBUG);
+						$log = $app->db->_build_query_string($sql, $d['dbtable'], $idx[0], $idx[1]);
+						$app->log('Replicated from master: '.$log, LOGLEVEL_DEBUG);
+						unset($log);
 					}
 
 

--
Gitblit v1.9.1