Fixed mr and um mix in um online open

This commit is contained in:
Arturo Gonzalez 2017-03-24 11:22:30 +01:00
parent b574a92f35
commit 277a3b656d
4 changed files with 9 additions and 16 deletions

View File

@ -27,7 +27,7 @@ if (is_ajax ()) {
$ent = get_parameter('ent');
$offline = get_parameter('offline');
if (!$ent) {
$dir = $config['attachment_store'] . "/last_package/downloads/pandora_console/extras/mr";
$dir = $config['attachment_store'] . "/downloads/pandora_console/extras/mr";
}
else {
if ($offline) {
@ -38,7 +38,6 @@ if (is_ajax ()) {
}
}
$file = "$dir/$number.sql";
$dangerous_query = false;
$mr_file = fopen($file, "r");
while (!feof($mr_file)) {

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/pandora_console/extras/mr";
$dir = $config['attachment_store'] . "/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/pandora_console/extras/mr";
$dir = $config['attachment_store'] . "/downloads/pandora_console/extras/mr";
}
else {
if ($offline) {
@ -1736,7 +1736,6 @@ function db_check_minor_relase_available_to_um ($package, $ent, $offline) {
}
$have_minor_release = false;
if (file_exists($dir) && is_dir($dir)) {
if (is_readable($dir)) {
$files = scandir($dir); // Get all the files from the directory ordered by asc

View File

@ -872,7 +872,6 @@ function update_last_package(package, version, homeurl) {
parameters,
function (data) {
if (data['in_progress']) {
$("#box_online .loading").hide();
$("#box_online .download_package").hide();
$("#box_online .content").html(data['message']);
@ -888,7 +887,6 @@ function update_last_package(package, version, homeurl) {
parameters2,
function (data) {
if (data['correct']) {
$("#box_online .loading").hide();
$("#box_online .download_package").hide();
$("#box_online .content").html(data['message']);
@ -981,9 +979,7 @@ function install_free_package_prev_step(package, version, homeurl) {
home_url + "ajax.php",
parameters,
function (data) {
$("#box_online .loading").hide();
$("#box_online .downloading_package").hide();
if (data['have_minor']) {
$("<div id='mr_dialog2' class='dialog ui-dialog-content' title='" + mr_available + "'></div>").dialog ({
resizable: true,
@ -999,7 +995,6 @@ function install_free_package_prev_step(package, version, homeurl) {
"Apply MR": function () {
var err = [];
err = apply_minor_release(data['mr'], package, 0, 0);
if (!err['error']) {
if (err['message'] == 'bad_mr_filename') {
$("#mr_dialog2").dialog("close");
@ -1054,7 +1049,6 @@ function install_free_package_prev_step(package, version, homeurl) {
parameters2,
function (data) {
if (data['in_progress']) {
$("#box_online .loading").hide();
$("#box_online .download_package").hide();
$("#box_online .content").html(data['message']);
@ -1070,6 +1064,8 @@ function install_free_package_prev_step(package, version, homeurl) {
},
"json"
);
remove_rr_file_to_extras();
},
"Cancel": function () {
$(this).dialog("close");
@ -1155,7 +1151,6 @@ function install_free_package_prev_step(package, version, homeurl) {
parameters2,
function (data) {
if (data['in_progress']) {
$("#box_online .loading").hide();
$("#box_online .download_package").hide();
$("#box_online .content").html(data['message']);
@ -1172,7 +1167,7 @@ function install_free_package_prev_step(package, version, homeurl) {
"json"
);
remove_rr_file(data['mr']);
remove_rr_file_to_extras();
}
}
else {
@ -1252,7 +1247,7 @@ function install_free_package_prev_step(package, version, homeurl) {
dialog_have_mr_text = dialog_have_mr_text + "<p style='font-family:Verdana; font-size:12pt;'>" + text2_mr_file + "<a style='font-family:Verdana bold; font-size:12pt; color:#82B92E'href=\"index.php?sec=extensions&sec2=godmode/agentes/planned_downtime.list\">" + text3_mr_file + "</a>" + text4_mr_file + "</p></div>";
dialog_have_mr_text = dialog_have_mr_text + "</div>";
$('#mr_dialog2').html(dialog_have_mr_mr_text);
$('#mr_dialog2').html(dialog_have_mr_text);
$('#mr_dialog2').dialog('open');
}
else {
@ -1267,7 +1262,6 @@ function install_free_package_prev_step(package, version, homeurl) {
parameters2,
function (data) {
if (data['in_progress']) {
$("#box_online .loading").hide();
$("#box_online .download_package").hide();
$("#box_online .content").html(data['message']);
@ -1286,7 +1280,8 @@ function install_free_package_prev_step(package, version, homeurl) {
remove_rr_file_to_extras();
}
}
},
"json"
);
},
"Cancel": function () {