- Timestamp:
- 04/06/10 10:52:46 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/workflow/branches/993/inc/class.WorkflowObjects.inc.php
r2418 r2429 26 26 private $cache = array(); 27 27 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ários32 * @return void33 * @access public34 */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 }49 28 50 29 /** … … 57 36 if (!isset($this->cache['DBGalaxia'])) 58 37 { 59 /* make sure the environment is set */60 $this->assureEnvironment();61 62 38 /* check if all configuration is OK */ 63 39 $dedicatedDB = true; … … 105 81 if (!isset($this->cache['DBExpresso'])) 106 82 { 107 /* make sure the environment is set */108 $this->assureEnvironment(false);109 110 83 /* connect to the database */ 111 84 $this->cache['DBExpresso'] = Factory::newInstance('WorkflowWatcher', Factory::newInstance('db')); … … 136 109 if (!isset($this->cache['DBWorkflow'])) 137 110 { 138 /* make sure the environment is set */139 $this->assureEnvironment();140 141 111 /* connect to the database */ 142 112 $this->cache['DBWorkflow'] = Factory::newInstance('WorkflowWatcher', Factory::newInstance('db')); … … 167 137 if (!isset($this->cache['ldap'])) 168 138 { 169 /* make sure the environment is set */170 $this->assureEnvironment();171 172 139 /* which ldap host to connect? */ 173 140 $ldapHost = Settings::get('workflow', 'ldap', 'host'); … … 190 157 ); 191 158 } 192 193 159 return $this->cache['ldap']; 194 160 }
Note: See TracChangeset
for help on using the changeset viewer.