Ignore:
Timestamp:
09/09/10 15:56:47 (14 years ago)
Author:
viani
Message:

Ticket #1186 - Correção no array de atributos Ldap retornados pela pesquisa de employee

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/workflow/inc/class.so_orgchart.inc.php

    r3212 r3225  
    11041104                $cachedLDAP->setOperationMode($cachedLDAP->OPERATION_MODE_LDAP_DATABASE); 
    11051105 
    1106                  
    11071106                /* here we need fresh information. Let's access ldap first */ 
    11081107                $employeeEntry = $cachedLDAP->getEntryByID($employeeID); 
    1109                  
     1108 
    11101109                if ($entry === false) 
    11111110                        return array('error' => 'Funcionário não encontrado.'); 
    1112                  
    1113                 $employeeInfo                           = $orgchart->getEmployee($employeeID); 
    1114                 $employeeStatusInfo             = $orgchart->getEmployeeStatus($employeeInfo['funcionario_status_id']); 
    1115                 $account_id                             = $_SESSION['phpgw_info']['workflow']['account_id']; 
    1116                 $organization_supervisors       = $orgchart->getOrganizationSupervisors($employeeInfo['organizacao_id']); 
    1117                  
    1118                 /*  
    1119                  * Verify the supervisor of the organization 
    1120                  * if the logged user is the supervisor of the selected user 
    1121                  * then will show the mobile and homePhone number. 
    1122                  */  
     1111 
     1112                $employeeInfo                           = $orgchart->getEmployee($employeeID); 
     1113                $employeeStatusInfo                     = $orgchart->getEmployeeStatus($employeeInfo['funcionario_status_id']); 
     1114                $account_id                                     = $_SESSION['phpgw_info']['workflow']['account_id']; 
     1115                $organization_supervisors       = $orgchart->getOrganizationSupervisors($employeeInfo['organizacao_id']); 
     1116 
     1117                // Make an array with all supervisors and their substitures 
    11231118                $arr_supervisores = array(); 
    11241119                foreach ($organization_supervisors as $supervisor) { 
     
    11281123                        } 
    11291124                } 
    1130                  
     1125 
    11311126                $mobile         = ''; 
    11321127                $homePhone  = ''; 
    1133                  
     1128 
     1129                /* 
     1130                 * Check if the current user can view the mobile and homePhone of the employee 
     1131                 * This condition is true if the current user is a supervisor or is the same user 
     1132                 * that's being retrieved 
     1133                 */ 
    11341134                if (in_array($account_id,$arr_supervisores) || ($account_id == $employeeID)) { 
    11351135                        $mobile         = $employeeEntry['mobile']; 
    11361136                        $homePhone      = $employeeEntry['homephone']; 
    1137                 }  
    1138                  
     1137                } 
     1138 
    11391139                $outputInfo[] = array( 
    11401140                        'name' => 'Mobile', 
    11411141                        'value' => ( ! empty( $mobile ) ? $mobile : '' ) ); 
    1142                          
     1142 
    11431143                $outputInfo[] = array( 
    11441144                        'name' => 'homePhone', 
     
    11641164                        'name' => 'UIDNumber', 
    11651165                        'value' => $employeeID); 
    1166  
    1167                  
    11681166 
    11691167                $outputInfo[] = array( 
     
    14301428                * I'm not supose to be here.. (date validations speaking) 
    14311429                * move me to some validation class! 
    1432                 */  
     1430                */ 
    14331431 
    14341432                /* validating dates */ 
     
    15051503                $result = $this -> db -> query( $query, array( $areaID, $substituteID, $date_start, $date_end ) ); 
    15061504                $this->_checkError( $result ); 
    1507                  
     1505 
    15081506                return ( ( $result === false ) ? false : true ); 
    15091507        } 
     
    15331531                $result = $this -> db -> query( $query, array( $substituteID, $date_start, $date_end, $substitutionID ) ); 
    15341532                $this->_checkError( $result ); 
    1535                  
     1533 
    15361534                return ( ( $result === false ) ? false : true ); 
    15371535        } 
     
    15751573         * @param int $organizationID Organization's ID 
    15761574         * @param int $telephoneID Substitution's ID 
    1577          * @return bool  
     1575         * @return bool 
    15781576         * @access public 
    15791577         */ 
Note: See TracChangeset for help on using the changeset viewer.