Skip to content

Commit 84cad3f

Browse files
committed
Fixed a issue with datalogSave in mysql library.
1 parent c771034 commit 84cad3f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/lib/classes/db_mysql.inc.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ public function datalogSave($db_table, $action, $primary_field, $primary_id, $re
275275

276276

277277
if($diff_num > 0) {
278-
$diffstr = $app->db->quote(serialize($diffrec_full));
278+
$diffstr = $this->quote(serialize($diffrec_full));
279279
if(isset($_SESSION)) {
280-
$username = $app->db->quote($_SESSION['s']['user']['username']);
280+
$username = $this->quote($_SESSION['s']['user']['username']);
281281
} else {
282282
$username = 'admin';
283283
}
@@ -287,7 +287,7 @@ public function datalogSave($db_table, $action, $primary_field, $primary_id, $re
287287
if($action == 'UPDATE') $action = 'u';
288288
if($action == 'DELETE') $action = 'd';
289289
$sql = "INSERT INTO sys_datalog (dbtable,dbidx,server_id,action,tstamp,user,data) VALUES ('".$db_table."','$dbidx','$server_id','$action','".time()."','$username','$diffstr')";
290-
$app->db->query($sql);
290+
$this->query($sql);
291291
}
292292

293293
return true;

0 commit comments

Comments
 (0)