Added more checks in the update manager.
(cherry picked from commit 36ccfaabe00ecea85c312d6eb60662548ff77cd6)
This commit is contained in:
parent
b41dd94fad
commit
92fdd8f9bd
|
@ -245,7 +245,10 @@ function update_manager_check_online_free_packages_available() {
|
||||||
//~ html_debug_print($http_status, true);
|
//~ html_debug_print($http_status, true);
|
||||||
//~ html_debug_print($result, true);
|
//~ html_debug_print($result, true);
|
||||||
|
|
||||||
if ($http_status >= 400 && $http_status < 500) {
|
if ($result === false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
elseif ($http_status >= 400 && $http_status < 500) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
elseif ($http_status >= 500) {
|
elseif ($http_status >= 500) {
|
||||||
|
@ -299,18 +302,27 @@ function update_manager_check_online_free_packages ($is_ajax=true) {
|
||||||
//~ html_debug_print($http_status, true);
|
//~ html_debug_print($http_status, true);
|
||||||
//~ html_debug_print($result, true);
|
//~ html_debug_print($result, true);
|
||||||
|
|
||||||
|
if ($result === false) {
|
||||||
if ($http_status >= 400 && $http_status < 500) {
|
if ($is_ajax) {
|
||||||
|
echo __("Could not connect to internet");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$update_message = __("Could not connect to internet");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ($http_status >= 400 && $http_status < 500) {
|
||||||
if ($is_ajax) {
|
if ($is_ajax) {
|
||||||
echo __("Server not found.");
|
echo __("Server not found.");
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$update_message = __("Server not found.");
|
$update_message = __("Server not found.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif ($http_status >= 500) {
|
elseif ($http_status >= 500) {
|
||||||
if ($is_ajax) {
|
if ($is_ajax) {
|
||||||
echo $result;
|
echo $result;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$update_message = $result;
|
$update_message = $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue