Fix version detection.

This commit is contained in:
james 2005-11-21 21:11:34 +00:00
parent 35761a542b
commit 76513f9ffb

View File

@ -22,9 +22,6 @@
*/
?>
<?
$sfiabversion=@file("version.txt");
$config['version']=$sfiabversion[0];
//figure out the directory to prepend to directoroy names, depending on if we are in a subdirectory or not
if(substr(getcwd(),-6)=="/admin")
$prependdir="../";
@ -35,6 +32,10 @@ else if(substr(getcwd(),-3)=="/db")
else
$prependdir="";
$sfiabversion=@file($prependdir."version.txt");
$config['version']=$sfiabversion[0];
//make sure the data subdirectory is writable, if its not, then we're screwed, so make sure it is!
if(!is_writable($prependdir."data"))
{