<?php
require_once('app-util.php');
require_once('file-util.php');
require_once('custom.php');
require_once('joomla25-upgrade.php');

function upgrade_app($from_ver, $from_rel, $config_files, $db_ids, $psa_modify_hash, $db_modify_hash, $settings_modify_hash, $crypt_settings_modify_hash, $settings_enum_modify_hash, $additional_modify_hash){

	$upgrade_schema_files = array ('remove-bogus-user.sql' => 'main' );
	
	define('APS_UPGRADE', 'yes');
	if (preg_match("/^1\.5[$\.]/", $from_ver)) {
		echo "Upgrade from joomla 1.5.x is not supported!";
		exit(1);
	}
	
	configure($config_files, $upgrade_schema_files, $db_ids, $psa_modify_hash, $db_modify_hash, $settings_modify_hash, $crypt_settings_modify_hash, $settings_enum_modify_hash, $additional_modify_hash);
	
	upgrade_joomla25($psa_modify_hash['@@ROOT_DIR@@'], $db_modify_hash["@@DB_MAIN_HOST"."@@"],	$db_modify_hash["@@DB_MAIN_LOGIN"."@@"], $db_modify_hash["@@DB_MAIN_PASSWORD"."@@"], $db_modify_hash["@@DB_MAIN_NAME"."@@"], get_table_prefix($db_modify_hash,$psa_modify_hash));

	return 0;
}

?>
