Ignore:
Timestamp:
08/17/10 16:17:12 (14 years ago)
Author:
viani
Message:

Ticket #1135 - Merged r1990:3166 from /trunk/workflow into /branches/2.2/workflow

File:
1 edited

Legend:

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

    r795 r3167  
    4141        function ui_participants() 
    4242        { 
    43                 $this->bo = $GLOBALS['workflow']['factory']->getInstance('bo_participants'); 
     43                $this->bo = Factory::getInstance('bo_participants'); 
    4444        } 
    4545 
     
    5151        function form() 
    5252        { 
    53                 $smarty = $GLOBALS['workflow']['factory']->getInstance('workflow_smarty', false); 
     53                $smarty = Factory::getInstance('workflow_smarty', false); 
    5454                $smarty->setHeader(workflow_smarty::SHOW_HEADER | workflow_smarty::SHOW_FOOTER); 
    55                 $ldap = $GLOBALS['workflow']['factory']->getInstance('WorkflowLDAP'); 
     55                $ldap = Factory::getInstance('WorkflowLDAP'); 
    5656                $userDN = $GLOBALS['phpgw_info']['user']['account_dn']; 
    57                 $account = $GLOBALS['workflow']['factory']->getForeignInstance('phpgwapi', 'accounts', $userDN); 
     57                $account = Factory::getInstance('accounts', $userDN); 
    5858                $organizationList = $this->bo->getOrganizations(); 
    5959 
     
    9292                $hideSectors = ($_REQUEST['hideSectors'] == '1') ? true : false; 
    9393 
     94                // the default value of $onlyVisibleAccounts is true 
     95                if((isset($_REQUEST['onlyVisibleAccounts'])) && (empty($_REQUEST['onlyVisibleAccounts']) || $_REQUEST['onlyVisibleAccounts'] === 'false')) 
     96                        $onlyVisibleAccounts = false; 
     97                else 
     98                        $onlyVisibleAccounts = true; 
     99 
    94100                /* define the initial organization */ 
    95101                $selectedOrganization = $ldap->getOrganizationFromDN($userDN); 
     
    117123                $smarty->assign('organizations', $organizationList); 
    118124                $smarty->assign('selectedOrganization', $selectedOrganization); 
    119                 $smarty->assign('sectors', $this->bo->getSectors(array('organization' => $selectedOrganization), true)); 
     125                $smarty->assign('sectors', $this->bo->getSectors(array('organization' => $selectedOrganization, 'onlyVisibleAccounts' => $onlyVisibleAccounts), true)); 
    120126                $smarty->assign('selectedSector', $selectedSector); 
    121                 $smarty->assign('participants', $this->bo->getEntities(array('entities' => $entities, 'id' => $id, 'context' => $selectedSector, 'usePreffix' => $usePreffix), true)); 
     127                $smarty->assign('participants', $this->bo->getEntities(array('entities' => $entities, 'id' => $id, 'context' => $selectedSector, 'onlyVisibleAccounts' => $onlyVisibleAccounts, 'usePreffix' => $usePreffix), true)); 
    122128                $smarty->assign('entities', $entities); 
    123129                $smarty->assign('id', $id); 
     
    126132                $smarty->assign('hideOrganizations', $hideOrganizations); 
    127133                $smarty->assign('hideSectors', $hideSectors); 
     134                $smarty->assign('onlyVisibleAccounts', $onlyVisibleAccounts); 
    128135                $smarty->assign('header', $smarty->expressoHeader); 
    129136                $smarty->assign('txt_loading', lang("loading")); 
Note: See TracChangeset for help on using the changeset viewer.