You're right, I was looking at the wrong file. Local vs. on the server. And there is one additional change...
Code:
$app->db->query($sql);
to
Code:
$this->query($sql);
So that part of datalogSave() contains
Code:
if($diff_num > 0) {
//print_r($diff_num);
//print_r($diffrec_full);
$diffstr = $this->quote(serialize($diffrec_full));
$username = $this->quote($_SESSION["s"]["user"]["username"]);
$dbidx = $primary_field.":".$primary_id;
if($action == 'INSERT') $action = 'i';
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')";
$this->query($sql);
}
With only the three
$app->db->
locations changed to
$this->
it appears to work now as far as putting the values in the database.
The mail filters do not show as active in ISPConfig 3 interface though, the 'active' column in the table is all 'y'.