Changeset 5209


Ignore:
Timestamp:
11/28/11 14:47:30 (12 years ago)
Author:
gustavo
Message:

Ticket #2347 - Erro na busca do F9 (Ao utlizar a busca do F9 no catalogo pessoal, não retorna dados. )

Location:
trunk/expressoMail1_2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/class.ldap_functions.inc.php

    r5202 r5209  
    268268        function quicksearchcontact($params) 
    269269        { 
    270             if($params['Type'] != "undefined" && $params['Type'] != null){ 
     270            if(array_key_exists('Type', $params)){ 
    271271                return $this->quickSearch($params); 
    272272            } 
     
    351351            $DBService = ServiceLocator::getService('db'); 
    352352            $results   = $DBService->search_contacts($params['search_for']); 
    353                         $DBService = ServiceLocator::getService('db'); 
     353                        $results2 = array(); 
    354354            $results2   = $DBService->search_groups($params['search_for']); 
    355             $results   = array_merge($results, $results2); 
     355             
     356            if(is_array($results)){ 
     357                if(is_array($results2)){ 
     358                        $results   = array_merge($results, $results2); 
     359                } 
     360            } 
     361            else if(is_array($results2)){ 
     362                $results = $results2; 
     363            } 
    356364             
    357365            if(!$all) 
     
    362370                         
    363371                        $results['search_for'] = $params['search_for']; 
     372                         
    364373                        return $results; 
    365374        }  
  • trunk/expressoMail1_2/js/common_functions.js

    r5198 r5209  
    611611            return false; 
    612612        } 
    613         if(Type === 'undefined') 
     613        if(Type == undefined) 
    614614            cExecute ("$this.ldap_functions.quicksearchcontact&search_for="+search_for+"&field="+field+"&ID="+ID, handler_emQuickSearch); 
    615615        else 
Note: See TracChangeset for help on using the changeset viewer.