Changeset 1276 for trunk/workflow/inc
- Timestamp:
- 08/05/09 16:53:15 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/workflow/inc/class.so_userinterface.inc.php
r1269 r1276 590 590 591 591 $employees = $result -> GetArray( -1 ); 592 592 593 $cachedLDAP = $GLOBALS[ 'workflow' ][ 'factory' ] -> newInstance( 'CachedLDAP' ); 593 594 $cachedLDAP -> setOperationMode( $cachedLDAP -> OPERATION_MODE_LDAP_DATABASE ); … … 612 613 } 613 614 614 // count the number of employees in each category 615 } 616 617 usort( $employees, create_function( '$a,$b', 'return strcasecmp($a[\'cn\'],$b[\'cn\']);' ) ); 618 619 $paging = $GLOBALS['workflow']['factory']->newInstance('Paging', 100, $_POST); 620 $employees = $paging->restrictItems( $employees ); 621 622 // count the number of employees in each category 623 for ( $i = 0; $i < count( $employees ); $i++ ) 624 { 615 625 $categoryID = $employees[ $i ][ 'funcionario_categoria_id' ]; 616 626 if ( isset( $categoriesCount[ $categoryID ] ) ) … … 623 633 $availableCategories = $this -> getCategoriesList( $organizationID ); 624 634 $output = array( ); 625 $output[ 'employees' ] = $employees; 626 $output[ 'categories' ] = array( ); 635 636 $output['employees'] = $employees; 637 $output['categories'] = array( ); 638 $output['paging_links'] = $paging -> commonLinks(); 639 627 640 foreach ( $availableCategories as $category ) 628 641 { … … 634 647 } 635 648 636 usort( $output[ 'employees' ], create_function( '$a,$b', 'return strcasecmp($a[\'cn\'],$b[\'cn\']);' ) );637 638 649 return $output; 639 650 }
Note: See TracChangeset
for help on using the changeset viewer.