Added changes to um online open to integrate mr
This commit is contained in:
parent
8d4b730b6c
commit
aebbc783df
|
@ -25,7 +25,7 @@ if (is_ajax ()) {
|
||||||
$ent = get_parameter('ent');
|
$ent = get_parameter('ent');
|
||||||
$offline = get_parameter('offline');
|
$offline = get_parameter('offline');
|
||||||
if (!$ent) {
|
if (!$ent) {
|
||||||
$dir = $config['attachment_store'] . "/last_package/downloads/extras/mr";
|
$dir = $config['attachment_store'] . "/last_package/downloads/pandora_console/extras/mr";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ($offline) {
|
if ($offline) {
|
||||||
|
|
|
@ -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');
|
$check_update_free_package = (bool)get_parameter('check_update_free_package');
|
||||||
$install_free_package = (bool)get_parameter('install_free_package');
|
$install_free_package = (bool)get_parameter('install_free_package');
|
||||||
$search_minor = (bool)get_parameter('search_minor');
|
$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) {
|
if ($upload_file) {
|
||||||
ob_clean();
|
ob_clean();
|
||||||
|
@ -508,14 +508,14 @@ if ($check_update_free_package) {
|
||||||
if ($unzip_free_package) {
|
if ($unzip_free_package) {
|
||||||
$version = get_parameter('version', '');
|
$version = get_parameter('version', '');
|
||||||
|
|
||||||
$result = update_manager_starting_update();
|
$result = update_manager_extract_package();
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$return["status"] = "correct";
|
$return["correct"] = true;
|
||||||
$return["message"]= __("The package is extracted.");
|
$return["message"]= __("The package is extracted.");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$return["status"] = "error";
|
$return["correct"] = false;
|
||||||
$return["message"]= __("Error in package extraction.");
|
$return["message"]= __("Error in package extraction.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -525,12 +525,20 @@ if ($unzip_free_package) {
|
||||||
if ($install_free_package) {
|
if ($install_free_package) {
|
||||||
$version = get_parameter('version', '');
|
$version = get_parameter('version', '');
|
||||||
|
|
||||||
|
$install = update_manager_starting_update();
|
||||||
update_manager_set_current_package($version);
|
update_manager_set_current_package($version);
|
||||||
|
|
||||||
sleep(3);
|
sleep(3);
|
||||||
|
|
||||||
|
if ($install) {
|
||||||
$return["status"] = "success";
|
$return["status"] = "success";
|
||||||
$return["message"]= __("The package is installed.");
|
$return["message"]= __("The package is installed.");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$return["status"] = "error";
|
||||||
|
$return["message"]= __("An error ocurred in the installation process.");
|
||||||
|
}
|
||||||
|
|
||||||
echo json_encode($return);
|
echo json_encode($return);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -2687,7 +2687,7 @@ function get_number_of_mr($package, $ent, $offline) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
if (!$ent) {
|
if (!$ent) {
|
||||||
$dir = $config['attachment_store'] . "/last_package/downloads/extras/mr";
|
$dir = $config['attachment_store'] . "/last_package/downloads/pandora_console/extras/mr";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ($offline) {
|
if ($offline) {
|
||||||
|
|
|
@ -1724,7 +1724,7 @@ function db_check_minor_relase_available_to_um ($package, $ent, $offline) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
if (!$ent) {
|
if (!$ent) {
|
||||||
$dir = $config['attachment_store'] . "/last_package/downloads/extras/mr";
|
$dir = $config['attachment_store'] . "/last_package/downloads/pandora_console/extras/mr";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ($offline) {
|
if ($offline) {
|
||||||
|
|
|
@ -620,6 +620,7 @@ function update_manager_extract_package() {
|
||||||
}
|
}
|
||||||
|
|
||||||
$extracted = false;
|
$extracted = false;
|
||||||
|
|
||||||
// Phar and exception working fine in 5.5.0 or higher
|
// Phar and exception working fine in 5.5.0 or higher
|
||||||
if (PHP_VERSION_ID >= 50505) {
|
if (PHP_VERSION_ID >= 50505) {
|
||||||
$phar = new PharData($path_package);
|
$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";
|
echo "This OS [" . PHP_OS . "] does not support direct extraction of tgz files. Upgrade PHP version to be > 5.5.0";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
$return = true;
|
||||||
system('tar xzf "' . $path_package . '" -C ' . $config['attachment_store'] . "/downloads/");
|
system('tar xzf "' . $path_package . '" -C ' . $config['attachment_store'] . "/downloads/");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -950,6 +950,8 @@ function check_progress_update(homeurl) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_free_package_prev_step(package, version, 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 ({
|
$("<div id='pkg_apply_dialog' class='dialog ui-dialog-content' title='" + package_available + "'></div>").dialog ({
|
||||||
resizable: true,
|
resizable: true,
|
||||||
draggable: true,
|
draggable: true,
|
||||||
|
|
Loading…
Reference in New Issue