Revision 1589
Added by Dietmar almost 13 years ago
index.php | ||
---|---|---|
58 | 58 |
// check if it is neccessary to start the uograde-script |
59 | 59 |
$sql = 'SELECT `value` FROM `'.TABLE_PREFIX.'settings` WHERE `name`=\'wb_revision\''; |
60 | 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 |
} |
|
61 |
} |
|
62 |
if (version_compare($wb_revision, REVISION ) < 0) { |
|
63 |
if(!headers_sent()) { |
|
64 |
header('Location: '.WB_URL.'/upgrade-script.php'); |
|
65 |
exit; |
|
71 | 66 |
} else { |
72 |
$msg .= (file_exists(WB_PATH.'/upgrade-script.php') ? ''.$MESSAGE['START_UPGRADE_SCRIPT_EXISTS'].'<br />' : ''); |
|
67 |
echo "<p style=\"text-align:center;\"> The <strong>upgrade script</strong> could not be start automatically.\n" . |
|
68 |
"Please click <a style=\"font-weight:bold;\" " . |
|
69 |
"href=\"".WB_URL."/upgrade-script.php\">on this link</a> to start the script!</p>\n"; |
|
70 |
exit; |
|
73 | 71 |
} |
74 | 72 |
} |
73 |
$msg .= ''.$MESSAGE['START_UPGRADE_SCRIPT_EXISTS'].'<br />'; |
|
75 | 74 |
} |
76 | 75 |
|
77 | 76 |
// Setup template object, parse vars to it, then parse it |
Also available in: Unified diff
fixed starting upgrade-script if missing revision in settings