Ignore:
Timestamp:
03/12/10 10:59:32 (14 years ago)
Author:
pedroerp
Message:

Ticket #609 - Migração das classes do módulo workflow para a nova factory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/workflow/branches/609/inc/class.run_activity.inc.php

    r2072 r2233  
    301301                        $this->process_version  = $this->process->getVersion(); 
    302302                        $this->activity_name    = $activity->getName(); 
    303                         $this->user_name        = $GLOBALS['phpgw']->accounts->id2name($GLOBALS['user']); 
     303                        $this->user_name        = Factory::getForeignInstance('phpgwapi', 'phpgw')->accounts->id2name($GLOBALS['user']); 
    304304                        $this->view_activity    = $this->GUI->gui_get_process_view_activity($this->process_id); 
    305305 
     
    318318                        $GLOBALS['workflow']['wf_workflow_path']                        = $GLOBALS['phpgw_info']['server']['webserver_url'].SEP.'workflow'; 
    319319                        $GLOBALS['workflow']['wf_resources_path']                       = $GLOBALS['phpgw_info']['server']['webserver_url'] . SEP . 'workflow/redirect.php?pid=' . $this->process_id . '&file='; 
    320                         $GLOBALS['workflow']['wf_default_resources_path']       = $GLOBALS['workflow']['factory']->getInstance('TemplateServer')->generateLink('processes'); 
    321                         $GLOBALS['workflow']['wf_workflow_resources_path']      = $GLOBALS['workflow']['factory']->getInstance('TemplateServer')->generateLink(''); 
     320                        $GLOBALS['workflow']['wf_default_resources_path']       = Factory::getInstance('TemplateServer')->generateLink('processes'); 
     321                        $GLOBALS['workflow']['wf_workflow_resources_path']      = Factory::getInstance('TemplateServer')->generateLink(''); 
    322322                        $GLOBALS['workflow']['wf_activity_url']                         = $GLOBALS['phpgw_info']['server']['webserver_url'].SEP.'index.php?menuaction=workflow.'.get_class($this).'.go&activity_id='.$activity_id; 
    323                         $GLOBALS['workflow']['wf_user_cnname']                          = $GLOBALS['workflow']['factory']->getInstance('WorkflowLDAP')->getName($GLOBALS['user']); 
     323                        $GLOBALS['workflow']['wf_user_cnname']                          = Factory::getInstance('WorkflowLDAP')->getName($GLOBALS['user']); 
    324324                        $GLOBALS['workflow']['wf_back_link']                            = $GLOBALS['phpgw_info']['server']['webserver_url'].SEP.'workflow'.SEP.'index.php?start_tab=1'; 
    325325                        $GLOBALS['workflow']['wf_js_path']                                      = $GLOBALS['phpgw_info']['server']['webserver_url'].SEP.'workflow'.SEP.'js'.SEP.'jscode'; 
     
    376376 
    377377                                /* check some permissions */ 
    378                                 if (($newUser == '*') || (!$this->runtime->checkUserRun($newUser)) || ($GLOBALS['workflow']['factory']->getInstance('WorkflowLDAP')->getName($newUser) === false)) 
     378                                if (($newUser == '*') || (!$this->runtime->checkUserRun($newUser)) || (Factory::getInstance('WorkflowLDAP')->getName($newUser) === false)) 
    379379                                { 
    380380                                        $_SESSION['phpgw_info']['workflow']['user_groups'] = $actualUserGroups; 
     
    472472 
    473473                        /* activate the security policy */ 
    474                         $GLOBALS['workflow']['factory']->getInstance('WorkflowSecurity')->enableSecurityPolicy(); 
     474                        Factory::getInstance('WorkflowSecurity')->enableSecurityPolicy(); 
    475475 
    476476                        /* include the files */ 
     
    661661                        $GLOBALS['workflow']['wf_workflow_path']                        = $GLOBALS['phpgw_info']['server']['webserver_url'].SEP.'workflow'; 
    662662                        $GLOBALS['workflow']['wf_resources_path']                       = $GLOBALS['phpgw_info']['server']['webserver_url'] . SEP . 'workflow/redirect.php?pid=' . $this->process_id . '&file='; 
    663                         $GLOBALS['workflow']['wf_default_resources_path']       = $GLOBALS['workflow']['factory']->getInstance('TemplateServer')->generateLink('processes'); 
    664                         $GLOBALS['workflow']['wf_workflow_resources_path']      = $GLOBALS['workflow']['factory']->getInstance('TemplateServer')->generateLink(''); 
     663                        $GLOBALS['workflow']['wf_default_resources_path']       = Factory::getInstance('TemplateServer')->generateLink('processes'); 
     664                        $GLOBALS['workflow']['wf_workflow_resources_path']      = Factory::getInstance('TemplateServer')->generateLink(''); 
    665665                        $GLOBALS['workflow']['wf_activity_url']                         = $GLOBALS['phpgw_info']['server']['webserver_url'].SEP.'index.php?menuaction=workflow.'.get_class($this).'.go&activity_id='.$activity_id; 
    666                         $GLOBALS['workflow']['wf_user_cnname']                          = $GLOBALS['workflow']['factory']->getInstance('WorkflowLDAP')->getName($GLOBALS['user']); 
     666                        $GLOBALS['workflow']['wf_user_cnname']                          = Factory::getInstance('WorkflowLDAP')->getName($GLOBALS['user']); 
    667667                        $GLOBALS['workflow']['wf_back_link']                            = $GLOBALS['phpgw_info']['server']['webserver_url'].SEP.'workflow'.SEP.'index.php?start_tab=1'; 
    668668                        $GLOBALS['workflow']['wf_js_path']                                      = $GLOBALS['phpgw_info']['server']['webserver_url'].SEP.'workflow'.SEP.'js'.SEP.'jscode'; 
     
    712712 
    713713                        /* activate the security policy */ 
    714                         $GLOBALS['workflow']['factory']->getInstance('WorkflowSecurity')->enableSecurityPolicy(); 
     714                        Factory::getInstance('WorkflowSecurity')->enableSecurityPolicy(); 
    715715 
    716716                        $GLOBALS['workflow_env'] = &$env; 
Note: See TracChangeset for help on using the changeset viewer.