Changeset 1465 for trunk/workflow


Ignore:
Timestamp:
09/30/09 09:55:34 (15 years ago)
Author:
gbisotto
Message:

Ticket #668 - Melhoria da busca por usuarios na interface do organograma

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/workflow/inc/class.so_userinterface.inc.php

    r1446 r1465  
    358358                $ldap = &$GLOBALS['workflow']['workflowObjects']->getLDAP(); 
    359359 
     360                $searchTermExploded = explode(" ", $searchTerm); 
     361                $fullSearch = false; 
     362 
     363                if(count($searchTermExploded) > 0){ 
     364                        for($i=1; $i<count($searchTermExploded); $i++){ 
     365                                if(strlen($searchTermExploded[$i]) > 2){ 
     366                                        $fullSearch = true; 
     367                                } 
     368                        } 
     369 
     370                        if($fullSearch){ 
     371                                $searchTerm = implode("*", $searchTermExploded); 
     372                        } 
     373                } 
     374 
    360375                $list = @ldap_search($ldap, $GLOBALS['workflow']['factory']->getInstance('WorkflowLDAP')->getLDAPContext(), ('(&(cn=*' . $searchTerm . '*)(phpgwaccounttype=u))'), array('uidNumber', 'cn', 'telephoneNumber')); 
    361376                if ($list === false) 
Note: See TracChangeset for help on using the changeset viewer.