fantu
2008-11-19 4cbe1be2b97f63892e5ed887c2c7083ab481494d
interface/lib/classes/db_mysql.inc.php
@@ -160,10 +160,14 @@
        return $this->quote($formfield);
    }
      
   /** Escapes quotes in variable. addslashes() */
   /** Escapes quotes in variable. mysql_real_escape_string() */
    public function quote($formfield)
    {
        return addslashes($formfield);
    {
      if(!$this->connect()){
         $this->updateError('WARNING: mysql_connect: Used addslashes instead of mysql_real_escape_string');
         return addslashes($formfield);
      }
        return mysql_real_escape_string($formfield, $this->linkId);
    }
      
   /** Unquotes a variable, strip_slashes() */
@@ -246,10 +250,10 @@
         }
      } elseif(is_array($record_new)) {
         foreach($record_new as $key => $val) {
            if(isset($record_new[$key]) && $record_old[$key] != $val) {
            if(isset($record_new[$key]) && @$record_old[$key] != $val) {
               // Record has changed
               $diffrec_full['new'][$key] = $val;
               $diffrec_full['old'][$key] = $record_old[$key];
               $diffrec_full['old'][$key] = @$record_old[$key];
               $diff_num++;
            } else {
               $diffrec_full['new'][$key] = $val;
@@ -278,7 +282,7 @@
      return true;
   }
   
   //** Updates a record and saves the changes into the datalog
   //** Inserts a record and saves the changes into the datalog
   public function datalogInsert($tablename, $insert_data, $index_field) {
      global $app;