Revision 1560
Added by Dietmar almost 13 years ago
index.php | ||
---|---|---|
19 | 19 |
require_once(WB_PATH.'/framework/class.admin.php'); |
20 | 20 |
$admin = new admin('Start','start'); |
21 | 21 |
// --------------------------------------- |
22 |
|
|
22 | 23 |
if(defined('FINALIZE_SETUP')) { |
23 | 24 |
require_once(WB_PATH.'/framework/functions.php'); |
24 | 25 |
$dirs = array( 'modules' => WB_PATH.'/modules/', |
... | ... | |
48 | 49 |
} |
49 | 50 |
} |
50 | 51 |
$sql = 'DELETE FROM `'.TABLE_PREFIX.'settings` WHERE `name`=\'FINALIZE_SETUP\''; |
51 |
$database->query($sql);
|
|
52 |
if($database->query($sql)) { }
|
|
52 | 53 |
} |
53 | 54 |
// --------------------------------------- |
55 |
// 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; |
|
67 |
} |
|
68 |
} |
|
69 |
} |
|
70 |
|
|
54 | 71 |
// Setup template object, parse vars to it, then parse it |
55 | 72 |
$ThemePath = realpath(WB_PATH.$admin->correct_theme_source('start.htt')); |
56 | 73 |
// Create new template object |
Also available in: Unified diff
upgrade script start automatically after uploading a new version and login to the backend