Ignore:
Timestamp:
04/12/10 16:21:32 (14 years ago)
Author:
pedroerp
Message:

Ticket #993 - Trocando acessos à GLOBALS por acessos à Settings.

Location:
sandbox/workflow/branches/993/inc/engine
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sandbox/workflow/branches/993/inc/engine/config.egw.inc.php

    r2372 r2492  
    151151        function galaxia_user_can_admin_process() 
    152152        { 
    153                 return (Factory::getInstance('workflow_acl')->checkWorkflowAdmin($GLOBALS['phpgw_info']['user']['account_id']) || $GLOBALS['phpgw']->acl->check('admin_workflow', 1, 'workflow')); 
     153                return (Factory::getInstance('workflow_acl')->checkWorkflowAdmin(Settings::get('expresso', 'user', 'account_id')) || $GLOBALS['phpgw']->acl->check('admin_workflow', 1, 'workflow')); 
    154154        } 
    155155} 
     
    165165        function galaxia_user_can_admin_instance() 
    166166        { 
    167                 return (Factory::getInstance('workflow_acl')->checkWorkflowAdmin($GLOBALS['phpgw_info']['user']['account_id']) || $GLOBALS['phpgw']->acl->check('admin_instance_workflow', 1, 'workflow')); 
     167                return (Factory::getInstance('workflow_acl')->checkWorkflowAdmin(Settings::get('expresso', 'user', 'account_id')) || $GLOBALS['phpgw']->acl->check('admin_instance_workflow', 1, 'workflow')); 
    168168        } 
    169169} 
     
    179179        function galaxia_user_can_clean_instances() 
    180180        { 
    181                 return (Factory::getInstance('workflow_acl')->checkWorkflowAdmin($GLOBALS['phpgw_info']['user']['account_id']) || $GLOBALS['phpgw']->acl->check('cleanup_workflow', 1, 'workflow')); 
     181                return (Factory::getInstance('workflow_acl')->checkWorkflowAdmin(Settings::get('expresso', 'user', 'account_id')) || $GLOBALS['phpgw']->acl->check('cleanup_workflow', 1, 'workflow')); 
    182182        } 
    183183} 
     
    191191        function galaxia_user_can_clean_aborted_instances() 
    192192        { 
    193                 return (Factory::getInstance('workflow_acl')->checkWorkflowAdmin($GLOBALS['phpgw_info']['user']['account_id']) || $GLOBALS['phpgw']->acl->check('cleanup_aborted_workflow', 1, 'workflow')); 
     193                return (Factory::getInstance('workflow_acl')->checkWorkflowAdmin(Settings::get('expresso', 'user', 'account_id')) || $GLOBALS['phpgw']->acl->check('cleanup_aborted_workflow', 1, 'workflow')); 
    194194        } 
    195195} 
     
    203203        function galaxia_user_can_monitor() 
    204204        { 
    205                 return (Factory::getInstance('workflow_acl')->checkWorkflowAdmin($GLOBALS['phpgw_info']['user']['account_id']) || $GLOBALS['phpgw']->acl->check('monitor_workflow', 1, 'workflow')); 
     205                return (Factory::getInstance('workflow_acl')->checkWorkflowAdmin(Settings::get('expresso', 'user', 'account_id')) || $GLOBALS['phpgw']->acl->check('monitor_workflow', 1, 'workflow')); 
    206206        } 
    207207} 
     
    219219                { 
    220220                        if ($user == '') 
    221                                 $user = $GLOBALS['phpgw_info']['user']['account_id']; 
     221                                $user = Settings::get('expresso', 'user', 'account_id'); 
    222222 
    223223                        $memberships = Factory::getInstance('WorkflowLDAP')->getUserGroups($user); 
     
    271271        function galaxia_retrieve_running_user() 
    272272        { 
    273                         return ($GLOBALS['phpgw_info']['user']['account_id']); 
     273                        return Settings::get('expresso', 'user', 'account_id'); 
    274274        } 
    275275} 
  • sandbox/workflow/branches/993/inc/engine/src/API/BaseActivity.php

    r2372 r2492  
    242242     
    243243    // retrieve user_groups information in an array containing all groups for this user 
    244     $user_groups = galaxia_retrieve_user_groups($GLOBALS['phpgw_info']['user']['account_id'] ); 
     244    $user_groups = galaxia_retrieve_user_groups(Settings::get('expresso', 'user', 'account_id') ); 
    245245    // and append it to query                       
    246246    $query = 'select `wf_role_id` from `'.GALAXIA_TABLE_PREFIX."user_roles`  
Note: See TracChangeset for help on using the changeset viewer.