Ignore:
Timestamp:
05/23/08 17:10:39 (16 years ago)
Author:
brunocosta
Message:

Correção dos problemas gerados no commit anterior, a funcionalidade citada no ticket #199 foram temporariamente desativadas.

File:
1 edited

Legend:

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

    r284 r285  
    1616        */ 
    1717        include_once('class.abo_catalog.inc.php'); 
    18  
     18         
    1919        class bo_global_ldap_catalog extends abo_catalog 
    2020        { 
    2121                var $ldap; 
    22  
     22         
    2323                var $src_info; 
    24  
     24                 
    2525                var $trans_table; 
    26  
    2726                // used to determine if a catalog is external 
    2827                var $external; 
    29  
    3028                var $fields = array( 
    3129                        'id_contact'    => true, 
     
    4341                        'pgp_key'       => true, 
    4442                        'notes'         => true, 
    45                         'department'    => true, 
    46  
    47                         'empNumber'     => true, 
    48  
     43                         
    4944                        /* Array fields */ 
    5045                        'companies'     => true, 
     
    5348                        'connections'   => true 
    5449                ); 
    55  
     50                 
    5651                /* 
    57  
     52                 
    5853                        @function global_ldap_catalog 
    5954                        @abstract Constructor 
     
    6459                        @param string $context Ldap bind DN 
    6560                        @param integer $external 0 = internal catalog, 1 = external catalog 
    66  
    6761                */ 
    6862                function bo_global_ldap_catalog ( $id_source, $context, $external = 0 ) 
    6963                { 
    70  
    7164                        $this->external = $external; 
    72  
    7365                        if (!function_exists('ldap_search')) 
    7466                        { 
    7567                                exit('PHP LDAP support Unavailable!'); 
    7668                        } 
    77  
     69                         
    7870                        $this->ldap = CreateObject('contactcenter.bo_ldap_manager'); 
    79  
     71                         
    8072                        if ($this->external) 
    8173                        { 
     
    10092                        } 
    10193                        else 
    102                         { 
     94                        {        
    10395                                $this->trans_table = $this->ldap->get_ldap_fields_association($id_source); 
    10496                        } 
    10597                } 
    106  
     98                 
    10799                /* 
    108  
     100                 
    109101                        @function find 
    110102                        @abstract Searches the LDAP directory for the specified fields with 
     
    112104                                that matches the rules. 
    113105                        @author Raphael Derosso Pereira 
    114  
     106                         
    115107                        @param array $what The fields to be taken 
    116108                        @param array $rules The rules to be match. See class.abo_catalog.inc.php 
     
    121113                                        'offset' => (integer) [NOT IMPLEMENTED] 
    122114                                ) 
    123  
     115                 
    124116                */ 
    125117                function find($what, $rules=false, $other=false) 
    126118                { 
    127119                        $restric_fields = $this->get_restrictions_without_branch($rules); 
    128  
     120                         
    129121                        $trans_f = $this->translate_fields($what, $restric_fields); 
    130  
     122                         
    131123                        foreach($trans_f as $orig => $field_a) 
    132124                        { 
     
    136128                                } 
    137129                        } 
    138  
     130                         
    139131                        $fields = array_unique($fields); 
    140  
     132                         
    141133                        $filter = $this->process_restrictions($rules, $trans_f); 
    142134 
    143135                        if(strstr($this->src_info['context'], "ldap://")) { 
    144136                                $refer_context  = str_replace("??base","",preg_replace('!^(ldap://[^/]+)/(.*$)!', '\\2', $this->src_info['context'])); 
    145                                 $host   = preg_replace('!^(ldap://[^/]+)/.*$!', '\\1', $this->src_info['context']); 
     137                                $host   = preg_replace('!^(ldap://[^/]+)/.*$!', '\\1', $this->src_info['context']);                              
    146138                                $this->src_info['host'] = $host; 
    147                                 $this->src_info['acc'] = ''; 
    148                                 $this->src_info['pw']  = ''; 
    149                         } 
    150  
    151                         $ldap = $GLOBALS['phpgw']->common->ldapConnect($this->src_info['host'], $this->src_info['acc'], $this->src_info['pw'], true); 
    152  
    153                         if (!$ldap) 
    154                         { 
     139                        }                        
     140 
     141                        if($refer_context || "ou" === strtolower(substr($this->src_info['context'], 0, 2))) 
     142                        {                
     143                                $followReferral = false;                         
     144                        } 
     145                        elseif(trim($rules[4]['value']) != "inetOrgPerson")      
     146                        {                        
     147                                $followReferral = true; 
     148                        } 
     149                        else 
     150                        {                                
    155151                                return false; 
    156152                        } 
    157  
    158                         if (!$this->external) 
    159                         { 
    160                                 $fields[]  ='phpgwAccountVisible'; 
    161                         } 
    162  
    163                         $result_r = @ldap_search($ldap ,($refer_context  ? $refer_context  : $this->src_info['context']), $filter, $fields, 0); 
     153                         
     154                        $ldap = $GLOBALS['phpgw']->common->ldapConnect($this->src_info['host'], $this->src_info['acc'], $this->src_info['pw'], $followReferral); 
     155                        $result_r = ldap_search($ldap ,($refer_context  ? $refer_context  : $this->src_info['context']), $filter, $fields, 0); 
    164156 
    165157                        if (!$result_r) 
     
    167159                                return false; 
    168160                        } 
    169  
     161                         
    170162                        if ($other['order']) 
    171163                        { 
     
    181173                                } 
    182174                        } 
    183  
     175                         
    184176                        $result_u = ldap_get_entries($ldap, $result_r); 
    185  
     177                         
    186178                        $i = 0; 
    187179                        foreach ($result_u as $index => $result_p) 
     
    191183                                        continue; 
    192184                                } 
    193  
     185                                 
    194186                                foreach ($trans_f as $orig => $trans) 
    195187                                { 
     
    209201                                $i++; 
    210202                        } 
    211  
     203                         
    212204                        return $return; 
    213205                } 
    214  
     206                 
    215207                /* 
    216  
     208                 
    217209                        @function translate_fields 
    218210                        @abstract Return the LDAP objectClass fields that corresponds to the 
    219211                                specified parameter fields 
    220212                        @author Raphael Derosso Pereira 
    221  
     213                         
    222214                        @param array $fields The fields in the standard ContactCenter format 
    223215                        @param array $rules The rules 
    224  
     216                 
    225217                */ 
    226218                function translate_fields ( $fields, &$restric_fields ) 
    227219                { 
    228220                        $return = array(); 
    229  
     221                         
    230222                        $i = 0; 
    231223                        foreach ($fields as $field) 
     
    235227                                        continue; 
    236228                                } 
    237  
     229                                 
    238230                                if (!is_array($this->trans_table[$field])) 
    239231                                { 
    240232                                        $reference = $this->trans_table[$field]; 
    241  
     233                                         
    242234                                        reset($restric_fields); 
    243235                                        while(list(,$field_r) = each($restric_fields)) 
    244236                                        { 
    245  
    246237                                                if ($field_r['field'] === $reference and array_key_exists($field_r['value'], $this->trans_table[$reference])) 
    247238                                                { 
     
    252243                                else 
    253244                                { 
    254  
    255245                                        if (!is_array($return[$field])) 
    256246                                        { 
     
    263253                                } 
    264254                        } 
    265  
     255                         
    266256                        if (count($return)) 
    267257                        { 
    268258                                return $return; 
    269259                        } 
    270  
     260                         
    271261                        return false; 
    272262                } 
    273  
     263                 
    274264                /* 
    275  
     265                 
    276266                        @function process_restrictions 
    277267                        @abstract Returns a LDAP filter string that corresponds to the 
    278268                                specified restriction rules 
    279269                        @author Raphael Derosso Pereira 
    280  
     270                         
    281271                        @param string $rules The restriction rules 
    282  
     272                 
    283273                */ 
    284274                function process_restrictions( $rules, &$trans_table, $join_type='&' ) 
     
    288278                                return null; 
    289279                        } 
    290  
     280                         
    291281                        foreach($rules as $rule_i => $rule) 
    292282                        { 
     
    300290                                                                $join = '|'; 
    301291                                                                break; 
    302  
     292                                                                 
    303293                                                        case 'AND': 
    304294                                                                $join = '&'; 
    305295                                                                break; 
    306  
     296                                                                 
    307297                                                        case 'NOT': 
    308298                                                                $join = '!'; 
    309299                                                                break; 
    310  
     300                                                                 
    311301                                                        default: 
    312302                                                                $join = $join_type; 
     
    314304                                                $return_t[] = $this->process_restrictions($rule['sub_branch'], $trans_table, $join); 
    315305                                                break; 
    316  
     306                                                 
    317307                                        case '=': 
    318308                                                if (array_key_exists($rule['field'], $trans_table)) 
     
    325315                                                } 
    326316                                                break; 
    327  
    328                                         case '!=': 
     317                                         
     318                                        case '!=':       
    329319                                                if (array_key_exists($rule['field'], $trans_table)) 
    330320                                                { 
     
    336326                                                } 
    337327                                                break; 
    338  
     328                                         
    339329                                        case '<=': 
    340330                                        case '<': 
     
    348338                                                } 
    349339                                                break; 
    350  
     340                                         
    351341                                        case '>': 
    352342                                        case '>=': 
     
    360350                                                } 
    361351                                                break; 
    362  
     352                                                 
    363353                                        case 'NULL': 
    364354                                                if (array_key_exists($rule['field'], $trans_table)) 
     
    371361                                                } 
    372362                                                break; 
    373  
     363                                         
    374364                                        case 'IN': 
    375365                                                if (array_key_exists($rule['field'], $trans_table)) 
     
    391381                                                        $value_1 = strtoupper(str_replace('%', '*', $rule['value'])); 
    392382                                                        $value_2 = strtolower($value_1); 
    393  
     383                                                         
    394384                                                        foreach($trans_table[$rule['field']] as $field) 
    395385                                                        { 
     
    400390                                                } 
    401391                                                break; 
    402  
     392                                                 
    403393*/                                      case 'LIKE': 
    404394                                                if (array_key_exists($rule['field'], $trans_table)) 
    405395                                                { 
    406396                                                        $value = str_replace('%', '*', $rule['value']); 
    407  
     397                                                         
    408398                                                        foreach($trans_table[$rule['field']] as $field) 
    409399                                                        { 
     
    413403                                                } 
    414404                                                break; 
    415  
     405                                                 
    416406                                        case 'NOT NULL': 
    417407                                                if (array_key_exists($rule['field'], $trans_table)) 
     
    424414                                                } 
    425415                                                break; 
    426  
     416                                         
    427417                                        case 'NOT IN': 
    428418                                                if (array_key_exists($rule['field'], $trans_table)) 
     
    444434                                                        $value_1 = strtoupper(str_replace('%', '*', $rule['value'])); 
    445435                                                        $value_2 = strtolower($value_1); 
    446  
     436                                                         
    447437                                                        foreach($trans_table[$rule['field']] as $field) 
    448438                                                        { 
     
    458448                                                { 
    459449                                                        $value = str_replace('%', '*', $rule['value']); 
    460  
     450                                                         
    461451                                                        foreach($trans_table[$rule['field']] as $field) 
    462452                                                        { 
     
    468458                                } 
    469459                        } 
    470  
     460                         
    471461                        if (count($return_t)) 
    472462                        { 
     
    486476 
    487477                /*! 
    488  
     478                 
    489479                        @function get_restrictions_without_branch 
    490480                        @abstract Returns an array containing the restrictions ignoring the 
    491481                                branches 
    492482                        @author Raphael Derosso Pereira 
    493  
     483                         
    494484                        @param array $restrictions The restrictions 
    495  
     485                 
    496486                */ 
    497487                function get_restrictions_without_branch(&$restrictions) 
     
    501491                                return null; 
    502492                        } 
    503  
     493                         
    504494                        $fields = array(); 
    505  
     495                         
    506496                        foreach ($restrictions as $restrict_data) 
    507497                        { 
     
    511501                                                $fields = array_merge($fields, $this->get_restrictions_without_branch($restrict_data['sub_branch'])); 
    512502                                                break; 
    513  
     503                                                 
    514504                                        case '=': 
    515                                         case '!=': 
     505                                        case '!=':       
    516506                                        case '<=': 
    517507                                        case '<': 
     
    528518                                                array_push($fields, $restrict_data); 
    529519                                                break; 
    530  
     520                                                 
    531521                                        default: 
    532                                                 exit('Error in '.__FILE__.' on '.__LINE__.'<br>The restriction type passed was: '.$restrict_data['type']); 
    533                                 } 
    534                         } 
    535  
     522                                                exit('Error in '.__FILE__.' on '.__LINE__.'<br>The restriction type passed was: '.$restrict_data['type']);                                       
     523                                } 
     524                        } 
     525                         
    536526                        return $fields; 
    537527                } 
    538  
    539  
     528                 
     529                 
    540530                /*********************************************************************\ 
    541531                 *                        Methods to Get Data                        * 
    542532                \*********************************************************************/ 
    543  
    544  
     533                 
     534         
    545535                /*! 
    546  
     536                 
    547537                 @function get_single_entry 
    548538                 @abstract Returns all information requested about one contact 
    549539                 @author Raphael Derosso Pereira 
    550  
     540                      
    551541                 @param integer $id_contact The contact ID 
    552542                 @param array $fields The array returned by get_fields with true 
    553543                        on the fields to be taken. 
    554  
     544                         
    555545                */ 
    556546                function get_single_entry ( $id_contact, $fields ) 
    557547                { 
    558                         if (!is_array($fields)) 
    559                         { 
    560                                 if (is_object($GLOBALS['phpgw']->log)) 
     548                        if (!is_array($fields))  
     549                        { 
     550                                if (is_object($GLOBALS['phpgw']->log))  
    561551                                { 
    562552                                        $GLOBALS['phpgw']->log->message(array( 
     
    564554                                                'line' => __LINE__, 
    565555                                                'file' => __FILE__)); 
    566  
     556                                         
    567557                                        $GLOBALS['phpgw']->log->commit(); 
    568558                                } 
    569                                 else 
     559                                else  
    570560                                { 
    571561                                        exit('Argument Error on: <br>File:'.__FILE__.'<br>Line:'.__LINE__.'<br>'); 
    572562                                } 
    573563                        } 
    574  
     564                         
    575565                        $ldap = $GLOBALS['phpgw']->common->ldapConnect($this->src_info['host'],$this->src_info['acc'],$this->src_info['pw'],true); 
    576  
     566                         
    577567                        if (!$ldap) 
    578568                        { 
    579569                                return false; 
    580570                        } 
    581  
     571                         
    582572                        $resource = ldap_read($ldap, $id_contact, 'objectClass='.$this->src_info['obj']); 
    583573                        $n_entries = ldap_count_entries($ldap, $resource); 
     
    586576                                return false; 
    587577                        } 
    588  
     578                         
    589579                        $first_entry = ldap_first_entry($ldap, $resource); 
    590580                        $contact = ldap_get_attributes($ldap,$first_entry); 
    591                         if($contact['jpegPhoto']){ 
    592                                 $contact['jpegPhoto'] = ldap_get_values_len ($ldap, $first_entry, "jpegPhoto"); 
     581                        if($contact['jpegPhoto']){       
     582                                $contact['jpegPhoto'] = ldap_get_values_len ($ldap, $first_entry, "jpegPhoto");  
    593583                        } 
    594584 
    595585//                      print_r($contact); 
    596  
     586                         
    597587                //      $contact_data = $this->fields; 
    598  
     588                         
    599589                        foreach($fields as $field => $trueness) 
    600590                        { 
     
    604594                                        continue; 
    605595                                } 
    606  
     596                                 
    607597                                switch ($field) 
    608598                                { 
     
    613603                                                $l_fields['department']    = $this->trans_table['contact.business_info.department']; 
    614604                                                $l_fields['company_notes'] = $this->trans_table['contact.company.company_notes']; 
    615  
     605                                                 
    616606                                                $contact_data['companies'] = array(); 
    617607                                                foreach($l_fields as $l_field => $l_value) 
     
    621611                                                                continue; 
    622612                                                        } 
    623  
     613                                                         
    624614                                                        $contact_data['companies']['company1'][$l_field] = utf8_decode($contact[$l_value[0]][0]); 
    625615                                                } 
    626  
     616                                                 
    627617                                                if (!(count($contact_data['companies']))) 
    628618                                                { 
     
    630620                                                } 
    631621                                                break; 
    632  
     622                                         
    633623                                        case 'relations': 
    634624                                                unset($l_fields); 
     
    637627                                                        unset($contact_data['relations']); 
    638628                                                } 
    639  
     629                                                 
    640630                                                $contact_data['relations'] = array(); 
    641631                                                if (!is_array($this->trans_table['contact.contact_related.names_ordered'])) 
     
    645635                                                                continue; 
    646636                                                        } 
    647  
     637                                                         
    648638                                                        $i = 1; 
    649639                                                        foreach($trans as $l_type => $l_type_fields) 
     
    653643                                                                        continue; 
    654644                                                                } 
    655  
     645                                                                 
    656646                                                                $contact_data['relations']['relation'.$i]['type'] = $l_type; 
    657647                                                                $contact_data['relations']['relation'.$i]['names_ordered'] = utf8_decode($contact[$l_type_fields[0]][0]); 
     
    659649                                                        } 
    660650                                                } 
    661  
     651                                                 
    662652                                                if (!(count($contact_data['relations']))) 
    663653                                                { 
     
    665655                                                } 
    666656                                                break; 
    667  
     657                                         
    668658                                        case 'addresses': 
    669659                                                unset($l_fields); 
     
    694684                                                                        continue; 
    695685                                                                } 
    696  
     686                                                                 
    697687                                                                $i = 1; 
    698688                                                                foreach($trans as $l_type => $l_type_fields) 
     
    702692                                                                                continue; 
    703693                                                                        } 
    704  
     694                                                                         
    705695                                                                        $contact_data['addresses']['address'.$i]['type'] = $l_type; 
    706696                                                                        $contact_data['addresses']['address'.$i][$l_field] = utf8_decode($contact[$l_type_fields[0]][0]); 
     
    713703                                                        } 
    714704                                                } 
    715  
     705                                                 
    716706                                                if (!(count($contact_data['addresses']))) 
    717707                                                { 
     
    719709                                                } 
    720710                                                break; 
    721  
     711                                         
    722712                                        case 'connections': 
    723713                            $preferences = ExecMethod('contactcenter.ui_preferences.get_preferences'); 
     
    740730                                                                        continue; 
    741731                                                                } 
    742  
     732                                                                 
    743733                                                                $i = 1; 
    744734                                                                foreach($trans as $l_type => $l_type_fields) 
     
    748738                                                                                continue; 
    749739                                                                        } 
    750  
     740                                                                         
    751741                                                                        switch ($l_type) 
    752742                                                                        { 
     
    768758                                                        } 
    769759                                                } 
    770  
     760                                                 
    771761                                                if (!(count($contact_data['connections']))) 
    772762                                                { 
     
    774764                                                } 
    775765                                                break; 
    776  
     766                                         
    777767                                        case 'prefix': 
    778768                                                unset($l_fields); 
     
    783773                                                        continue; 
    784774                                                } 
    785  
     775                                                 
    786776                                                $contact_data['prefix'] = utf8_decode($contact[$l_fields[0]][0]); 
    787777                                                break; 
    788  
     778                                                 
    789779                                        case 'suffix': 
    790780                                                unset($l_fields); 
     
    795785                                                        continue; 
    796786                                                } 
    797  
     787                                                 
    798788                                                $contact_data['suffix'] = utf8_decode($contact[$l_fields[0]][0]); 
    799789                                                break; 
    800  
     790                                                 
    801791                                        case 'status': 
    802792                                                unset($l_fields); 
     
    807797                                                        continue; 
    808798                                                } 
    809  
     799                                                 
    810800                                                $contact_data['status'] = utf8_decode($contact[$l_fields[0]][0]); 
    811801                                                break; 
    812  
     802                                                 
    813803                                                case 'photo': 
    814804                                                unset($l_fields); 
     
    819809                                                        continue; 
    820810                                                } 
    821  
     811                                                 
    822812                                                $contact_data['photo'] = $contact[$l_fields[0]][0]; 
    823                                                 break; 
     813                                                break;                                                                                   
    824814 
    825815                                        default: 
     
    831821                                                        continue; 
    832822                                                } 
    833  
     823                                                 
    834824                                                if(count($contact[$l_fields[0]]) > 1) 
    835825                                                { 
     
    848838                                } 
    849839                        } 
    850  
     840                         
    851841                        if (!is_array($contact_data)) 
    852842                        { 
    853843                                return false; 
    854844                        } 
    855  
     845                         
    856846                        return $contact_data; 
    857847                } 
    858  
     848                //SERPRO 
    859849                /*! 
    860850 
     
    932922                                                        $l_fields['department']    = $this->trans_table['contact.business_info.department']; 
    933923                                                        $l_fields['company_notes'] = $this->trans_table['contact.company.company_notes']; 
    934  
    935                                                         ///Relaciona o array com o atributo 'employeeNumber' do RHDS 
    936                                                         $l_fields['empNumber']     = $this->trans_table['contact.business_info.empNumber']; 
    937924 
    938925                                                        $contact_data['companies'] = array(); 
     
    11811168                        return $contacts; 
    11821169                } 
    1183  
     1170                 
    11841171                function get_multiple_entries ( $id_contacts, $fields, $other_data = false ) 
    11851172                { 
    11861173                        if (!is_array($id_contacts) or !is_array($fields) or ($other_data != false and !is_array($other_data))) 
    11871174                        { 
    1188                                 if (is_object($GLOBALS['phpgw']->log)) 
     1175                                if (is_object($GLOBALS['phpgw']->log))  
    11891176                                { 
    11901177                                        $GLOBALS['phpgw']->log->message(array( 
     
    11921179                                                'line' => __LINE__, 
    11931180                                                'file' => __FILE__)); 
    1194  
     1181                                         
    11951182                                        $GLOBALS['phpgw']->log->commit(); 
    11961183                                } 
     
    11991186                                } 
    12001187                        } 
    1201  
    1202                         $contacts = array(); 
    1203  
     1188                          
     1189                        foreach ($id_contacts as $id) 
     1190                        { 
     1191                                $contacts[$id] = $this->get_single_entry($id,$fields); 
     1192                        } 
     1193                         
     1194                        return $contacts; 
     1195 
     1196                        // SERPRO 
     1197                                                 
     1198                        /*$contacts = array(); 
     1199         
    12041200                        if ($other_data) 
    12051201                        { 
     
    12111207                        //$teste = $this->get_all_entries($filter, $fields); 
    12121208 
    1213                         return $this->get_all_entries($filter, $fields); 
    1214                 } 
    1215  
     1209                        return $this->get_all_entries($filter, $fields);*/ 
     1210                         
     1211                } 
     1212 
     1213        // CELEPAR 
     1214                function generate_filter($id_contacts) 
     1215                { 
     1216                        if (($size = count($id_contacts))) 
     1217                        { 
     1218                                $contacts[$id] = $this->get_single_entry($id,$fields); 
     1219                        } 
     1220                         
     1221                        return $contacts; 
     1222                } 
     1223                 
     1224                // SERPRO 
     1225                /* 
    12161226                function generate_filter($id_contacts) 
    12171227                { 
     
    12221232                                { 
    12231233 
    1224                                         /* 
    1225                                          * Não utiliza mais a função ldap_explode, usa a expressão regular a seguir para pegar o primeiro 
    1226                                          * componente da dn 
    1227                                          */ 
     1234                                        //  
     1235                                        // Não utiliza mais a função ldap_explode, usa a expressão regular a seguir para pegar o primeiro 
     1236                                        // componente da dn 
     1237                                        //  
    12281238                                        preg_match('/^(\w*=[^,]*),.*$/', $id_contacts[$i], $cn); 
    12291239 
    1230                                 /* 
    1231                                  * Adicionados os str_replace para adicionar caracteres de escape em frente aos caracteres '(' e ')', 
    1232                                  * posteriormente poderá ser necessário substituir por uma expressão regular mais genérica. 
    1233                                  */ 
     1240                                // 
     1241                                // Adicionados os str_replace para adicionar caracteres de escape em frente aos caracteres '(' e ')', 
     1242                                // posteriormente poderá ser necessário substituir por uma expressão regular mais genérica. 
     1243                                // 
     1244 
    12341245                                        if ($cn[1]) 
    12351246                                        { 
    1236                                                 /* 
    1237                                                  * Esta operação resolve o problema causado pela conversão de caracteres acentuados realizada 
    1238                                                  * pela função ldap_explode_dn(). Talvez seja necessário utilizar esta tradução em outros lugares, 
    1239                                                  * neste caso é mais apropriado colocar dentro de uma função. 
    1240                                                  */ 
     1247                                                // 
     1248                                                // Esta operação resolve o problema causado pela conversão de caracteres acentuados realizada 
     1249                                                // pela função ldap_explode_dn(). Talvez seja necessário utilizar esta tradução em outros lugares, 
     1250                                                // neste caso é mais apropriado colocar dentro de uma função. 
     1251                                                // 
    12411252                                                //foreach($cn as $key=>$value){ 
    12421253                                        //      $cn[$key]=preg_replace("/\\\([0-9A-Fa-f]{2})/e", "''.chr(hexdec('\\1')).''", $value); 
     
    12521263 
    12531264                } 
     1265                */ 
    12541266 
    12551267                function get_all_entries_ids () 
     
    12801292                        return null; 
    12811293                } 
    1282  
     1294                 
    12831295                function get_relations ($id_contact,$extra=false) 
    12841296                { 
    12851297                } 
    1286  
     1298                 
    12871299                function get_addresses ( $id_contact,$extra=false ) 
    12881300                { 
    12891301                } 
    1290  
     1302                 
    12911303                function get_connections ( $id_contact,$extra=false ) 
    12921304                { 
    12931305                } 
    1294  
     1306                 
    12951307                function get_companies ( $id_contact, $extra=false ) 
    12961308                { 
    12971309                } 
    1298  
     1310                 
    12991311                function get_all_prefixes (  ) 
    13001312                { 
    13011313                } 
    1302  
     1314                 
    13031315                function get_all_suffixes (  ) 
    13041316                { 
    13051317                } 
    1306  
     1318                 
    13071319                function get_all_status (  ) 
    13081320                { 
    13091321                } 
    1310  
     1322                 
    13111323                function get_all_relations_types (  ) 
    13121324                { 
    13131325                } 
    1314  
     1326                 
    13151327                function get_all_addresses_types (  ) 
    13161328                { 
    13171329                } 
    1318  
     1330                 
    13191331                function get_all_connections_types (  ) 
    13201332                { 
    13211333                } 
    1322  
     1334                 
    13231335                function get_vcard ( $id_contact ) 
    13241336                { 
    13251337                } 
    1326  
    1327  
    1328  
    1329  
     1338                 
     1339                 
     1340                 
     1341                 
    13301342                function get_global_tree ( $root ) 
    13311343                { 
    13321344                } 
    1333  
     1345         
    13341346                function get_actual_brach (  ) 
    13351347                { 
    13361348                } 
    1337  
     1349         
    13381350                function set_actual_branch ( $branch ) 
    13391351                { 
Note: See TracChangeset for help on using the changeset viewer.