Ticket #337: maia_db.php.patch

File maia_db.php.patch, 1.0 kB (added by anonymous, 6 years ago)

this is the patch for the problem

  • php/maia_db.php

     
    17191719        $delete .= '?' . str_repeat(',?', count($mail_ids) - 1);         
    17201720        $delete .= ")"; 
    17211721 
    1722         $dbh->query($delete, array_merge($user_id, $mail_ids)); 
     1722        $tmp = array($user_id); 
     1723        $dbh->query($delete, array_merge($tmp, $mail_ids)); 
     1724        #$dbh->query($delete, array_merge($user_id, $mail_ids)); 
    17231725 
    17241726        // If there are no other recipients referenced by each mail item, 
    17251727        // delete it. 
     
    18461848        $update .= '?' . str_repeat(',?', count($mail_id) - 1); 
    18471849         
    18481850        $update .= ")"; 
    1849         $dbh->query($update, array_merge($message_type, $user_id, $mail_id));        
     1851        $tmp = array($message_type, $user_id); 
     1852        if (@is_array($mail_id)) 
     1853                $tmp = array_merge($tmp, $mail_id); 
     1854        $dbh->query($update, $tmp); 
     1855        #$dbh->query($update, array_merge($message_type, $user_id, $mail_id));        
    18501856    } 
    18511857 
    18521858     /*