Project

General

Profile

« Previous | Next » 

Revision 1560

Added by Dietmar over 12 years ago

upgrade script start automatically after uploading a new version and login to the backend

View differences:

branches/2.8.x/CHANGELOG
11 11
! = Update/Change
12 12

  
13 13
=========================== add small Features 2.8.2 ==========================
14
04 Jan-2012 Build 1560 Dietmar Woellbrink (Luisehahne)
15
! upgrade script start automatically after uploading a new version and login to the backend
14 16
04 Jan-2012 Build 1559 Dietmar Woellbrink (Luisehahne)
15
! change quickSkin to alpha status, ATTANTION rename folder to quickSkin_alpha 
17
! change quickSkin to alpha status, ATTENTION rename folder to quickSkin_alpha 
16 18
02 Jan-2012 Build 1558 Dietmar Woellbrink (Luisehahne)
17 19
# remove backslash in $_CONFIG['extensions_dir']
18 20
! update editor.css for allcssand round  (Tks to Ruebenwurzel)
branches/2.8.x/wb/admin/start/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
branches/2.8.x/wb/admin/interface/version.php
52 52

  
53 53
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
54 54
if(!defined('VERSION')) define('VERSION', '2.8.2');
55
if(!defined('REVISION')) define('REVISION', '1559');
55
if(!defined('REVISION')) define('REVISION', '1560');
56 56
if(!defined('SP')) define('SP', 'SP2');

Also available in: Unified diff