Ignore:
Timestamp:
07/20/11 11:50:40 (13 years ago)
Author:
airton
Message:

Ticket #2150 - Melhorias nas buscas no catalogo global

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/contactcenter/inc/class.bo_global_ldap_catalog.inc.php

    r4544 r4838  
    534534                                                } 
    535535                                                break; 
     536                                                 
     537                                                case 'LIKE and ~=':  
     538                                                        if (array_key_exists($rule['field'], $trans_table))  
     539                                                        {  
     540                                                                $value = str_replace('%', '*', $rule['value']);  
     541         
     542                                                                foreach($trans_table[$rule['field']] as $field)  
     543                                                                {  
     544                                                                        $t[] = '('.$field.'=*'.$value.'*)'.'('.$field.'~='.$value.')';  
     545                                                                }  
     546                                                                $return_t[] = '(|'.implode(' ',$t).')';  
     547                                                        }  
     548                                                break;  
    536549                                } 
    537550                        } 
     
    594607                                        case 'NOT LIKE': 
    595608                                        case 'NOT iLIKE': 
     609                                        case 'LIKE and ~=': 
    596610                                                array_push($fields, $restrict_data); 
    597611                                                break; 
Note: See TracChangeset for help on using the changeset viewer.