getDB(); switch ($STEP) { case 1: echo '

the table blocks will be created

'; echo '

the table log will be created

'; echo 'Upgrade'; break; case 2: $db->isTransactionSupported() and $db->startTransaction(); foreach ($TABLESDEF as $tabledef) { $tableInfo = MFDBTableInfo::fromXML($tabledef); if ($tableInfo->getName() == 'blocks') { $db->createTable($tableInfo); echo '

'.$tableInfo->getName().' created

'; } if ($tableInfo->getName() == 'log') { $db->createTable($tableInfo); echo '

'.$tableInfo->getName().' created

'; } } $db->table('installinfo')->delete(array('type' =>'system', 'key' => 'mcms')); $db->table('installinfo')->delete(array('type' =>'system', 'key' => 'mcmsdb')); $db->table('installinfo')->insert(array('type' =>'system', 'key' => 'mcms', 'version' => MCMS, 'attrib' => 0)); $db->table('installinfo')->insert(array('type' =>'system', 'key' => 'mcmsdb', 'version' => $TABLESDEF['version'], 'attrib' => 0)); $db->isTransactionSupported() and $db->commit(); echo '

upgrade finished, remove the install folder and return to your system

'; echo 'Back to main page'; break; }