Ignore:
Timestamp:
04/06/10 10:52:46 (14 years ago)
Author:
pedroerp
Message:

Ticket #993 - Melhorias internas na classe 'Settings' do módulo.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/workflow/branches/993/inc/class.WorkflowObjects.inc.php

    r2418 r2429  
    2626        private $cache = array(); 
    2727 
    28         /** 
    29          * TODO We should remove this method.. 
    30          * Monta o ambiente requerido pelos métodos (somente se for necessário) 
    31          * @param bool $requireGalaxia Indica que os métodos da engine Galaxia são necessários 
    32          * @return void 
    33          * @access public 
    34          */ 
    35         private function assureEnvironment($requireGalaxia = true) 
    36         { 
    37                 if (!defined('PHPGW_API_INC')) 
    38                         define('PHPGW_API_INC', dirname(__FILE__) . '/../../phpgwapi/inc'); 
    39  
    40                 if ($requireGalaxia) 
    41                 { 
    42                         if (!function_exists('galaxia_get_config_values')) 
    43                         { 
    44                                 require_once 'engine/config.ajax.inc.php' ; 
    45                                 require_once 'engine/class.ajax_config.inc.php' ; 
    46                         } 
    47                 } 
    48         } 
    4928 
    5029        /** 
     
    5736                if (!isset($this->cache['DBGalaxia'])) 
    5837                { 
    59                         /* make sure the environment is set */ 
    60                         $this->assureEnvironment(); 
    61  
    6238                        /* check if all configuration is OK */ 
    6339                        $dedicatedDB = true; 
     
    10581                if (!isset($this->cache['DBExpresso'])) 
    10682                { 
    107                         /* make sure the environment is set */ 
    108                         $this->assureEnvironment(false); 
    109  
    11083                        /* connect to the database */ 
    11184                        $this->cache['DBExpresso'] = Factory::newInstance('WorkflowWatcher', Factory::newInstance('db')); 
     
    136109                if (!isset($this->cache['DBWorkflow'])) 
    137110                { 
    138                         /* make sure the environment is set */ 
    139                         $this->assureEnvironment(); 
    140  
    141111                        /* connect to the database */ 
    142112                        $this->cache['DBWorkflow'] = Factory::newInstance('WorkflowWatcher', Factory::newInstance('db')); 
     
    167137                if (!isset($this->cache['ldap'])) 
    168138                { 
    169                         /* make sure the environment is set */ 
    170                         $this->assureEnvironment(); 
    171  
    172139                        /* which ldap host to connect? */ 
    173140                        $ldapHost = Settings::get('workflow', 'ldap', 'host'); 
     
    190157                                                        ); 
    191158                } 
    192  
    193159                return $this->cache['ldap']; 
    194160        } 
Note: See TracChangeset for help on using the changeset viewer.