From 2d089f1c94a81fec515dff7a1708544bdee181cd Mon Sep 17 00:00:00 2001 From: Andre Lorbach Date: Fri, 24 Oct 2008 17:35:57 +0200 Subject: [PATCH] Fixed a bug in the convert.php script which inserted the wrong database version number This caused phpLogCon to force an database upgrade which is not needed at all. --- src/convert.php | 2 +- src/install.php | 6 +++--- src/templates/convert.html | 2 +- src/templates/install.html | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/convert.php b/src/convert.php index c20e989..cc35057 100644 --- a/src/convert.php +++ b/src/convert.php @@ -162,7 +162,7 @@ else if ( $content['CONVERT_STEP'] == 3 ) } // Append INSERT Statement for Config Table to set the Database Version ^^! - $mycommands[count($mycommands)] = "INSERT INTO `" . GetConfigSetting("UserDBPref") . "config` (`propname`, `propvalue`, `is_global`) VALUES ('database_installedversion', '" . $content['database_internalversion'] . "', " . $content['database_internalversion'] . ")"; + $mycommands[count($mycommands)] = "INSERT INTO `" . GetConfigSetting("UserDBPref") . "config` (`propname`, `propvalue`, `is_global`) VALUES ('database_installedversion', '" . $content['database_internalversion'] . "', 1)"; // --- Now execute all commands ini_set('error_reporting', E_WARNING); // Enable Warnings! diff --git a/src/install.php b/src/install.php index d307665..e99e6c3 100644 --- a/src/install.php +++ b/src/install.php @@ -260,7 +260,7 @@ else if ( $content['INSTALL_STEP'] == 3 ) if ( isset($_GET['errormsg']) ) { $content['iserror'] = "true"; - $content['errormsg'] = urldecode($_GET['errormsg']); + $content['errormsg'] = urldecode( DB_StripSlahes($_GET['errormsg']) ); } } else if ( $content['INSTALL_STEP'] == 4 ) @@ -461,7 +461,7 @@ else if ( $content['INSTALL_STEP'] == 6 ) if ( isset($_GET['errormsg']) ) { $content['iserror'] = "true"; - $content['errormsg'] = urldecode($_GET['errormsg']); + $content['errormsg'] = urldecode( DB_StripSlahes($_GET['errormsg']) ); } } else // NO Database means NO user management, so next step! @@ -553,7 +553,7 @@ else if ( $content['INSTALL_STEP'] == 7 ) if ( isset($_GET['errormsg']) ) { $content['iserror'] = "true"; - $content['errormsg'] = urldecode($_GET['errormsg']); + $content['errormsg'] = urldecode( DB_StripSlahes($_GET['errormsg']) ); } } else if ( $content['INSTALL_STEP'] == 8 ) diff --git a/src/templates/convert.html b/src/templates/convert.html index d4030a2..3912540 100644 --- a/src/templates/convert.html +++ b/src/templates/convert.html @@ -27,7 +27,7 @@
-

{LN_CONVERT_TITLETOP}

+

{LN_CONVERT_TITLETOP}

diff --git a/src/templates/install.html b/src/templates/install.html index db4cf5b..50faee6 100644 --- a/src/templates/install.html +++ b/src/templates/install.html @@ -56,7 +56,7 @@
-

{INSTALL_TITLETOP}

+

{INSTALL_TITLETOP}