diff --git a/pandora_console/include/ajax/rolling_release.ajax.php b/pandora_console/include/ajax/rolling_release.ajax.php index cc72cf2da2..e8d7fa45c0 100644 --- a/pandora_console/include/ajax/rolling_release.ajax.php +++ b/pandora_console/include/ajax/rolling_release.ajax.php @@ -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) { diff --git a/pandora_console/include/ajax/update_manager.ajax.php b/pandora_console/include/ajax/update_manager.ajax.php index d5eccfee0c..4d75207d7b 100644 --- a/pandora_console/include/ajax/update_manager.ajax.php +++ b/pandora_console/include/ajax/update_manager.ajax.php @@ -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); - $return["status"] = "success"; - $return["message"]= __("The package is installed."); + 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); } ?> diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 329f625c95..06fb6f9edb 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -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) { diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php index da29447ff7..4f9d865efa 100644 --- a/pandora_console/include/functions_db.php +++ b/pandora_console/include/functions_db.php @@ -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) { diff --git a/pandora_console/include/functions_update_manager.php b/pandora_console/include/functions_update_manager.php index 8925903e47..517fce25d2 100755 --- a/pandora_console/include/functions_update_manager.php +++ b/pandora_console/include/functions_update_manager.php @@ -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/"); } } diff --git a/pandora_console/include/javascript/update_manager.js b/pandora_console/include/javascript/update_manager.js index edc7421e93..6a0cf05699 100644 --- a/pandora_console/include/javascript/update_manager.js +++ b/pandora_console/include/javascript/update_manager.js @@ -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 + '/' : ''; + $("
").dialog ({ resizable: true, draggable: true,