Added changes to um online open to integrate mr

This commit is contained in:
Arturo Gonzalez 2017-03-17 13:26:47 +01:00
parent 8d4b730b6c
commit aebbc783df
6 changed files with 21 additions and 9 deletions

View File

@ -25,7 +25,7 @@ if (is_ajax ()) {
$ent = get_parameter('ent');
$offline = get_parameter('offline');
if (!$ent) {
$dir = $config['attachment_store'] . "/last_package/downloads/extras/mr";
$dir = $config['attachment_store'] . "/last_package/downloads/pandora_console/extras/mr";
}
else {
if ($offline) {

View File

@ -37,7 +37,7 @@ $update_last_free_package = (bool)get_parameter('update_last_free_package');
$check_update_free_package = (bool)get_parameter('check_update_free_package');
$install_free_package = (bool)get_parameter('install_free_package');
$search_minor = (bool)get_parameter('search_minor');
$unzip_free_package = (bool)get_parameter('$unzip_free_package');
$unzip_free_package = (bool)get_parameter('unzip_free_package');
if ($upload_file) {
ob_clean();
@ -508,14 +508,14 @@ if ($check_update_free_package) {
if ($unzip_free_package) {
$version = get_parameter('version', '');
$result = update_manager_starting_update();
$result = update_manager_extract_package();
if ($result) {
$return["status"] = "correct";
$return["correct"] = true;
$return["message"]= __("The package is extracted.");
}
else {
$return["status"] = "error";
$return["correct"] = false;
$return["message"]= __("Error in package extraction.");
}
@ -525,12 +525,20 @@ if ($unzip_free_package) {
if ($install_free_package) {
$version = get_parameter('version', '');
$install = update_manager_starting_update();
update_manager_set_current_package($version);
sleep(3);
if ($install) {
$return["status"] = "success";
$return["message"]= __("The package is installed.");
}
else {
$return["status"] = "error";
$return["message"]= __("An error ocurred in the installation process.");
}
echo json_encode($return);
}
?>

View File

@ -2687,7 +2687,7 @@ function get_number_of_mr($package, $ent, $offline) {
global $config;
if (!$ent) {
$dir = $config['attachment_store'] . "/last_package/downloads/extras/mr";
$dir = $config['attachment_store'] . "/last_package/downloads/pandora_console/extras/mr";
}
else {
if ($offline) {

View File

@ -1724,7 +1724,7 @@ function db_check_minor_relase_available_to_um ($package, $ent, $offline) {
global $config;
if (!$ent) {
$dir = $config['attachment_store'] . "/last_package/downloads/extras/mr";
$dir = $config['attachment_store'] . "/last_package/downloads/pandora_console/extras/mr";
}
else {
if ($offline) {

View File

@ -620,6 +620,7 @@ function update_manager_extract_package() {
}
$extracted = false;
// Phar and exception working fine in 5.5.0 or higher
if (PHP_VERSION_ID >= 50505) {
$phar = new PharData($path_package);
@ -642,6 +643,7 @@ function update_manager_extract_package() {
echo "This OS [" . PHP_OS . "] does not support direct extraction of tgz files. Upgrade PHP version to be > 5.5.0";
}
else {
$return = true;
system('tar xzf "' . $path_package . '" -C ' . $config['attachment_store'] . "/downloads/");
}
}

View File

@ -950,6 +950,8 @@ function check_progress_update(homeurl) {
}
function install_free_package_prev_step(package, version, homeurl) {
var home_url = (typeof homeurl !== 'undefined') ? homeurl + '/' : '';
$("<div id='pkg_apply_dialog' class='dialog ui-dialog-content' title='" + package_available + "'></div>").dialog ({
resizable: true,
draggable: true,