X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-updates.php;h=b0b07ae95fac8eab2eff08c03a36ad771920ef8a;hb=cc59ea1cce3e0fafc2cc6c9e36142698cf2b58ef;hp=497430cfa84737245c2aab3a39d7aa6b10f753f7;hpb=e5fe5afb17a5c8106f4c890234dfa39419e70f5d;p=mailer.git diff --git a/inc/modules/admin/what-updates.php b/inc/modules/admin/what-updates.php index 497430cfa8..b0b07ae95f 100644 --- a/inc/modules/admin/what-updates.php +++ b/inc/modules/admin/what-updates.php @@ -1,7 +1,7 @@ $v) { - $v = trim($v); - if (empty($v)) { - // Header ends here (+1) - $pos = $k + 1; break; - } - } - - $response2 = array(); - for($i = $pos; $i < count($response); $i++) { - $response2[] = trim($response[$i]); - } - $response = $response2; unset($response2); - unset($pos); + $response = removeHttpHeaderFromResponse($response); // Which is the latest version on server? $ONLINE = array( - 'version' => str_replace("\n", '', $response[0]), - 'changed' => str_replace("\n", '', $response[1]), - 'revision' => str_replace("\n", '', $response[2]), + 'version' => trim(str_replace("\n", '', $response[0])), + 'changed' => trim(str_replace("\n", '', $response[1])), + 'revision' => trim(str_replace("\n", '', $response[2])), 'code' => '200 OK' ); } else { @@ -89,16 +74,19 @@ if (empty($response[0]) && empty($response[1]) && empty($response[2]) && empty($ // Is a newer version available? if (empty($ONLINE['version'])) { // Disconnected? - loadTemplate('admin_settings_saved', false, "