Project

General

Profile

« Previous | Next » 

Revision 1963

Added by darkviper about 11 years ago

adding SERVER_TIMEZONE to table settings
insert date_default_timezone_set( SERVER_TIMEZONE ) into /framework/initialize.php
some little optimations in update-script.php

View differences:

initialize.php
187 187
// sanitize $_SERVER['HTTP_REFERER'] ---
188 188
	SanitizeHttpReferer(WB_URL); 
189 189
	SetInstallPathConstants();
190
// define constant systemenvironment settings ---
191
	date_default_timezone_set('UTC');
192
	if(!defined('MAX_TIME')) { define('MAX_TIME', (pow(2, 31)-1)); } // 32-Bit Timestamp of 19 Jan 2038 03:14:07 GMT
193
	$sTmp = (isset($_SERVER['HTTP_DNT']) && $_SERVER['HTTP_DNT'] != '') ? $_SERVER['HTTP_DNT'] : '0';
194
	if(!defined('DO_NOT_TRACK')) { define('DO_NOT_TRACK', ($sTmp[0] == '1')); }
195 190
// register WB basic autoloader ---
196 191
	$sTmp = dirname(__FILE__).'/WbAutoloader.php';
197 192
	if(!class_exists('WbAutoloader')){ 
......
266 261
		@session_start();
267 262
		define('SESSION_STARTED', true);
268 263
	}
264
// get/set server timezone ---
265
	if(!defined('SERVER_TIMEZONE')) { define('SERVER_TIMEZONE', "UTC"); }
266
	date_default_timezone_set( SERVER_TIMEZONE );
267
	if(!defined('MAX_TIME')) { define('MAX_TIME', (pow(2, 31)-1)); } // 32-Bit Timestamp of 19 Jan 2038 03:14:07 GMT
268
	$sTmp = (isset($_SERVER['HTTP_DNT']) && $_SERVER['HTTP_DNT'] != '') ? $_SERVER['HTTP_DNT'] : '0';
269
	if(!defined('DO_NOT_TRACK')) { define('DO_NOT_TRACK', ($sTmp[0] == '1')); }
269 270
// get/set users timezone ---
270 271
	if(!defined('TIMEZONE')) { define('TIMEZONE', (isset($_SESSION['TIMEZONE']) ? $_SESSION['TIMEZONE'] : DEFAULT_TIMEZONE)); }
271 272
	if(!defined('DATE_FORMAT')) { define('DATE_FORMAT', (isset($_SESSION['DATE_FORMAT']) ? $_SESSION['DATE_FORMAT'] : DEFAULT_DATE_FORMAT)); }
......
341 342
										 'WbOldStyle',
342 343
										 (DEBUG ? Translate::CACHE_DISABLED|Translate::KEEP_MISSING : 0)
343 344
										);
344
	if(!class_exists('PasswordHash')) { include(WB_PATH.'/include/phpass/PasswordHash.php'); }
345

  
345
	if(!class_exists('PasswordHash', false)) { include(WB_PATH.'/include/phpass/PasswordHash.php'); }
346 346
	$oPass = Password::getInstance(new PasswordHash(Password::CRYPT_LOOPS_DEFAULT, Password::HASH_TYPE_AUTO));
347 347
	if(defined('PASSWORD_CRYPT_LOOPS')) { $oPass->setIteration(PASSWORD_CRYPT_LOOPS); }
348 348
	if(defined('PASSWORD_HASH_TYPES'))  { $oPass->setHashType(PASSWORD_HASH_TYPES); }

Also available in: Unified diff