Project

General

Profile

« Previous | Next » 

Revision 2029

Added by darkviper over 10 years ago

! initialize.php now blocking PHP-versions <5.3.2 and PHP with magic_quotes enabled
! droplets some new/recoded droplets added, some old ones removed

View differences:

initialize.php
205 205
	$starttime = array_sum(explode(" ",microtime()));
206 206
	$iPhpDeclaredClasses = sizeof(get_declared_classes());
207 207
	$sDbConnectType = 'url'; // depending from class WbDatabase it can be 'url' or 'dsn'
208
// PHP less then 5.3.2 is prohibited ---
209
	if (version_compare(PHP_VERSION, '5.3.2', '<')) {
210
		$sMsg = '<p style="color: #ff0000;">WebsiteBaker is not able to run with PHP-Version less then 5.3.2!!<br />'
211
		      . 'Please change your PHP-Version to any kind from 5.3.2 and up!<br />'
212
		      . 'If you have problems to solve that, ask your hosting provider for it.<br  />'
213
		      . 'The very best solution is the use of PHP-5.4 and up</p>';
214
		die($sMsg);
215
	}
208 216
// disable all kind of magic_quotes in PHP versions before 5.4 ---
209
	if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
217
	if (function_exists('get_magic_quotes_gpc') && filter_var(get_magic_quotes_gpc(), FILTER_VALIDATE_BOOLEAN)) {
210 218
		$sMsg = '<p style="color: #ff0000;">WebsiteBaker is not able to run with magic_quotes=on!!<br />'
211 219
		      . 'Please change your PHP-ini or add a _htaccess file to switch this setting to off!<br />'
212 220
		      . 'If you have problems to solve that, ask your hosting provider for it.<br  />'
......
223 231
	if(!class_exists('WbAutoloader')){ 
224 232
		include($sTmp);
225 233
	}
226
	WbAutoloader::doRegister(array(ADMIN_DIRECTORY=>'a', 'modules'=>'m'));
234
	WbAutoloader::doRegister(array(ADMIN_DIRECTORY=>'a', 'modules'=>'m', 'templates'=>'t', 'include'=>'i'));
227 235
// instantiate and initialize adaptor for temporary registry replacement ---
228 236
	WbAdaptor::getInstance()->getWbConstants();
229 237
// register TWIG autoloader ---

Also available in: Unified diff