Changeset 4838


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

Ticket #2150 - Melhorias nas buscas no catalogo global

Location:
trunk/contactcenter
Files:
4 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; 
  • trunk/contactcenter/inc/class.bo_ldap_manager.inc.php

    r4806 r4838  
    5757                                                'branch' => $ou, //strtolower('ou'), 
    5858                                                'montaDN'=> $subLevels, //$data['cc_ldap_subLevels'], 
    59                                                 'visible'=> $data['cc_ldap_query_automatic'], 
     59                                                'visible' => $data['cc_ldap_query_automatic'],  
     60                            'max_results' => $data['cc_ldap_max_results'], 
    6061                                                'recursive' =>  $data['cc_ldap_recursive'] 
    6162                                        ) 
  • trunk/contactcenter/inc/class.ui_data.inc.php

    r4806 r4838  
    32243224                                                array_push($rules, array( 
    32253225                                                        'field' => $data['fields']['search'], 
    3226                                                         'type'  => 'iLIKE', 
    3227                                                         'value' => '%'.$name.'%' 
     3226                                                        //'type'  => 'iLIKE', 
     3227                                                        //'value' => '%'.$name.'%' 
     3228                                                        'type'  => 'LIKE and ~=',  
     3229                                'value' => $name  
    32283230                                                )); 
    32293231                                        } 
  • trunk/contactcenter/templates/default/config.tpl

    r4808 r4838  
    9090                </td> 
    9191        </tr> 
     92        <tr class="row_on">  
     93            <td>{lang_LDAP_max_results}:</td>  
     94            <td><input name="newsettings[cc_ldap_max_results]" value="{value_cc_ldap_max_results}" size="40" /></td>  
     95        </tr>  
     96         
    9297        <tr class="th"> 
    9398        <td colspan="2">&nbsp;<b>{lang_cc_Set_details_attributes}</b></td> 
Note: See TracChangeset for help on using the changeset viewer.