tbrehm
2012-01-12 7c0b69043114b63b4b422b8a0ce47b6f78eca393
Reverted some changes in mysqllibrary.
1 files modified
22 ■■■■ changed files
server/lib/classes/db_mysql.inc.php 22 ●●●● patch | view | raw | blame | history
server/lib/classes/db_mysql.inc.php
@@ -253,24 +253,10 @@
      return array('diff_num' => $diff_num, 'diff_rec' => $diffrec_full);
    }
        if($diff_num > 0) {
            //print_r($diff_num);
            //print_r($diffrec_full);
            $diffstr = $app->db->quote(serialize($diffrec_full));
            if(isset($_SESSION)) {
                $username = $app->db->quote($_SESSION['s']['user']['username']);
            } else {
                $username = 'admin';
            }
            $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')";
            $app->db->query($sql);
        }
    //** Function to fill the datalog with a full differential record.
    public function datalogSave($db_table, $action, $primary_field, $primary_id, $record_old, $record_new) {
      global $app,$conf;
      // Insert backticks only for incomplete table names.
      if(stristr($db_table,'.')) {