diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index b1a2302039..808a43fe45 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,14 @@ +2012-06-21 Miguel de Dios + + * extensions/update_manager/load_updatemanager.php: fixed the lost + parameter for keygen, the dbtype. + + * extensions/update_manager/lib/libupdate_manager_client.php: fixed + when update enterprise packages maybe sometimes try to update again + and again and again....like spoon killer. + + Merged from 4.0.2 + 2012-06-21 Sancho Lerena * extensions/update_manager/sql/update_manager.oracle.sql, diff --git a/pandora_console/extensions/update_manager/lib/libupdate_manager_client.php b/pandora_console/extensions/update_manager/lib/libupdate_manager_client.php index 06d794574b..bbf3af5d38 100644 --- a/pandora_console/extensions/update_manager/lib/libupdate_manager_client.php +++ b/pandora_console/extensions/update_manager/lib/libupdate_manager_client.php @@ -115,7 +115,7 @@ function um_client_check_latest_update ($settings, $user_key) { if ($result == false) { return $result; } - + $value = $result->value (); if ($value->kindOf () == 'scalar') { @@ -133,14 +133,14 @@ function um_client_get_package ($settings, $user_key) { new xmlrpcval ($settings->current_update, 'int')); $result = um_xml_rpc_client_call ($settings->update_server_host, - $settings->update_server_path, - $settings->update_server_port, - $settings->proxy, - $settings->proxy_port, - $settings->proxy_user, - $settings->proxy_pass, - 'get_next_package', $params); - + $settings->update_server_path, + $settings->update_server_port, + $settings->proxy, + $settings->proxy_port, + $settings->proxy_user, + $settings->proxy_pass, + 'get_next_package', $params); + if ($result === false) return false; @@ -501,7 +501,7 @@ function um_client_upgrade_to_package ($package, $settings, $force = true, $upda return false; } - if(!$update_offline) { + if (!$update_offline) { um_client_db_connect ($settings); um_component_db_connect (); foreach ($package->updates as $update) { @@ -641,7 +641,8 @@ function um_client_upgrade_to_latest ($user_key, $force = true) { do { $package = um_client_get_package ($settings, $user_key); - if ($package === false || $package === true) { + if ($package === false || $package === true || + $package === 0 || $package === 1) { break; } @@ -651,7 +652,6 @@ function um_client_upgrade_to_latest ($user_key, $force = true) { break; $settings->current_update = $package->id; - } while (1); diff --git a/pandora_console/extensions/update_manager/load_updatemanager.php b/pandora_console/extensions/update_manager/load_updatemanager.php index 558242bb80..d7c5e14e81 100644 --- a/pandora_console/extensions/update_manager/load_updatemanager.php +++ b/pandora_console/extensions/update_manager/load_updatemanager.php @@ -73,10 +73,14 @@ function get_user_key ($settings) { ' '.$config['dbuser'].' '.$config['dbpass']. ' '.$config['dbname'], true); */ - $user_key = exec (escapeshellcmd ($settings->keygen_path. + $command_line = escapeshellcmd($settings->keygen_path. ' '.$settings->customer_key.' '.$config['dbhost']. ' '.$config['dbuser'].' '.$config['dbpass']. - ' '.$config['dbname'].' '.$config["dbtype"])); + ' '.$config['dbname'].' '.$config['dbtype']); + + //html_debug_print($command_line, true); + + $user_key = exec ($command_line); return $user_key; }