* @package EDK */ require_once 'common/admin/option_acache.php'; require_once 'update/CCPDB/xml.parser.php'; require_once 'update/CCPDB/file.cacher.php'; require_once 'update/CCPDB/db.updater.php'; $page = new Page('Administration - Upgrade'); $page->setAdmin(); $page_error = array(); //torch the update definition file. This forces it to be redownloaded. if (isset($_GET['refresh'])) { if (file_exists(KB_CACHEDIR . "/update/update.xml")) { unlink(KB_CACHEDIR . "/update/update.xml"); } } $parser = new UpdateXMLParser(); //check for errors switch ($parser->getXML()) { //not validated case 3: $page_error[] = "The updates descriptor file was downloaded, but it has failed to validate correctly."; break; //file not found //file not found case 4: $page_error[] = "Could not download the update descriptor file. It may be that the host is down or that remote connections are disallowed."; break; } $parser->retrieveData(); if (isset($_GET['reset_db'])) { Config::set('upd_dbVersion', $parser->getLatestDBVersion());
/** * Updates status xml if necessary. */ public static function checkStatus() { require_once 'update/CCPDB/xml.parser.php'; $xml = new UpdateXMLParser(); if ($xml->getXML() < 3) { $xml->retrieveData(); update::$codeVersion = $xml->getLatestCodeVersion(); update::$dbVersion = $xml->getLatestDBVersion(); } return; }