Ignore:
Timestamp:
03/29/10 14:46:01 (14 years ago)
Author:
pedroerp
Message:

Ticket #609 - Merged 2197:2356 /sandbox/workflow/branches/609/ em /sandbox/workflow/trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/workflow/trunk/inc/class.bo_userinterface.inc.php

    r2085 r2372  
    1010\**************************************************************************/ 
    1111 
    12 require_once('class.so_userinterface.inc.php'); 
    1312require_once('class.bo_ajaxinterface.inc.php'); 
    14 require_once('class.Paging.inc.php'); 
    15  
    16 require_once(GALAXIA_LIBRARY . SEP . 'src' . SEP . 'GUI' . SEP . 'GUI.php'); 
    17 require_once(GALAXIA_LIBRARY . SEP . 'src' . SEP . 'ProcessManager' . SEP . 'ActivityManager.php'); 
     13 
    1814/** 
    1915 * @package Workflow 
     
    4339        function bo_userinterface() 
    4440        { 
    45                 parent::bo_ajaxinterface();      
    46                 $this->so = new so_userinterface(); 
    47                 $GLOBALS['ajax']->gui = new GUI($GLOBALS['workflow']['workflowObjects']->getDBGalaxia()->Link_ID); 
     41                parent::bo_ajaxinterface(); 
     42                $this->so = &Factory::getInstance('so_userinterface'); 
     43                $GLOBALS['ajax']->gui = &Factory::newInstance('GUI'); 
    4844        } 
    4945 
     
    6864                $webserver_url = $_SESSION['phpgw_info']['workflow']['server']['webserver_url']; 
    6965 
    70                 $templateServer = &$GLOBALS['workflow']['factory']->getInstance('TemplateServer'); 
     66                $templateServer =& Factory::getInstance('TemplateServer'); 
    7167                foreach ($result['data'] as $line) 
    7268                { 
     
    120116                $pid = $params['pid']; 
    121117                $result = array(); 
    122                  
    123                 $process = new Process($GLOBALS['workflow']['workflowObjects']->getDBGalaxia()->Link_ID); 
     118 
     119                $process = &Factory::newInstance('Process'); 
    124120                $process->getProcess($pid); 
    125121                $result['wf_procname'] = $process->name; 
    126122                $result['wf_version'] = $process->version; 
    127123                $result['wf_description'] = $process->description; 
    128                  
    129                 $activ_manager = new ActivityManager($GLOBALS['workflow']['workflowObjects']->getDBGalaxia()->Link_ID); 
     124 
     125                $activ_manager = &Factory::newInstance('ActivityManager'); 
    130126                $result['wf_activities'] = $activ_manager->get_process_activities($pid); 
    131                  
    132                 $this->disconnect_all(); 
    133                  
    134                 return $result;  
     127 
     128                $this->disconnect_all(); 
     129 
     130                return $result; 
    135131        } 
    136132 
     
    148144                $itemsPerPage = isset($preferences['ui_items_per_page']) ? $preferences['ui_items_per_page'] : 15; 
    149145                $lightVersion = ((isset($preferences['use_light_interface']) ? $preferences['use_light_interface'] : 0) == 1); 
    150                 $paging = new Paging($itemsPerPage, $_POST); 
     146                $paging = Factory::newInstance('Paging', $itemsPerPage, $_POST); 
    151147 
    152148                /* define the sorting */ 
     
    263259                                else 
    264260                                        if ($row['wf_user'] != '') 
    265                                                 $row['wf_user_fullname'] = $GLOBALS['workflow']['factory']->getInstance('WorkflowLDAP')->getName($row['wf_user']); 
     261                                                $row['wf_user_fullname'] = Factory::getInstance('WorkflowLDAP')->getName($row['wf_user']); 
    266262 
    267263                                /* unset unneeded information */ 
     
    495491                } 
    496492 
    497                 $instance = new Instance($GLOBALS['workflow']['workflowObjects']->getDBGalaxia()->Link_ID); 
     493                $instance = &Factory::newInstance('Instance'); 
    498494                $instance->getInstance($instanceID); 
    499495 
    500                 $process = new Process($GLOBALS['workflow']['workflowObjects']->getDBGalaxia()->Link_ID); 
     496                $process = &Factory::newInstance('Process'); 
    501497                $process->getProcess($instance->pId); 
    502498 
     
    508504                        'wf_instance_id' => $instance->instanceId, 
    509505                        'wf_priority' => $instance->priority, 
    510                         'wf_owner' => $GLOBALS['workflow']['factory']->getInstance('WorkflowLDAP')->getName($instance->owner), 
     506                        'wf_owner' => Factory::getInstance('WorkflowLDAP')->getName($instance->owner), 
    511507                        'wf_next_activity' => $instance->nextActivity, 
    512                         'wf_next_user' => $GLOBALS['workflow']['factory']->getInstance('WorkflowLDAP')->getName($instance->nextUser), 
     508                        'wf_next_user' => Factory::getInstance('WorkflowLDAP')->getName($instance->nextUser), 
    513509                        'wf_name' => $instance->name, 
    514510                        'wf_category' => $instance->category, 
     
    526522                $result['wf_ended'] = ""; 
    527523 
    528                 $ldap = &$GLOBALS['workflow']['factory']->getInstance('WorkflowLDAP'); 
     524                $ldap = &Factory::getInstance('WorkflowLDAP'); 
    529525                foreach ($instance->workitems as $line) 
    530526                { 
     
    657653                $cod_process = array(); 
    658654 
    659                 $ldap = &$GLOBALS['workflow']['factory']->getInstance('WorkflowLDAP'); 
     655                $ldap = &Factory::getInstance('WorkflowLDAP'); 
    660656                $viewActivitiesID = array(); 
    661657                foreach ($result['data'] as $row) 
     
    726722                        /* paginate the result */ 
    727723                        $itemsPerPage = isset($_SESSION['phpgw_info']['workflow']['user']['preferences']['ui_items_per_page']) ? $_SESSION['phpgw_info']['workflow']['user']['preferences']['ui_items_per_page'] : 15; 
    728                         $paging = new Paging($itemsPerPage, $_POST); 
     724                        $paging = Factory::newInstance('Paging', $itemsPerPage, $_POST); 
    729725                        $output['instances'] = $paging->restrictItems($output['instances']); 
    730726                        $output['paging_links'] = $paging->commonLinks(); 
     
    740736        /** 
    741737         * Aplicacoes externas do usuario 
    742          * @return array  
     738         * @return array 
    743739         * @access public 
    744740         */ 
     
    746742        { 
    747743                $webserver_url = $_SESSION['phpgw_info']['workflow']['server']['webserver_url']; 
    748                 $templateServer = &$GLOBALS['workflow']['factory']->getInstance('TemplateServer'); 
     744                $templateServer = &Factory::getInstance('TemplateServer'); 
    749745 
    750746                /* load the sites that the user can access */ 
     
    10701066        function callVoipConnect($params) 
    10711067        { 
    1072                 $cachedLDAP = $GLOBALS['workflow']['factory']->newInstance('CachedLDAP'); 
     1068                $cachedLDAP = Factory::newInstance('CachedLDAP'); 
    10731069                $cachedLDAP->setOperationMode($cachedLDAP->OPERATION_MODE_LDAP); 
    10741070 
Note: See TracChangeset for help on using the changeset viewer.