@@ -686,7 +686,7 @@ public function getDatabaseSize($database_name) {
686686 }
687687
688688 //** Function to fill the datalog with a full differential record.
689- public function datalogSave ($ db_table , $ action , $ primary_field , $ primary_id , $ record_old , $ record_new , $ force_update = false ) {
689+ public function datalogSave ($ db_table , $ action , $ primary_field , $ primary_id , $ record_old , $ record_new , $ force_update = false , $ options = [] ) {
690690 global $ app ;
691691
692692 // Insert backticks only for incomplete table names.
@@ -712,6 +712,7 @@ public function datalogSave($db_table, $action, $primary_field, $primary_id, $re
712712 $ server_id = (isset ($ record_old ['server_id ' ]) && $ record_old ['server_id ' ] > 0 )?$ record_old ['server_id ' ]:0 ;
713713 if (isset ($ record_new ['server_id ' ])) $ server_id = $ record_new ['server_id ' ];
714714
715+ $ diffrec_full ['options ' ] = $ options ;
715716
716717 if ($ diff_num > 0 ) {
717718 $ diffstr = serialize ($ diffrec_full );
@@ -810,7 +811,7 @@ public function datalogUpdate($tablename, $update_data, $index_field, $index_val
810811 }
811812
812813 //** Deletes a record and saves the changes into the datalog
813- public function datalogDelete ($ tablename , $ index_field , $ index_value ) {
814+ public function datalogDelete ($ tablename , $ index_field , $ index_value, $ options = [] ) {
814815 global $ app ;
815816
816817 // Check fields
@@ -820,7 +821,7 @@ public function datalogDelete($tablename, $index_field, $index_value) {
820821 $ old_rec = $ this ->queryOneRecord ("SELECT * FROM ?? WHERE ?? = ? " , $ tablename , $ index_field , $ index_value );
821822 $ this ->query ("DELETE FROM ?? WHERE ?? = ? " , $ tablename , $ index_field , $ index_value );
822823 $ new_rec = array ();
823- $ this ->datalogSave ($ tablename , 'DELETE ' , $ index_field , $ index_value , $ old_rec , $ new_rec );
824+ $ this ->datalogSave ($ tablename , 'DELETE ' , $ index_field , $ index_value , $ old_rec , $ new_rec, FALSE , $ options );
824825
825826 return true ;
826827 }
0 commit comments