From 40547996bdb16c5d2c507cb7111ae993a3fcebb9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 11 Oct 2009 17:01:34 +0000 Subject: [PATCH] Fix for missing FULL_VERSION config --- inc/config-global.php | 6 +++--- inc/functions.php | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/inc/config-global.php b/inc/config-global.php index 1a74f7970f..9ffed08a50 100644 --- a/inc/config-global.php +++ b/inc/config-global.php @@ -79,9 +79,6 @@ setConfigEntry('URL', $URL); // 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'); @@ -94,5 +91,8 @@ setConfigEntry('TITLE', 'MXChange - Mail Exchange'); // CFG: COPY setConfigEntry('COPY', 'Copyright © 2003 - 2008, by Roland Häder'); +// Connect to the MySQL database... +loadIncludeOnce('inc/mysql-connect.php'); + // ?> diff --git a/inc/functions.php b/inc/functions.php index 34e1aa54fe..6737f45808 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -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 .= "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'); -- 2.30.2