vim: expandtab sw=4 ts=4 sts=4: **********************************************************************/ require_once 'admin.inc.php'; require_once INCLUDE_DIR . 'class.upgrader.php'; //$_SESSION['ost_upgrader']=null; $upgrader = new Upgrader(TABLE_PREFIX, UPGRADE_DIR . 'streams/'); $errors = array(); if ($_POST && $_POST['s'] && !$upgrader->isAborted()) { switch (strtolower($_POST['s'])) { case 'prereq': if (!$ost->isUpgradePending()) { $errors['err'] = __('Nothing to do! System already upgraded to the current version'); } elseif (!$upgrader->isUpgradable()) { $errors['err'] = __('The upgrader does NOT support upgrading from the current vesion!'); } elseif (!$upgrader->check_prereq()) { $errors['prereq'] = __('Minimum requirements not met! Refer to Release Notes for more information'); } elseif (!strcasecmp(basename(CONFIG_FILE), 'settings.php')) { $errors['err'] = __('Config file rename required to continue!'); } else { $upgrader->setState('upgrade'); } break; case 'upgrade': //Manual upgrade.... when JS (ajax) is not supported. if ($upgrader->getTask()) { $upgrader->doTask(); } elseif ($ost->isUpgradePending() && $upgrader->isUpgradable()) { $upgrader->upgrade(); } elseif (!$ost->isUpgradePending()) { $upgrader->setState('done');