Project

General

Profile

« Previous | Next » 

Revision 1561

Added by Dietmar almost 13 years ago

secureForm Fix for hosting with load balancing

View differences:

index.php
52 52
	if($database->query($sql)) { }
53 53
}
54 54
// ---------------------------------------
55

  
55 56
// check if it is neccessary to start the uograde-script
56
$sql = 'SELECT `value` FROM `'.TABLE_PREFIX.'settings` WHERE `name`=\'wb_revision\'';
57
if($wb_revision=$database->get_one($sql)) {
58
	if (version_compare($wb_revision, REVISION ) < 0) {
59
		if(!headers_sent()) {
60
			header('Location: '.WB_URL.'/upgrade-script.php');
61
		    exit;
62
		} else {
63
		    echo "<p style=\"text-align:center;\"> The <strong>upgrade script</strong> could not be start automatically.\n" .
64
		         "Please click <a style=\"font-weight:bold;\" " .
65
		         "href=\"".WB_URL."/upgrade-script.php\">on this link</a> to start the script!</p>\n";
66
		    exit;
57
if(file_exists(WB_PATH.'/upgrade-script.php')) {
58
	// check if it is neccessary to start the uograde-script
59
	$sql = 'SELECT `value` FROM `'.TABLE_PREFIX.'settings` WHERE `name`=\'wb_revision\'';
60
	if($wb_revision=$database->get_one($sql)) {
61
		if (version_compare($wb_revision, REVISION ) < 0) {
62
			if(!headers_sent()) {
63
				header('Location: '.WB_URL.'/upgrade-script.php');
64
			    exit;
65
			} else {
66
			    echo "<p style=\"text-align:center;\"> The <strong>upgrade script</strong> could not be start automatically.\n" .
67
			         "Please click <a style=\"font-weight:bold;\" " .
68
			         "href=\"".WB_URL."/upgrade-script.php\">on this link</a> to start the script!</p>\n";
69
			    exit;
70
			}
67 71
		}
68 72
	}
69 73
}
......
114 118
}
115 119

  
116 120
$msg = (file_exists(WB_PATH.'/install/')) ?  $MESSAGE['START']['INSTALL_DIR_EXISTS'] : '';
117
$msg .= (file_exists(WB_PATH.'/upgrade-script.php')) ? '<br />'.$MESSAGE['START_UPGRADE_SCRIPT_EXISTS'] : '';
121
$msg .= (file_exists(WB_PATH.'/upgrade-script.php') ? '<br />'.$MESSAGE['START_UPGRADE_SCRIPT_EXISTS'] : '');
118 122

  
119 123
// Check if installation directory still exists
120 124
if(file_exists(WB_PATH.'/install/') || file_exists(WB_PATH.'/upgrade-script.php') ) {

Also available in: Unified diff