forked from science-ation/science-ation
properly compare dbcodeversion and dbdbversion (trim the newline from dbcodeversion)
This commit is contained in:
parent
79f3d7ead6
commit
7fd17c8bbe
@ -118,6 +118,7 @@ else
|
|||||||
|
|
||||||
$dbdbversion=$config['DBVERSION'];
|
$dbdbversion=$config['DBVERSION'];
|
||||||
$dbcodeversion=@file($prependdir."db/db.code.version.txt");
|
$dbcodeversion=@file($prependdir."db/db.code.version.txt");
|
||||||
|
$dbcodeversion=trim($dbcodeversion[0]);
|
||||||
|
|
||||||
if(!$dbdbversion)
|
if(!$dbdbversion)
|
||||||
{
|
{
|
||||||
@ -129,7 +130,7 @@ if(!$dbdbversion)
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($dbcodeversion[0]!=$dbdbversion)
|
if($dbcodeversion!=$dbdbversion)
|
||||||
{
|
{
|
||||||
echo "<html><head><title>SFIAB ERROR</title></head><body>";
|
echo "<html><head><title>SFIAB ERROR</title></head><body>";
|
||||||
echo "<h1>Science Fair In A Box - ERROR</h1>";
|
echo "<h1>Science Fair In A Box - ERROR</h1>";
|
||||||
@ -142,7 +143,7 @@ if($dbcodeversion[0]!=$dbdbversion)
|
|||||||
echo "<br>";
|
echo "<br>";
|
||||||
echo "<br>";
|
echo "<br>";
|
||||||
echo "<h2>Details</h2>";
|
echo "<h2>Details</h2>";
|
||||||
echo "Current SFIAB codebase requires DB version: ".$dbcodeversion[0];
|
echo "Current SFIAB codebase requires DB version: ".$dbcodeversion;
|
||||||
echo "<br>";
|
echo "<br>";
|
||||||
echo "Current SFIAB database is detected as version: ".$dbdbversion;
|
echo "Current SFIAB database is detected as version: ".$dbdbversion;
|
||||||
echo "<br>";
|
echo "<br>";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user