Ignore:
Timestamp:
Jun 3, 2011 8:09:10 AM (2 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
b896b18
Parents:
e9a9f2f6
Message:
  • Performance improvement, fix case-sensitivness in advanced search
File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/include/rcube_contacts.php

    re9a9f2f6 ra5be870  
    285285                    } 
    286286                    if (is_array($value)) 
    287                         $post_search[$col] = $strict ? $val : mb_strtolower($val); 
     287                        $post_search[$col] = mb_strtolower($val); 
    288288                } 
    289289            } 
     
    332332                                $value = implode($value); 
    333333                            } 
    334                             if (($strict && $value == $search) 
    335                                 || (!$strict && strpos(mb_strtolower($value), $search) !== false) 
    336                             ) { 
     334                            $value = mb_strtolower($value); 
     335                            if (($strict && $value == $search) || (!$strict && strpos($value, $search) !== false)) { 
    337336                                $found++; 
    338337                                break; 
     
    350349            $ids = $this->db->array2list($ids, 'integer'); 
    351350            $where = 'c.' . $this->primary_key.' IN ('.$ids.')'; 
     351            // reset counter 
    352352            unset($this->cache['count']); 
     353 
     354            // when we know we have an empty result 
     355            if ($ids == '0') { 
     356                $this->set_search_set($where); 
     357                return ($this->result = new rcube_result_set(0, 0)); 
     358            } 
    353359        } 
    354360 
Note: See TracChangeset for help on using the changeset viewer.