Skip to content

Commit 7c0b690

Browse files
committed
Reverted some changes in mysqllibrary.
1 parent 8cf78b3 commit 7c0b690

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

server/lib/classes/db_mysql.inc.php

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -253,24 +253,10 @@ public function diffrec($record_old, $record_new) {
253253
return array('diff_num' => $diff_num, 'diff_rec' => $diffrec_full);
254254

255255
}
256-
257-
if($diff_num > 0) {
258-
//print_r($diff_num);
259-
//print_r($diffrec_full);
260-
$diffstr = $app->db->quote(serialize($diffrec_full));
261-
if(isset($_SESSION)) {
262-
$username = $app->db->quote($_SESSION['s']['user']['username']);
263-
} else {
264-
$username = 'admin';
265-
}
266-
$dbidx = $primary_field.':'.$primary_id;
267-
268-
if($action == 'INSERT') $action = 'i';
269-
if($action == 'UPDATE') $action = 'u';
270-
if($action == 'DELETE') $action = 'd';
271-
$sql = "INSERT INTO sys_datalog (dbtable,dbidx,server_id,action,tstamp,user,data) VALUES ('".$db_table."','$dbidx','$server_id','$action','".time()."','$username','$diffstr')";
272-
$app->db->query($sql);
273-
}
256+
257+
//** Function to fill the datalog with a full differential record.
258+
public function datalogSave($db_table, $action, $primary_field, $primary_id, $record_old, $record_new) {
259+
global $app,$conf;
274260

275261
// Insert backticks only for incomplete table names.
276262
if(stristr($db_table,'.')) {

0 commit comments

Comments
 (0)