From cb2063107afbf39ee44390dba28b5aec46416b95 Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Sat, 21 Oct 2006 09:34:39 -0400 Subject: [PATCH] changed app.inc.php --- interface/lib/classes/tform.inc.php | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/interface/lib/classes/tform.inc.php b/interface/lib/classes/tform.inc.php index dd489c3..0336e11 100644 --- a/interface/lib/classes/tform.inc.php +++ b/interface/lib/classes/tform.inc.php @@ -805,13 +805,21 @@ } } } + + // Insert the server_id, if the record has a server_id + $server_id = ($record_old["server_id"] > 0)?$record_old["server_id"]:0; if(count($diffrec) > 0) { - $diffstr = $app->db->quote(serialize($diffrec)); + + // We need the full records in ISPConfig, not only the diffs + $diffrec = array( 'old' => $record_old, + 'new' => $record_new); + + $diffstr = $app->db->quote(serialize($diffrec)); $username = $app->db->quote($_SESSION["s"]["user"]["username"]); $dbidx = $this->formDef['db_table_idx'].":".$primary_id; $action = ($action == 'INSERT')?'i':'u'; - $sql = "INSERT INTO sys_datalog (dbtable,dbidx,action,tstamp,user,data) VALUES ('".$this->formDef['db_table']."','$dbidx','$action','".time()."','$username','$diffstr')"; + $sql = "INSERT INTO sys_datalog (dbtable,dbidx,server_id,action,tstamp,user,data) VALUES ('".$this->formDef['db_table']."','$dbidx','$server_id','$action','".time()."','$username','$diffstr')"; $app->db->query($sql); } -- Gitblit v1.9.1