]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-updates.php
Fixed also usage of previously renamed fields as they must be the same
[mailer.git] / inc / modules / admin / what-updates.php
index 9af3c5b268017eed22d2e3d75e00b5683a6b51ef..2491ec6932c4044b375077fa1937af97b3b3efcb 100644 (file)
@@ -47,7 +47,7 @@ addYouAreHereLink('admin', __FILE__);
 $ONLINE['code'] = '???';
 
 // Get response from our server in an array
-$response = sendGetRequest('check-updates3.php');
+$response = sendHttpGetRequest('check-updates3.php');
 
 if (empty($response[0]) && empty($response[1]) && empty($response[2]) && empty($response[3])) {
        // Error!
@@ -60,9 +60,9 @@ if (empty($response[0]) && empty($response[1]) && empty($response[2]) && empty($
 
                // Which is the latest version on server?
                $ONLINE = array(
-                       'version'  => trim(str_replace(chr(10), '', $response[0])),
-                       'changed'  => trim(str_replace(chr(10), '', $response[1])),
-                       'revision' => trim(str_replace(chr(10), '', $response[2])),
+                       'version'  => trim(str_replace(PHP_EOL, '', $response[0])),
+                       'changed'  => trim(str_replace(PHP_EOL, '', $response[1])),
+                       'revision' => trim(str_replace(PHP_EOL, '', $response[2])),
                        'code'     => '200 OK'
                );
        } else {
@@ -74,7 +74,7 @@ if (empty($response[0]) && empty($response[1]) && empty($response[2]) && empty($
 // Is a newer version available?
 if (empty($ONLINE['version'])) {
        // Disconnected?
-       loadTemplate('admin_settings_unsaved', FALSE, '{--ADMIN_CANNOT_CHECK_VERSION--} (' . $ONLINE['code'] . ')');
+       displayErrorMessage('{--ADMIN_CANNOT_CHECK_VERSION--} (' . $ONLINE['code'] . ')');
 } elseif (($ONLINE['version'] != getFullVersion()) || ($ONLINE['revision'] > getCurrentRepositoryRevision())) {
        // New full-version available (all previous released patches are included in this version!)
        $ONLINE['changed'] = generateDateTime($ONLINE['changed'], 2);