Revision 1865
Added by darkviper over 12 years ago
| initialize.php | ||
|---|---|---|
| 142 | 142 | 			@ini_set('magic_quotes_runtime', 0);
 | 
| 143 | 143 | } | 
| 144 | 144 | } | 
| 145 | // load db configuration --- | |
| 146 | 	if(defined('DB_TYPE')) {
 | |
| 147 | $aSqlData = array( 0 => DB_TYPE.'://'.DB_USERNAME.':'.DB_PASSWORD.'@'.DB_HOST.'/'.DB_NAME); | |
| 148 | 	}else {
 | |
| 149 | $aSqlData = readConfiguration($sDbConnectType); | |
| 150 | } | |
| 151 | // sanitize $_SERVER['HTTP_REFERER'] --- | |
| 152 | SanitizeHttpReferer(WB_URL); | |
| 153 | SetInstallPathConstants(); | |
| 145 | 154 | // define constant systemenvironment settings --- | 
| 146 | SetInstallPathConstants(); | |
| 147 | 155 | 	date_default_timezone_set('UTC');
 | 
| 148 | 156 | 	if(!defined('MAX_TIME')) { define('MAX_TIME', (pow(2, 31)-1)); } // 32-Bit Timestamp of 19 Jan 2038 03:14:07 GMT
 | 
| 149 | 157 | 	if(!defined('DO_NOT_TRACK')) { define('DO_NOT_TRACK', (isset($_SERVER['HTTP_DNT']))); }
 | 
| ... | ... | |
| 152 | 160 | 	if(!class_exists('WbAutoloader', false)){ include($sTmp); }
 | 
| 153 | 161 | WbAutoloader::doRegister(array(ADMIN_DIRECTORY=>'a', 'modules'=>'m')); | 
| 154 | 162 | // register TWIG autoloader --- | 
| 155 | // $sTmp = dirname(dirname(__FILE__)).'/include/Sensio/Twig/lib/Twig/Autoloader.php'; | |
| 156 | $sTmp = dirname(dirname(__FILE__)).'/include/Twig/Autoloader.php'; | |
| 163 | $sTmp = dirname(dirname(__FILE__)).'/include/Sensio/Twig/lib/Twig/Autoloader.php'; | |
| 157 | 164 | 	if(!class_exists('Twig_Autoloader', false)){ include($sTmp); }
 | 
| 158 | 165 | Twig_Autoloader::register(); | 
| 159 | 166 | // aktivate exceptionhandler --- | 
| 160 | 167 | 	if(!function_exists('globalExceptionHandler')) {
 | 
| 161 | 168 | include(dirname(__FILE__).'/globalExceptionHandler.php'); | 
| 162 | 169 | } | 
| 163 | // load db configuration --- | |
| 164 | 	if(defined('DB_TYPE')) {
 | |
| 165 | $aSqlData = array( 0 => DB_TYPE.'://'.DB_USERNAME.':'.DB_PASSWORD.'@'.DB_HOST.'/'.DB_NAME); | |
| 166 | 	}else {
 | |
| 167 | $aSqlData = readConfiguration($sDbConnectType); | |
| 168 | } | |
| 169 | // sanitize $_SERVER['HTTP_REFERER'] --- | |
| 170 | SanitizeHttpReferer(WB_URL); | |
| 171 | 170 | // --------------------------- | 
| 172 | 171 | // Create global database instance --- | 
| 173 | 172 | $database = WbDatabase::getInstance(); | 
| ... | ... | |
| 283 | 282 | 	Translate::getInstance()->initialize('en',
 | 
| 284 | 283 | 	                                     (defined('DEFAULT_LANGUAGE') ? DEFAULT_LANGUAGE : ''), 
 | 
| 285 | 284 | 	                                     (defined('LANGUAGE') ? LANGUAGE : ''), 
 | 
| 286 | 'WbOldStyle'); | |
| 285 | 'WbOldStyle', | |
| 286 | Translate::CACHE_ENABLED); | |
| 287 | 287 | // *** END OF FILE *********************************************************************** | 
| 288 | 288 |  | 
Also available in: Unified diff
update initialize.php for changed Twig-dir and activated cache in Translate
initialize can handle now the new setup.ini format also.