From: Roland Häder Date: Thu, 22 Jul 2010 12:35:27 +0000 (+0000) Subject: Handling of local newer revisions than on update server added X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ab61ada07cb44c269bc04be0c6cd981dc59c03eb;p=mailer.git Handling of local newer revisions than on update server added --- diff --git a/inc/language/update_de.php b/inc/language/update_de.php index cf3dc46fab..72b52081bd 100644 --- a/inc/language/update_de.php +++ b/inc/language/update_de.php @@ -51,6 +51,7 @@ addMessages(array( 'ADMIN_UPDATE_CREATE_TIME' => "Update wurde erstellt", 'ADMIN_DOWNLOAD_NEW_VERSION' => "Jetzt neue Version herunterladen.", 'ADMIN_CANNOT_CHECK_VERSION' => "Konnte Versionsnummer nicht abgleichen! (Fehlende Internet-Verbindung? Server ist down?)", + 'ADMIN_LOCAL_REVISION_IS_NEWER_THAN_UPDATE' => "Die auf Ihrem installierte Revision {?CURR_SVN_REVISION?} ist neuer als die auf dem Server. Dies sollte nicht vorkommen, bitte melden Sie dies im Forum oder Bug-Tracker.", )); // [EOF] diff --git a/inc/modules/admin/what-updates.php b/inc/modules/admin/what-updates.php index 9b1fe93afd..33b0d7f7b6 100644 --- a/inc/modules/admin/what-updates.php +++ b/inc/modules/admin/what-updates.php @@ -76,9 +76,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 { @@ -91,12 +91,15 @@ if (empty($response[0]) && empty($response[1]) && empty($response[2]) && empty($ if (empty($ONLINE['version'])) { // Disconnected? loadTemplate('admin_settings_saved', false, '
{--ADMIN_CANNOT_CHECK_VERSION--} (' . $ONLINE['code'] . ')
'); -} elseif (($ONLINE['version'] != getFullVersion()) || ($ONLINE['revision'] != getCurrSvnRevision())) { +} elseif (($ONLINE['version'] != getFullVersion()) || ($ONLINE['revision'] > getCurrSvnRevision())) { // 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'] < getCurrSvnRevision()) { + // 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, '{--ADMIN_NO_UPDATES_AVAILABLE--}');