From b7e7e9e66a7ba319509b719933c40a1d5cec9452 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Fri, 26 May 2017 11:15:00 +0200 Subject: [PATCH] Changed current_package_enterprise --- pandora_console/include/ajax/update_manager.ajax.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/ajax/update_manager.ajax.php b/pandora_console/include/ajax/update_manager.ajax.php index af1071fdb1..80c62539da 100644 --- a/pandora_console/include/ajax/update_manager.ajax.php +++ b/pandora_console/include/ajax/update_manager.ajax.php @@ -116,8 +116,16 @@ if ($install_package) { $package = trim($package); $chunks = explode("_", basename($package)); - $chunks = explode(".", $chunks[1]); - $version = $chunks[0]; + $chunks = explode(".", $chunks[1]); + if(is_numeric($chunks[0])){ + $version = $chunks[0]; + } else { + $current_package = db_get_value('value', 'tconfig', + 'token', 'current_package_enterprise'); + if (!empty($current_package)) { + $version = $current_package; + } + } // All files extracted $files_total = $package . "/files.txt";