From: Roland Häder Date: Tue, 9 Sep 2008 12:26:08 +0000 (+0000) Subject: Obsolete update check replaced with SVN revision X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=7d96ffc18679f7aeb05ce3ab091f200c4a18f144;hp=f50cf1e7f174a1547055ef772a3a2b12415bc73b Obsolete update check replaced with SVN revision --- diff --git a/inc/databases.php b/inc/databases.php index 2057f1310a..1440b292b6 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -114,7 +114,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // This current patch level -define('CURR_PATCH_LEVEL', "514"); +define('CURR_SVN_REVISION', "279"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/language/de.php b/inc/language/de.php index 863d2d5d68..038970c863 100644 --- a/inc/language/de.php +++ b/inc/language/de.php @@ -1006,9 +1006,9 @@ define('ENTER_SUB_REASON', "Grund des Abzuges"); define('ADMIN_SUB_POINTS', "{!POINTS!} abziehen"); define('ADMIN_SUB_POINTS_FROM_ALL', "Allen Mitgliedern {!POINTS!} abziehen"); define('PATCH_DESCRIPTION', "Beschreibung zum Patch"); -define('DOWNLOAD_ZIP', "Direktes ZIP-Archiv downloaden"); -define('DOWNLOAD_BZIP2', "Direkten Tar-Ball downloaden"); -define('DOWNLOAD_FROM_SERVER', "Über unseren Server downloaden"); +define('DOWNLOAD_SVN', "SVN-Version herunterladen"); +define('SVN_REPOSITORY', "SVN-Repository"); +define('SVN_CHECKOUT_COMMAND', "SVN auschecken mit:"); define('DOWNLOAD_NOW', "Jetzt downloaden!"); define('ADMIN_MEMBER_STATS_TITLE', "Einstellungen an der Mitglieder-Statistik"); define('ADMIN_MEMBER_STATS_LIMIT', "Anzahl Mailbuchungen pro Seite"); diff --git a/inc/modules/admin/what-updates.php b/inc/modules/admin/what-updates.php index c0db3f864d..6e1e23f8af 100644 --- a/inc/modules/admin/what-updates.php +++ b/inc/modules/admin/what-updates.php @@ -44,9 +44,9 @@ ADD_DESCR("admin", basename(__FILE__)); $ONLINE['code'] = "???"; // Get response from our server in an array -$response = GET_URL("check-updates2.php"); +$response = GET_URL("check-updates3.php"); -if (empty($response[0]) && empty($response[1]) && empty($response[2])) { +if (empty($response[0]) && empty($response[1]) && empty($response[2]) && empty($response[3])) { // Error! $response = array("", "", ""); } else { @@ -71,8 +71,9 @@ if (empty($response[0]) && empty($response[1]) && empty($response[2])) { // Which is the latest version on server? $ONLINE = array( - 'version' => str_replace("\n", "", $response[0]), - 'changed' => str_replace("\n", "", $response[1]) + 'version' => str_replace("\n", "", $response[0]), + 'changed' => str_replace("\n", "", $response[1]), + 'revision' => str_replace("\n", "", $response[2]), ); // Array for available patches @@ -82,7 +83,7 @@ if (empty($response[0]) && empty($response[1]) && empty($response[2])) { 'ctime' => array() ); - if (($response[2] != "[EOF]") && ($ONLINE['version'] == FULL_VERSION)) { + if (($response[3] != "[EOF]") && ($ONLINE['version'] == FULL_VERSION)) { // We have found new patches (newer than FULL_VERSION) $max = str_replace("\n", "", $response[sizeof($response) - 2]); $TOTAL_SIZE = "0"; @@ -123,10 +124,11 @@ if (empty($response[0]) && empty($response[1]) && empty($response[2])) { if (empty($ONLINE['version'])) { // Disconnected? LOAD_TEMPLATE("admin_settings_saved", false, "".ADMIN_CANNOT_CHECK_VERSION." (".$ONLINE['code'].")"); -} elseif ($ONLINE['version'] != FULL_VERSION) { +} elseif (($ONLINE['version'] != FULL_VERSION) || ($ONLINE['revision'] != CURR_SVN_REVISION)) { // New full-version available (all previous released patches are included in this version!) define('__ONLINE_VERSION', $ONLINE['version']); define('__ONLINE_CHANGE' , MAKE_DATETIME($ONLINE['changed'], "2")); + define('__ONLINE_REVISION', $ONLINE['revision']); // Load template LOAD_TEMPLATE("admin_update_download"); diff --git a/inc/patch-system.php b/inc/patch-system.php index e3ec443cd3..19659950bf 100644 --- a/inc/patch-system.php +++ b/inc/patch-system.php @@ -39,10 +39,10 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } // Check for patch level differences between databases and current hard-coded -if (CURR_PATCH_LEVEL > $_CONFIG['patch_level']) { +if (CURR_SVN_REVISION > $_CONFIG['patch_level']) { // Update database and CONFIG array - UPDATE_CONFIG(array("patch_level", "path_ctime"), array(CURR_PATH_LEVEL, "UNIX_TIMESTAMP()")); - $_CONFIG['patch_level'] = CURR_PATCH_LEVEL; + UPDATE_CONFIG(array("patch_level", "path_ctime"), array(CURR_SVN_REVISION, "UNIX_TIMESTAMP()")); + $_CONFIG['patch_level'] = CURR_SVN_REVISION; $_CONFIG['patch_ctime'] = time(); } // END - if diff --git a/templates/de/html/admin/admin_update_download.tpl b/templates/de/html/admin/admin_update_download.tpl index 91f7161d35..5e78bb232b 100644 --- a/templates/de/html/admin/admin_update_download.tpl +++ b/templates/de/html/admin/admin_update_download.tpl @@ -10,7 +10,7 @@ {--YOUR_VERSION_IS--}:   - v{!FULL_VERSION!} + v{!FULL_VERSION!} {!CURR_SVN_REVISION!}   @@ -18,7 +18,7 @@ {--ONLINE_VERSION_IS--}:   - v{--__ONLINE_VERSION--} + v{!__ONLINE_VERSION!} {!__ONLINE_REVISION!}   @@ -26,7 +26,10 @@ {--UPDATE_CREATE_TIME--}:   - {--__ONLINE_CHANGE--} + {!__ONLINE_CHANGE!} + + +     @@ -40,28 +43,20 @@ - {--DOWNLOAD_ZIP--}:  - {--DOWNLOAD_NOW--} - - - {--DOWNLOAD_BZIP2--}:  - {--DOWNLOAD_NOW--} - - - - {--DOWNLOAD_FROM_SERVER--}:  - {--DOWNLOAD_NOW--} + + {--DOWNLOAD_SVN--}: + + + {--DOWNLOAD_NOW--} -   + + {--SVN_CHECKOUT_COMMAND--}
+ svn co {!SERVER_URL!}/repos/mxchange-application/branches/{!FULL_VERSION!}/ +