Changeset f22b543 in github


Ignore:
Timestamp:
Jun 4, 2010 3:05:06 AM (3 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
2144f9c
Parents:
f6b2824
Message:
  • Fix: don't call FETCH when THREADS returns empty result
File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/include/rcube_imap.php

    rd311d80 rf22b543  
    823823 
    824824        // search set is threaded, we need a new one 
    825         if ($this->search_threads) 
     825        if ($this->search_threads) { 
     826            if (empty($this->search_set['tree'])) 
     827                return array(); 
    826828            $this->search('', $this->search_string, $this->search_charset, $sort_field); 
     829        } 
    827830 
    828831        $msgs = $this->search_set; 
     
    946949    { 
    947950        // update search_set if previous data was fetched with disabled threading 
    948         if (!$this->search_threads) 
     951        if (!$this->search_threads) { 
     952            if (empty($this->search_set)) 
     953                return array(); 
    949954            $this->search('', $this->search_string, $this->search_charset, $sort_field); 
     955        } 
     956 
     957        // empty result 
     958        if (empty($this->search_set['tree'])) 
     959            return array(); 
    950960 
    951961        $thread_tree = $this->search_set['tree']; 
Note: See TracChangeset for help on using the changeset viewer.