Fix for missing FULL_VERSION config
authorRoland Häder <roland@mxchange.org>
Sun, 11 Oct 2009 17:01:34 +0000 (17:01 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 11 Oct 2009 17:01:34 +0000 (17:01 +0000)
inc/config-global.php
inc/functions.php

index 1a74f7970f3654b3e97e8c800312c310b1d22b4d..9ffed08a5029186fad5be700f16825bf6a6773ed 100644 (file)
@@ -79,9 +79,6 @@ setConfigEntry('URL', $URL);
 // CFG: SERVER-PATH
 setConfigEntry('PATH', str_replace("\\", '/', substr(dirname(__FILE__), 0, -3)));
 
 // CFG: SERVER-PATH
 setConfigEntry('PATH', str_replace("\\", '/', substr(dirname(__FILE__), 0, -3)));
 
-// Connect to the MySQL database...
-loadIncludeOnce('inc/mysql-connect.php');
-
 // CFG: VERSION
 setConfigEntry('VERSION', 'v0.2.1');
 
 // CFG: VERSION
 setConfigEntry('VERSION', 'v0.2.1');
 
@@ -94,5 +91,8 @@ setConfigEntry('TITLE', 'MXChange - Mail Exchange');
 // CFG: COPY
 setConfigEntry('COPY', 'Copyright &copy; 2003 - 2008, by Roland H&auml;der');
 
 // CFG: COPY
 setConfigEntry('COPY', 'Copyright &copy; 2003 - 2008, by Roland H&auml;der');
 
+// Connect to the MySQL database...
+loadIncludeOnce('inc/mysql-connect.php');
+
 //
 ?>
 //
 ?>
index 34e1aa54fedfbc70905ed34f53126602dfc21d7b..6737f4580844963e85acfa5ea4bbd88aec7d6eb9 100644 (file)
@@ -1790,7 +1790,11 @@ function sendGetRequest ($script) {
        $request  = "GET /" . trim($script) . " HTTP/1.1" . getConfig('HTTP_EOL');
        $request .= "Host: " . $host . getConfig('HTTP_EOL');
        $request .= "Referer: " . getConfig('URL') . "/admin.php" . getConfig('HTTP_EOL');
        $request  = "GET /" . trim($script) . " HTTP/1.1" . getConfig('HTTP_EOL');
        $request .= "Host: " . $host . getConfig('HTTP_EOL');
        $request .= "Referer: " . getConfig('URL') . "/admin.php" . getConfig('HTTP_EOL');
-       $request .= "User-Agent: " . getConfig('TITLE') . '/' . getConfig('FULL_VERSION') . getConfig('HTTP_EOL');
+       if (isConfigEntrySet('FULL_VERSION')) {
+               $request .= "User-Agent: " . getConfig('TITLE') . '/' . getConfig('FULL_VERSION') . getConfig('HTTP_EOL');
+       } else {
+               $request .= "User-Agent: " . getConfig('TITLE') . '/' . getConfig('VERSION') . getConfig('HTTP_EOL');
+       }
        $request .= "Content-Type: text/plain" . getConfig('HTTP_EOL');
        $request .= "Cache-Control: no-cache" . getConfig('HTTP_EOL');
        $request .= "Connection: Close" . getConfig('HTTP_EOL') . getConfig('HTTP_EOL');
        $request .= "Content-Type: text/plain" . getConfig('HTTP_EOL');
        $request .= "Cache-Control: no-cache" . getConfig('HTTP_EOL');
        $request .= "Connection: Close" . getConfig('HTTP_EOL') . getConfig('HTTP_EOL');