forked from science-ation/science-ation
Fix version detection.
This commit is contained in:
parent
35761a542b
commit
76513f9ffb
@ -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
|
//figure out the directory to prepend to directoroy names, depending on if we are in a subdirectory or not
|
||||||
if(substr(getcwd(),-6)=="/admin")
|
if(substr(getcwd(),-6)=="/admin")
|
||||||
$prependdir="../";
|
$prependdir="../";
|
||||||
@ -35,6 +32,10 @@ else if(substr(getcwd(),-3)=="/db")
|
|||||||
else
|
else
|
||||||
$prependdir="";
|
$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!
|
//make sure the data subdirectory is writable, if its not, then we're screwed, so make sure it is!
|
||||||
if(!is_writable($prependdir."data"))
|
if(!is_writable($prependdir."data"))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user