Changeset 504 in subversion


Ignore:
Timestamp:
Mar 13, 2007 6:53:26 PM (6 years ago)
Author:
thomasb
Message:

Fixed bugs in rcube_db and rcube_imap classes

Location:
trunk/roundcubemail/program/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/rcube_db.inc

    r328 r504  
    294294      case 'pgsql': 
    295295        $result = &$this->db_handle->getOne("SELECT CURRVAL('$sequence')"); 
    296          
    297       case 'mssql': 
    298         $result = &$this->db_handle->getOne("SELECT @@IDENTITY"); 
    299  
    300296        if (DB::isError($result)) 
    301297          raise_error(array('code' => 500, 'type' => 'db', 'line' => __LINE__, 'file' => __FILE__,  
    302298                            'message' => $result->getMessage()), TRUE, FALSE); 
    303  
     299        return $result; 
     300 
     301      case 'mssql': 
     302        $result = &$this->db_handle->getOne("SELECT @@IDENTITY"); 
     303        if (DB::isError($result)) 
     304          raise_error(array('code' => 500, 'type' => 'db', 'line' => __LINE__, 'file' => __FILE__,  
     305                            'message' => $result->getMessage()), TRUE, FALSE); 
    304306        return $result; 
    305307                 
     
    309311      case 'mysqli': 
    310312        return mysqli_insert_id($this->db_handle->connection); 
    311          
     313 
    312314      case 'sqlite': 
    313315        return sqlite_last_insert_rowid($this->db_handle->connection); 
     
    359361  function _fetch_row($result, $mode) 
    360362    { 
    361     if (DB::isError($result)) 
     363    if (!$result || DB::isError($result)) 
    362364      { 
    363365      raise_error(array('code' => 500, 'type' => 'db', 'line' => __LINE__, 'file' => __FILE__, 
  • trunk/roundcubemail/program/include/rcube_imap.inc

    r503 r504  
    879879      $results = array(); 
    880880      foreach ($criteria as $crit) 
    881         $results = array_merge($results, $this->search($mbox_name, $crit, $str, $charset)); 
     881        if ($search_result = $this->search($mbox_name, $crit, $str, $charset)) 
     882          $results = array_merge($results, $search_result); 
    882883       
    883884      $results = array_unique($results); 
Note: See TracChangeset for help on using the changeset viewer.