X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-updates.php;h=9ea426a407e6c29bbd8c3e20a85f5b27872c6e0c;hb=e523b69ecd6c7f37ae1cb36872537073b40c0e27;hp=6d73b593ac92c35a5afeb8b84f40c10502747a4a;hpb=c2e17d983fcbc0c3bd1dd37908d87c678f0367df;p=mailer.git diff --git a/inc/modules/admin/what-updates.php b/inc/modules/admin/what-updates.php index 6d73b593ac..9ea426a407 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)) { @@ -75,9 +74,9 @@ if (empty($response[0]) && empty($response[1]) && empty($response[2]) && empty($ // 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 +88,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, "
{--ADMIN_CANNOT_CHECK_VERSION--} (".$ONLINE['code'].")
"); -} elseif (($ONLINE['version'] != getConfig('FULL_VERSION')) || ($ONLINE['revision'] != getConfig('CURR_SVN_REVISION'))) { + loadTemplate('admin_settings_unsaved', false, '{--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); // Load template loadTemplate('admin_update_download', false, $ONLINE); +} elseif ($ONLINE['revision'] < getCurrentRepositoryRevision()) { + // Installed revision is newer than on server + loadTemplate('admin_settings_saved', false, '{--ADMIN_LOCAL_REVISION_IS_NEWER_THAN_UPDATE--}'); } else { // You have the latest version! - loadTemplate('admin_settings_saved', false, getMessage('NO_UPDATES_AVAILABLE')); + loadTemplate('admin_settings_saved', false, '{--ADMIN_NO_UPDATES_AVAILABLE--}'); } // [EOF]