Obsolete update check replaced with SVN revision
authorRoland Häder <roland@mxchange.org>
Tue, 9 Sep 2008 12:26:08 +0000 (12:26 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 9 Sep 2008 12:26:08 +0000 (12:26 +0000)
inc/databases.php
inc/language/de.php
inc/modules/admin/what-updates.php
inc/patch-system.php
templates/de/html/admin/admin_update_download.tpl

index 2057f1310a87ff5ca64b9b94d7e2f29100efe658..1440b292b6af495a3b525acb1b1a51d6f9d26a55 100644 (file)
@@ -114,7 +114,7 @@ define('USAGE_BASE', "usage");
 define('SERVER_URL', "http://www.mxchange.org");
 
 // This current patch level
 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);
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index 863d2d5d68e9d849880ef1a2157bf9d8c184593c..038970c8635a35ab54f9273a2d0becf8134db1dd 100644 (file)
@@ -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('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', "&Uuml;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");
 define('DOWNLOAD_NOW', "Jetzt downloaden!");
 define('ADMIN_MEMBER_STATS_TITLE', "Einstellungen an der Mitglieder-Statistik");
 define('ADMIN_MEMBER_STATS_LIMIT', "Anzahl Mailbuchungen pro Seite");
index c0db3f864d7ad5a73f9307bff6ec3368981b56fa..6e1e23f8af06e604330ced5951a5d3d132303a66 100644 (file)
@@ -44,9 +44,9 @@ ADD_DESCR("admin", basename(__FILE__));
 $ONLINE['code'] = "???";
 
 // Get response from our server in an array
 $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 {
        // 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(
 
                // 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
                );
 
                // Array for available patches
@@ -82,7 +83,7 @@ if (empty($response[0]) && empty($response[1]) && empty($response[2])) {
                        'ctime' => array()
                );
 
                        '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";
 
                        // 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, "<FONT class=\"admin_failed\">".ADMIN_CANNOT_CHECK_VERSION." (".$ONLINE['code'].")</FONT>");
 if (empty($ONLINE['version'])) {
        // Disconnected?
        LOAD_TEMPLATE("admin_settings_saved", false, "<FONT class=\"admin_failed\">".ADMIN_CANNOT_CHECK_VERSION." (".$ONLINE['code'].")</FONT>");
-} 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"));
        // 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");
 
        // Load template
        LOAD_TEMPLATE("admin_update_download");
index e3ec443cd32d789bfeb4e66c2f811aa0113d7ce1..19659950bfa2e662378900bc91f45d3ce90793da 100644 (file)
@@ -39,10 +39,10 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
 }
 
 // Check for patch level differences between databases and current hard-coded
 }
 
 // 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 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
 
        $_CONFIG['patch_ctime'] = time();
 } // END - if
 
index 91f7161d35683c91228fd8036844b7bf2ecf4d62..5e78bb232ba21940fd1be1ce46c44a01f548c2c0 100644 (file)
@@ -10,7 +10,7 @@
        <TR>
                <TD align="right" width="350">{--YOUR_VERSION_IS--}:</TD>
                <TD width="10" class="seperator">&nbsp;</TD>
        <TR>
                <TD align="right" width="350">{--YOUR_VERSION_IS--}:</TD>
                <TD width="10" class="seperator">&nbsp;</TD>
-               <TD><STRONG>v{!FULL_VERSION!}</STRONG></TD>
+               <TD><STRONG>v{!FULL_VERSION!} {!CURR_SVN_REVISION!}</STRONG></TD>
        </TR>
        <TR>
                <TD height="2" colspan="3" class="seperator">&nbsp;</TD>
        </TR>
        <TR>
                <TD height="2" colspan="3" class="seperator">&nbsp;</TD>
@@ -18,7 +18,7 @@
        <TR>
                <TD align="right" width="350">{--ONLINE_VERSION_IS--}:</TD>
                <TD width="10" class="seperator">&nbsp;</TD>
        <TR>
                <TD align="right" width="350">{--ONLINE_VERSION_IS--}:</TD>
                <TD width="10" class="seperator">&nbsp;</TD>
-               <TD><STRONG>v{--__ONLINE_VERSION--}</STRONG></TD>
+               <TD><STRONG>v{!__ONLINE_VERSION!} {!__ONLINE_REVISION!}</STRONG></TD>
        </TR>
        <TR>
                <TD height="2" colspan="3" class="seperator">&nbsp;</TD>
        </TR>
        <TR>
                <TD height="2" colspan="3" class="seperator">&nbsp;</TD>
        <TR>
                <TD align="right" width="350">{--UPDATE_CREATE_TIME--}:</TD>
                <TD width="10" class="seperator">&nbsp;</TD>
        <TR>
                <TD align="right" width="350">{--UPDATE_CREATE_TIME--}:</TD>
                <TD width="10" class="seperator">&nbsp;</TD>
-               <TD><STRONG>{--__ONLINE_CHANGE--}</STRONG></TD>
+               <TD><STRONG>{!__ONLINE_CHANGE!}</STRONG></TD>
+       </TR>
+       <TR>
+               <TD height="2" colspan="3" class="seperator">&nbsp;</TD>
        </TR>
        <TR>
                <TD height="10" colspan="3" class="seperator bottom2">&nbsp;</TD>
        </TR>
        <TR>
                <TD height="10" colspan="3" class="seperator bottom2">&nbsp;</TD>
                                </TD>
                        </TR>
                        <TR>
                                </TD>
                        </TR>
                        <TR>
-                               <TD align="right" height="25">{--DOWNLOAD_ZIP--}:&nbsp;</TD>
-                               <TD align="center"><STRONG><A
-                                       href="http://prdownloads.sourceforge.net/mxchange/mxchange-{--__ONLINE_VERSION--}.zip?download"
-                                       target="_blank">{--DOWNLOAD_NOW--}</A></STRONG></TD>
-                       </TR>
-                       <TR>
-                               <TD align="right" height="25">{--DOWNLOAD_BZIP2--}:&nbsp;</TD>
-                               <TD align="center"><STRONG><A
-                                       href="http://prdownloads.sourceforge.net/mxchange/mxchange-{--__ONLINE_VERSION--}.bzip2?download"
-                                       target="_blank">{--DOWNLOAD_NOW--}</A></STRONG></TD>
-                       </TR>
-                       <TR>
-                               <TD align="right" height="25">
-                               {--DOWNLOAD_FROM_SERVER--}:&nbsp;</TD>
-                               <TD align="center"><STRONG><A
-                                       href="{--SERVER_URL--}/cms/index/wht/downloads" target="_blank">{--DOWNLOAD_NOW--}</A></STRONG>
+                               <TD width="50%" align="right" height="40" style="padding-right:5px">
+                                       {--DOWNLOAD_SVN--}:
+                               </TD>
+                               <TD width="50%" align="center">
+                                       <STRONG><A href="{!SERVER_URL!}/cms/index/wht/svn" target="_blank">{--DOWNLOAD_NOW--}</A></STRONG>
                                </TD>
                        </TR>
                </TABLE>
                </TD>
        </TR>
        <TR>
                                </TD>
                        </TR>
                </TABLE>
                </TD>
        </TR>
        <TR>
-               <TD height="30" colspan="3" class="admin_footer seperator">&nbsp;</TD>
+               <TD colspan="3" class="admin_footer">
+                       {--SVN_CHECKOUT_COMMAND--}<br />
+                       svn co {!SERVER_URL!}/repos/mxchange-application/branches/{!FULL_VERSION!}/
+               </TD>
        </TR>
 </TABLE>
        </TR>
 </TABLE>