From b889edb33e4a09cc1f65d2fb9ad9f9ea16b1eae9 Mon Sep 17 00:00:00 2001 From: ftimme <ft@falkotimme.com> Date: Tue, 04 Sep 2012 11:42:42 -0400 Subject: [PATCH] - Ported changes from Apache plugin to nginx plugin. - Fixed errors in system.inc.php- --- server/lib/classes/db_mysql.inc.php | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/server/lib/classes/db_mysql.inc.php b/server/lib/classes/db_mysql.inc.php index 18f09bf..d2b4dd6 100644 --- a/server/lib/classes/db_mysql.inc.php +++ b/server/lib/classes/db_mysql.inc.php @@ -1,4 +1,3 @@ - <?php /* Copyright (c) 2005, Till Brehm, projektfarm Gmbh @@ -226,10 +225,10 @@ if(is_array($record_old) && count($record_old) > 0) { foreach($record_old as $key => $val) { // if(!isset($record_new[$key]) || $record_new[$key] != $val) { - if($record_new[$key] != $val) { + if(@$record_new[$key] != $val) { // Record has changed $diffrec_full['old'][$key] = $val; - $diffrec_full['new'][$key] = $record_new[$key]; + $diffrec_full['new'][$key] = @$record_new[$key]; $diff_num++; } else { $diffrec_full['old'][$key] = $val; @@ -276,9 +275,9 @@ if($diff_num > 0) { - $diffstr = $app->db->quote(serialize($diffrec_full)); + $diffstr = $this->quote(serialize($diffrec_full)); if(isset($_SESSION)) { - $username = $app->db->quote($_SESSION['s']['user']['username']); + $username = $this->quote($_SESSION['s']['user']['username']); } else { $username = 'admin'; } @@ -288,7 +287,7 @@ if($action == 'UPDATE') $action = 'u'; if($action == 'DELETE') $action = 'd'; $sql = "INSERT INTO sys_datalog (dbtable,dbidx,server_id,action,tstamp,user,data) VALUES ('".$db_table."','$dbidx','$server_id','$action','".time()."','$username','$diffstr')"; - $app->db->query($sql); + $this->query($sql); } return true; @@ -593,4 +592,4 @@ } - ?> + ?> \ No newline at end of file -- Gitblit v1.9.1