예제 #1
0
파일: upgrade.php 프로젝트: lmcro/fcms
/**
 * displayUpgradeDatabase
 * 
 * @return void
 */
function displayUpgradeDatabase()
{
    $fcmsError = FCMS_Error::getInstance();
    $fcmsDatabase = Database::getInstance($fcmsError);
    $fcmsUpgrade = new Upgrade($fcmsError, $fcmsDatabase);
    $latestVersion = $_SESSION['latestVersion'];
    if (!$fcmsUpgrade->upgrade()) {
        // Jacked html, but should work
        displayHeader();
        $fcmsError->displayError();
        displayFooter();
        return;
    }
    if (!$fcmsUpgrade->updateCurrentVersion($latestVersion)) {
        // Jacked html, but should work
        displayHeader();
        $fcmsError->displayError();
        displayFooter();
        return;
    }
    header('Location: upgrade.php?manual=1');
}