Fixed error in um online open

This commit is contained in:
Arturo Gonzalez 2017-03-17 13:56:38 +01:00
parent aec7df9137
commit 89727824a4
2 changed files with 7 additions and 29 deletions

View File

@ -378,7 +378,6 @@ if ($search_minor) {
if ($update_last_free_package) { if ($update_last_free_package) {
$package = get_parameter('package', ''); $package = get_parameter('package', '');
$version = get_parameter('version', ''); $version = get_parameter('version', '');
$accept = (boolean)get_parameter('accept', false);
$package_url = base64_decode($package); $package_url = base64_decode($package);
$params = array('action' => 'get_package', $params = array('action' => 'get_package',
@ -520,6 +519,8 @@ if ($unzip_free_package) {
} }
echo json_encode($return); echo json_encode($return);
return;
} }
if ($install_free_package) { if ($install_free_package) {
@ -540,5 +541,7 @@ if ($install_free_package) {
} }
echo json_encode($return); echo json_encode($return);
return;
} }
?> ?>

View File

@ -1313,34 +1313,9 @@ function install_free_package_prev_step(package, version, homeurl) {
$('#cancel_pkg').html(dialog_cancel_pkg_text); $('#cancel_pkg').html(dialog_cancel_pkg_text);
$('#cancel_pkg').dialog('open'); $('#cancel_pkg').dialog('open');
var parameters = {}; $("#box_online .loading").hide();
parameters['page'] = 'include/ajax/update_manager.ajax'; $("#box_online .progressbar").hide();
parameters['update_last_free_package'] = 1; $("#box_online .content").html(package_cancel);
parameters['package'] = package;
parameters['version'] = version;
parameters['accept'] = 0;
jQuery.post(
home_url + "ajax.php",
parameters,
function (data) {
if (data['in_progress']) {
$("#box_online .loading").hide();
$("#box_online .download_package").hide();
$("#box_online .content").html(data['message']);
install_free_package(package, version, homeurl);
setTimeout(function () {
check_progress_update(homeurl);
}, 1000);
}
else {
$("#box_online .content").html(data['message']);
}
},
"json"
);
} }
} }
}); });