Changeset 9606ffb in github
- Timestamp:
- Jun 25, 2006 5:18:00 AM (7 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- fb5f4f3
- Parents:
- cbdd6dc
- Files:
-
- 2 edited
-
config/main.inc.php.dist (modified) (2 diffs)
-
program/include/main.inc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
config/main.inc.php.dist
r1966c53 r9606ffb 174 174 */ 175 175 176 // try to load host-specific configuration 177 $rcmail_config['include_host_config'] = FALSE; 178 176 179 177 180 /***** these settings can be overwritten by user's preferences *****/ … … 201 204 $rcmail_config['javascript_config'] = array('read_when_deleted', 'flag_for_deletion'); 202 205 203 /***** try to load host-specific configuration *****/204 205 @include($_SERVER['HTTP_HOST'].'.inc.php');206 207 206 208 207 // end of config file -
program/include/main.inc
rd2a9dbb r9606ffb 43 43 include_once('config/main.inc.php'); 44 44 $CONFIG = is_array($rcmail_config) ? $rcmail_config : array(); 45 46 // load host-specific configuration 47 rcmail_load_host_config(&$CONFIG); 48 45 49 $CONFIG['skin_path'] = $CONFIG['skin_path'] ? preg_replace('/\/$/', '', $CONFIG['skin_path']) : 'skins/default'; 46 50 … … 126 130 127 131 register_shutdown_function('rcmail_shutdown'); 132 } 133 134 135 // load a host-specific config file if configured 136 function rcmail_load_host_config(&$config) 137 { 138 $fname = NULL; 139 140 if (is_array($config['include_host_config'])) 141 $fname = $config['include_host_config'][$_SERVER['HTTP_HOST']]; 142 else if (!empty($config['include_host_config'])) 143 $fname = preg_replace('/[^a-z0-9\.\-_]/i', '', $_SERVER['HTTP_HOST']) . '.inc.php'; 144 145 if ($fname && is_file('config/'.$fname)) 146 { 147 include('config/'.$fname); 148 $config = array_merge($config, $rcmail_config); 149 } 128 150 } 129 151
Note: See TracChangeset
for help on using the changeset viewer.
