updated install.php -> v0.9.2.1-dev

This commit is contained in:
Savetheinternet 2011-04-20 05:22:59 +10:00
parent f7ed681eac
commit 78aba88f46

View File

@ -22,11 +22,14 @@
// Check the version number // Check the version number
$version = file_get_contents($config['has_installed']); $version = file_get_contents($config['has_installed']);
if(empty($version))
$version = 'v0.9.1';
switch($version) { switch($version) {
case '': case '':
case 'v0.9': case 'v0.9':
case 'v0.9.1': case 'v0.9.1':
// Upgrading to v0.9.2-dev // Upgrade to v0.9.2-dev
$boards = listBoards(); $boards = listBoards();
foreach($boards as &$_board) { foreach($boards as &$_board) {
@ -48,7 +51,7 @@
query(sprintf("CREATE TABLE IF NOT EXISTS `news` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` text NOT NULL, `time` int(11) NOT NULL, `subject` text NOT NULL, `body` text NOT NULL, UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;", $board['uri'])) or error(db_error()); query(sprintf("CREATE TABLE IF NOT EXISTS `news` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` text NOT NULL, `time` int(11) NOT NULL, `subject` text NOT NULL, `body` text NOT NULL, UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;", $board['uri'])) or error(db_error());
$page['title'] = 'Upgraded'; $page['title'] = 'Upgraded';
$page['body'] = '<p style="text-align:center">Successfully upgraded from v0.9 (or v0.9.1) to <strong>' . VERSION . '</strong>.</p>'; $page['body'] = '<p style="text-align:center">Successfully upgraded from ' . $version . ' to <strong>' . VERSION . '</strong>.</p>';
break; break;
default: default:
$page['title'] = 'Unknown version'; $page['title'] = 'Unknown version';