From 7fd17c8bbe4ffa2ed7dbc2faa470811a6d318d94 Mon Sep 17 00:00:00 2001 From: james Date: Tue, 7 Jun 2005 21:10:39 +0000 Subject: [PATCH] properly compare dbcodeversion and dbdbversion (trim the newline from dbcodeversion) --- common.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common.inc.php b/common.inc.php index 3d8013a..3ed1891 100644 --- a/common.inc.php +++ b/common.inc.php @@ -118,6 +118,7 @@ else $dbdbversion=$config['DBVERSION']; $dbcodeversion=@file($prependdir."db/db.code.version.txt"); +$dbcodeversion=trim($dbcodeversion[0]); if(!$dbdbversion) { @@ -129,7 +130,7 @@ if(!$dbdbversion) exit; } -if($dbcodeversion[0]!=$dbdbversion) +if($dbcodeversion!=$dbdbversion) { echo "SFIAB ERROR"; echo "

Science Fair In A Box - ERROR

"; @@ -142,7 +143,7 @@ if($dbcodeversion[0]!=$dbdbversion) echo "
"; echo "
"; echo "

Details

"; - echo "Current SFIAB codebase requires DB version: ".$dbcodeversion[0]; + echo "Current SFIAB codebase requires DB version: ".$dbcodeversion; echo "
"; echo "Current SFIAB database is detected as version: ".$dbdbversion; echo "
";