| Revive Adserver | | http://www.revive-adserver.com | | | | Copyright: See the COPYRIGHT.txt file. | | License: GPLv2 or later, see the LICENSE.txt file. | +---------------------------------------------------------------------------+ */ /** * integrity check utility */ require_once './init.php'; require_once MAX_PATH . '/lib/OA/Upgrade/DB_Integrity.php'; if (array_key_exists('xajax', $_POST)) { } require_once MAX_PATH . '/www/devel/lib/xajax.inc.php'; $oIntegrity = new OA_DB_Integrity(); $aAppInfo = $oIntegrity->getVersion(); if (array_key_exists('btn_data_load_dryrun', $_POST)) { $options = array('dryrun' => true, 'directory' => MAX_PATH . '/tests/datasets/mdb2schema/', 'datafile' => $_POST['datafile'], 'prefix' => $GLOBALS['_MAX']['CONF']['table']['prefix'], 'dbname' => $GLOBALS['_MAX']['CONF']['database']['name'], 'appver' => $aAppInfo['versionApp'], 'schema' => $aAppInfo['versionSchema']); $aMessages = $oIntegrity->loadData($options); if (PEAR::isError($aMessages)) { $aMessages[] = $aMessages->getUserInfo(); } } else { if (array_key_exists('btn_data_load', $_POST)) { $options = array('dryrun' => false, 'directory' => MAX_PATH . '/tests/datasets/mdb2schema/', 'datafile' => $_POST['datafile'], 'prefix' => $GLOBALS['_MAX']['CONF']['table']['prefix'], 'dbname' => $GLOBALS['_MAX']['CONF']['database']['name'], 'appver' => $aAppInfo['versionApp'], 'schema' => $aAppInfo['versionSchema']); $aMessages = $oIntegrity->loadData($options); if (PEAR::isError($aMessages)) { $aMessages[] = $aMessages->getUserInfo(); } }
| Revive Adserver | | http://www.revive-adserver.com | | | | Copyright: See the COPYRIGHT.txt file. | | License: GPLv2 or later, see the LICENSE.txt file. | +---------------------------------------------------------------------------+ */ /** * integrity check utility */ require_once './init.php'; require_once MAX_PATH . '/lib/OA/Upgrade/DB_Integrity.php'; if (array_key_exists('xajax', $_POST)) { } require_once MAX_PATH . '/www/devel/lib/xajax.inc.php'; $oIntegrity = new OA_DB_Integrity(); $aAppInfo = $oIntegrity->getVersion(); if (array_key_exists('btn_integ_check', $_POST)) { $version = $_POST['version']; if ($oIntegrity->init($version)) { $oIntegrity->checkIntegrity(); $aTasksConstructive = $oIntegrity->aTasksConstructiveAll; $aTasksDestructive = $oIntegrity->aTasksDestructiveAll; $aMessages = $oIntegrity->getMessages(); $file_schema = $oIntegrity->getFileSchema(); $file_changes = $oIntegrity->getFileChanges(); } } else { if (array_key_exists('btn_integ_exec', $_POST)) { $version = $_POST['changes_version']; if ($oIntegrity->init($version)) {
function doUpgrade($dbname) { global $oUpgrader; $GLOBALS['_MAX']['CONF']['database']['name'] = $dbname; $oUpgrader->oDBUpgrader->doBackups = false; if ($oUpgrader->upgrade()) { $aMessages[] = 'Your database has successfully been upgraded to version ' . OA_VERSION; } else { $aMessages[] = 'Your database has NOT been upgraded to version ' . OA_VERSION; } return $aMessages; } if (array_key_exists('btn_data_drop', $_POST)) { OA_DB::dropDatabase($_POST['dbname']); } $oIntegrity = new OA_DB_Integrity(); $GLOBALS['_MAX']['CONF']['table']['prefix'] = ''; $datasetfile = $_REQUEST['datasetfile']; $aDatasetFile = $oIntegrity->getSchemaFileInfo(TD_DATAPATH, $datasetfile); if (array_key_exists('error', $aDatasetFile)) { $aMessages[] = $aDatasetFile['error']; } else { $oIntegrity->version = $aDatasetFile['version']; $oUpgrader = new OA_Upgrade(); $aMessages = getUpgradeStatus($aDatasetFile['name']); } if (array_key_exists('btn_data_integ', $_REQUEST)) { if ($oIntegrity->init($_REQUEST['compare_version'], $aDatasetFile['name'])) { $oIntegrity->checkIntegrity(); $aTasksConstructive = $oIntegrity->aTasksConstructiveAll; $aTasksDestructive = $oIntegrity->aTasksDestructiveAll;
+---------------------------------------------------------------------------+ | Revive Adserver | | http://www.revive-adserver.com | | | | Copyright: See the COPYRIGHT.txt file. | | License: GPLv2 or later, see the LICENSE.txt file. | +---------------------------------------------------------------------------+ */ /** * integrity check utility */ require_once './init.php'; require_once MAX_PATH . '/lib/OA/Upgrade/DB_Integrity.php'; if (array_key_exists('xajax', $_POST)) { } require_once MAX_PATH . '/www/devel/lib/xajax.inc.php'; $oIntegrity = new OA_DB_Integrity(); $aAppInfo = $oIntegrity->getVersion(); if (array_key_exists('btn_data_dump', $_POST)) { $oIntegrity->init($aAppInfo['versionSchema']); $aAppInfoMap = array('schema' => $aAppInfo['versionSchema'], 'appver' => $aAppInfo['versionApp'], 'exclude' => $_POST['exclude']); $aMessages = $oIntegrity->dumpData($aAppInfoMap); if (PEAR::isError($aMessages)) { $aMessages[] = $aMessages->getUserInfo(); } } include 'templates/datadump.html'; ?>