<?php require_once('includes/requireadminlogin.inc.php'); require_once('includes/upgrade/upgrade.inc.php'); require_once('includes/phptools/simpleddlparser.inc.php'); $script_ok=upgrade_config_scripts($_SESSION[SESSKEYPFX.'_upgrade']); $DBConn->connect(); $DBConn->begin(true); $unpackreturned=$_SESSION[SESSKEYPFX.'_upgrade']['unpack.returned.reserv']; $createdbsql=str_replace('`reserv`.','',$unpackreturned['createdb.sql']); upgrade_database( $DBConn, $createdbsql, $Config->TablePrefix[$Config->UpgradeInfo['briefname']] ); $DBConn->commit(); header("Content-Type: text/plain; charset=utf8"); if ($script_ok) { unset($_SESSION['uniwits.upgrade']); echo 'OK'; } else { header("HTTP/1.1 500 Error"); echo 'ERROR'; } ?>