3.10 -- requires a file openconf/upgrade/upgrade-3.0-3.1.inc) $OC_upgradeAR = array( '3.0' => '3.10', '3.10' => '3.20', '3.20' => '3.21', '3.21' => '3.30', '3.30' => '3.40', '3.40' => '3.41', '3.41' => '3.42', '3.42' => '3.50', '3.50' => '4.00', '4.00' => '4.01', '4.01' => '4.02', '4.02' => '4.10', '4.10' => '4.11', '4.11' => '4.12', '4.12' => '5.00', '5.00' => '5.10', '5.10' => 'done' ); beginChairSession(); printHeader("OpenConf Upgrade", 1); if (!isset($OC_upgradeAR[$OC_configAR['OC_version']])) { // valid current version? warn('Current version unknown or no upgrade available.'); } elseif ($OC_upgradeAR[$OC_configAR['OC_version']] == 'done') { // done? print '

The upgrade process appears to have been previously completed.

'; } elseif (isset($_POST['a']) && ($_POST['a'] == 'u')) { // ready to upgrade? // Check for valid submission if (!validToken('chair')) { warn('Invalid submission'); } // Upgrade print '

Upgrading from ' . $OC_configAR['OC_version'] . ' to ' . $OC_upgradeAR[$OC_configAR['OC_version']] . ' ...

'; $upgradeFile = '../upgrade/upgrade-' . $OC_configAR['OC_version'] . '-' . $OC_upgradeAR[$OC_configAR['OC_version']] . '.inc'; if (is_file($upgradeFile)) { require_once($upgradeFile); // any modules to upgrade? if (isset($upgradeModulesAR)) { foreach ($upgradeModulesAR as $module) { // only upgrade if module installed if (oc_moduleInstalled($module)) { $moduleUpgradeFile = '../modules/' . $module . '/upgrade/' . $upgradeFile; if (is_file($moduleUpgradeFile)) { require_once($moduleUpgradeFile); } } } } print '

Done

'; $OC_configAR['OC_version'] = $OC_upgradeAR[$OC_configAR['OC_version']]; if ($OC_upgradeAR[$OC_configAR['OC_version']] == 'done') { // done? print '

The upgrade process has completed. You may delete the upgrade directory.

Proceed to the main Chair Page

OpenConf logo

'; } else { // keep going ... print '

'; } } else { warn('The upgrade file ' . $upgradeFile . ' appears to be missing'); } } else { // first script call print '

This upgrade will take you through updating your OpenConf installation. Depending on whether you have kept up with OpenConf upgrades, you may have to go through multiple upgrade steps. Click (once) on the Upgrade buttons that are displayed until you are informed that the upgrade has been completed.

'; } printFooter(); ?>