Changeset 499
- Timestamp:
- 06/08/08 10:49:46 (7 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 modified
-
modules/base/updatesApply.php (added)
-
owa_caller.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/owa_caller.php
r498 r499 79 79 $this->start_time = owa_lib::microtime_float(); 80 80 81 /* LOAD CONFIG FILE */ 82 81 83 $file = OWA_BASE_DIR.DIRECTORY_SEPARATOR.'conf'.DIRECTORY_SEPARATOR.'owa-config.php'; 82 84 … … 89 91 endif; 90 92 93 /* SETUP STORAGE ENGINE */ 94 95 // Must be called before any entities are created 91 96 92 97 if (!defined('OWA_DB_TYPE')): … … 96 101 endif; 97 102 98 99 100 // Parent Constructor. Sets default config and error logger103 /* SETUP CONFIGURATION AND ERROR LOGGER */ 104 105 // Parent Constructor. Sets default config entity and error logger 101 106 $this->owa_base(); 102 107 103 108 // Log version debug 104 109 $this->e->debug(sprintf('*** Starting Open Web Analytics v%s. Running under PHP v%s (%s) ***', OWA_VERSION, PHP_VERSION, PHP_OS)); 105 110 111 // Backtrace. handy for debugging who called OWA 106 112 //$bt = debug_backtrace(); 107 113 //$this->e->debug($bt[4]); 108 114 109 110 /**111 * Super Global Default Config Overrides112 *113 * These are constants that can be defined in the config file, plugin, or caller114 * the will override default config values115 */116 117 118 115 /* APPLY CONFIGURATION FILE OVERRIDES */ 119 120 116 121 117 if ($config_file_exists == true): … … 149 145 150 146 endif; 151 152 //$this->e->debug('PURL: '.OWA_PUBLIC_URL); 153 147 154 148 /* DATABASE CONFIGURATION */ 149 150 // Can either be set by calling application or the config file. 155 151 // This needs to come before the fetch of user overrides from the DB 156 152 // Constants defined in the config file have the final word … … 160 156 if (!defined('OWA_DB_TYPE')): 161 157 define('OWA_DB_TYPE', $config['db_type']); 162 e lse:163 $this->c->set('base', 'db_type', OWA_DB_TYPE);164 endif;165 158 endif; 159 160 $this->c->set('base', 'db_type', OWA_DB_TYPE); 161 166 162 if (!defined('OWA_DB_NAME')): 167 163 define('OWA_DB_NAME', $config['db_name']); 168 e lse:169 $this->c->set('base', 'db_name', OWA_DB_NAME);170 endif;171 164 endif; 165 166 $this->c->set('base', 'db_name', OWA_DB_NAME); 167 172 168 if (!defined('OWA_DB_HOST')): 173 169 define('OWA_DB_HOST', $config['db_host']); 174 e lse:175 $this->c->set('base', 'db_host', OWA_DB_HOST);176 endif;177 170 endif; 171 172 $this->c->set('base', 'db_host', OWA_DB_HOST); 173 178 174 if (!defined('OWA_DB_USER')): 179 175 define('OWA_DB_USER', $config['db_user']); 180 e lse:181 $this->c->set('base', 'db_user', OWA_DB_USER);182 endif;176 endif; 177 178 $this->c->set('base', 'db_user', OWA_DB_USER); 183 179 184 180 if (!defined('OWA_DB_PASSWORD')): 185 181 define('OWA_DB_PASSWORD', $config['db_password']); 186 else: 187 $this->c->set('base', 'db_password', OWA_DB_PASSWORD); 188 endif; 182 endif; 183 184 $this->c->set('base', 'db_password', OWA_DB_PASSWORD); 185 189 186 190 187 /* APPLY USER CONFIGURATION OVERRIDES FROM DATABASE */ 191 188 189 if (!defined('OWA_CONFIG_DO_NOT_FETCH_FROM_DB')): 190 $this->c->set('base', 'do_not_fetch_config_from_db', $config['do_not_fetch_config_from_db']); 191 else: 192 $this->c->set('base', 'do_not_fetch_config_from_db', OWA_CONFIG_DO_NOT_FETCH_FROM_DB); 193 endif; 194 192 195 // Applies config from db or cache 193 // needed for installs when the configuration table does not exist.196 // check here is needed for installs when the configuration table does not exist. 194 197 if ($this->c->get('base', 'do_not_fetch_config_from_db') != true): 195 198 $this->c->load($this->c->get('base', 'configuration_id'));
