2014-06-09 Miguel de Dios <miguel.dedios@artica.es>
* include/javascript/update_manager.js, include/functions_update_manager.php, include/ajax/update_manager.ajax.php, include/config_process.php: work in the first version of new update manager. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10145 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
11e9271316
commit
7f5a47eaa8
|
@ -1,3 +1,11 @@
|
|||
2014-06-09 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/javascript/update_manager.js,
|
||||
include/functions_update_manager.php,
|
||||
include/ajax/update_manager.ajax.php, include/config_process.php:
|
||||
work in the first version of new update manager.
|
||||
|
||||
|
||||
2014-06-09 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_config.php, general/login_page.php: improved
|
||||
|
|
|
@ -21,16 +21,16 @@ enterprise_include_once("include/functions_update_manager.php");
|
|||
$upload_file = (boolean) get_parameter("upload_file");
|
||||
$install_package = (boolean) get_parameter("install_package");
|
||||
$check_install_package = (boolean) get_parameter("check_install_package");
|
||||
$check_install_enterprise_package = (boolean) get_parameter("check_install_enterprise_package");
|
||||
$check_online_packages = (boolean) get_parameter("check_online_packages");
|
||||
$check_online_enterprise_packages = (boolean) get_parameter("check_online_enterprise_packages");
|
||||
$update_last_package = (boolean) get_parameter("update_last_package");
|
||||
$update_last_enterprise_package = (boolean) get_parameter("update_last_enterprise_package");
|
||||
$install_package_online = (boolean) get_parameter("install_package_online");
|
||||
$install_enterprise_package = (boolean) get_parameter("install_enterprise_package");
|
||||
$check_progress_update = (boolean) get_parameter("check_progress_update");
|
||||
$check_progress_enterprise_update = (boolean) get_parameter("check_progress_enterprise_update");
|
||||
$install_package_step2 = (boolean)get_parameter("install_package_step2");
|
||||
$enterprise_install_package = (boolean) get_parameter("enterprise_install_package");
|
||||
$enterprise_install_package_step2 = (boolean)get_parameter("enterprise_install_package_step2");
|
||||
|
||||
if ($upload_file) {
|
||||
ob_clean();
|
||||
|
@ -213,16 +213,45 @@ if ($install_package) {
|
|||
return;
|
||||
}
|
||||
|
||||
if ($check_install_enterprise_package) {
|
||||
|
||||
check_install_enterprise_package();
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
if ($check_install_package) {
|
||||
// 1 second
|
||||
//sleep(1);
|
||||
// Half second
|
||||
usleep(500000);
|
||||
|
||||
ob_clean();
|
||||
|
||||
$package = (string) get_parameter("package");
|
||||
// All files extracted
|
||||
$files_total = $package."/files.txt";
|
||||
// Number of files extracted
|
||||
$files_num = $package."/files.info.txt";
|
||||
// Files copied
|
||||
$files_copied = $package."/files.copied.txt";
|
||||
|
||||
$files = @file($files_copied);
|
||||
if (empty($files))
|
||||
$files = array();
|
||||
$total = (int)@file_get_contents($files_num);
|
||||
|
||||
$progress = 0;
|
||||
if ((count($files) > 0) && ($total > 0)) {
|
||||
$progress = format_numeric((count($files) / $total) * 100, 2);
|
||||
if ($progress > 100)
|
||||
$progress = 100;
|
||||
}
|
||||
|
||||
$return = array();
|
||||
$return['info'] = (string) implode("<br />", $files);
|
||||
$return['progress'] = $progress;
|
||||
|
||||
if ($progress >= 100) {
|
||||
unlink($files_total);
|
||||
unlink($files_num);
|
||||
unlink($files_copied);
|
||||
}
|
||||
|
||||
echo json_encode($return);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -252,15 +281,6 @@ if ($update_last_package) {
|
|||
return;
|
||||
}
|
||||
|
||||
if ($install_enterprise_package) {
|
||||
$package = get_parameter('package', '');
|
||||
|
||||
update_manager_starting_enterprise_update($package,
|
||||
$config['attachment_store'] . "/downloads/" . $package);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ($install_package_online) {
|
||||
|
||||
return;
|
||||
|
@ -282,4 +302,20 @@ if ($check_progress_update) {
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
if ($enterprise_install_package) {
|
||||
$package = get_parameter('package', '');
|
||||
|
||||
|
||||
update_manager_enterprise_starting_update($package,
|
||||
$config['attachment_store'] . "/downloads/" . $package);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ($enterprise_install_package_step2) {
|
||||
update_manager_install_enterprise_package_step2();
|
||||
|
||||
return;
|
||||
}
|
||||
?>
|
|
@ -22,7 +22,7 @@
|
|||
/**
|
||||
* Pandora build version and version
|
||||
*/
|
||||
$build_version = 'PC140608';
|
||||
$build_version = 'PC140605';
|
||||
$pandora_version = 'v5.1BETA1';
|
||||
|
||||
// Do not overwrite default timezone set if defined.
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
*/
|
||||
|
||||
function update_manager_get_config_values() {
|
||||
global $config;
|
||||
|
||||
$license = db_get_value('`value`', 'tupdate_settings', '`key`',
|
||||
'customer_key');
|
||||
$current_update = db_get_value('`value`', 'tupdate_settings', '`key`',
|
||||
|
@ -28,9 +30,14 @@ function update_manager_get_config_values() {
|
|||
global $build_version;
|
||||
global $pandora_version;
|
||||
|
||||
$current_update = 0;
|
||||
if (isset($config['current_package']))
|
||||
$current_update = $config['current_package'];
|
||||
|
||||
//TO DO
|
||||
$license = "TESTMIGUEL00B0WAW9BU1QM0RZ2QM0MZ3QN5M41R35S5S1DP";
|
||||
$current_update = 11;
|
||||
//$current_update = 11;
|
||||
|
||||
|
||||
return array(
|
||||
'license' => $license,
|
||||
|
|
|
@ -249,7 +249,7 @@ function install_package (package) {
|
|||
function check_install_package(package) {
|
||||
var parameters = {};
|
||||
parameters['page'] = 'include/ajax/update_manager.ajax';
|
||||
parameters['check_install_enterprise_package'] = 1;
|
||||
parameters['check_install_package'] = 1;
|
||||
parameters['package'] = package;
|
||||
|
||||
$.ajax({
|
||||
|
@ -273,7 +273,7 @@ function check_install_package(package) {
|
|||
var isInstalling = $('#form-offline_update ul').find('li').hasClass('loading');
|
||||
if (data.progress < 100 && isInstalling) {
|
||||
// Recursive call to check the update status
|
||||
check_install_enterprise_package(package);
|
||||
check_install_package(package);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue