Project

General

Profile

« Previous | Next » 

Revision 987

Added by aldus over 15 years ago

Bugfixes for ticket 728 (install without tables) - see changelog for details.

View differences:

initialize.php
51 51
	$string_dir_mode = STRING_DIR_MODE;
52 52
	define('OCTAL_DIR_MODE',(int) octdec($string_dir_mode));
53 53
	
54
	// get CAPTCHA and ASP settings
55
	$table = TABLE_PREFIX.'mod_captcha_control';
56
	if($get_settings = $database->query("SELECT * FROM $table LIMIT 1")) {
57
		if($get_settings->numRows() == 0) { die("CAPTCHA-Settings not found"); }
58
		$setting = $get_settings->fetchRow();
59
		if($setting['enabled_captcha'] == '1') define('ENABLED_CAPTCHA', true);
60
		else define('ENABLED_CAPTCHA', false);
61
		if($setting['enabled_asp'] == '1') define('ENABLED_ASP', true);
62
		else define('ENABLED_ASP', false);
63
		define('CAPTCHA_TYPE', $setting['captcha_type']);
64
		define('ASP_SESSION_MIN_AGE', (int)$setting['asp_session_min_age']);
65
		define('ASP_VIEW_MIN_AGE', (int)$setting['asp_view_min_age']);
66
		define('ASP_INPUT_MIN_AGE', (int)$setting['asp_input_min_age']);
54
	if (!defined("WB_INSTALL_PROCESS")) {
55
		// get CAPTCHA and ASP settings
56
		$table = TABLE_PREFIX.'mod_captcha_control';
57
		if($get_settings = $database->query("SELECT * FROM $table LIMIT 1")) {
58
			if($get_settings->numRows() == 0) { die("CAPTCHA-Settings not found"); }
59
			$setting = $get_settings->fetchRow();
60
			if($setting['enabled_captcha'] == '1') define('ENABLED_CAPTCHA', true);
61
			else define('ENABLED_CAPTCHA', false);
62
			if($setting['enabled_asp'] == '1') define('ENABLED_ASP', true);
63
			else define('ENABLED_ASP', false);
64
			define('CAPTCHA_TYPE', $setting['captcha_type']);
65
			define('ASP_SESSION_MIN_AGE', (int)$setting['asp_session_min_age']);
66
			define('ASP_VIEW_MIN_AGE', (int)$setting['asp_view_min_age']);
67
			define('ASP_INPUT_MIN_AGE', (int)$setting['asp_input_min_age']);
68
		}
67 69
	}
68

  
69 70
	// set error-reporting
70 71
	if(is_numeric(ER_LEVEL)) {
71 72
		error_reporting(ER_LEVEL);

Also available in: Unified diff