X-Git-Url: http://git.pjr.cc/?a=blobdiff_plain;f=www%2Findex.php;h=bf3bc2c938bfa3b561602d1827fb8dd08a54a06a;hb=e935e20710eff1bcae9da93ead67ba0c4a4a849e;hp=47a19a4e9524499915f61112e207bcb79fcdea81;hpb=d180d75c38719089d9ecbb98f6c03a97af0199af;p=glcas.git diff --git a/www/index.php b/www/index.php index 47a19a4..bf3bc2c 100644 --- a/www/index.php +++ b/www/index.php @@ -22,23 +22,13 @@ glcas_pluginLoader(); $configpath = ""; // TODO: do this better -if(file_exists($WEB_ROOT_FS."/../var")) { - - // is it there? - if(file_exists($WEB_ROOT_FS."/../var/glcas/webconfig")) { - $configpath = realpath("$WEB_ROOT_FS/../var/glcas/webconfig"); - } else { - // if not, attempt to create - if(!file_exists($WEB_ROOT_FS."/../var/glcas")) { - mkdir($WEB_ROOT_FS."/../var/glcas"); - } - // success! - touch("$WEB_ROOT_FS/../var/glcas/webconfig"); - $configpath = realpath("$WEB_ROOT_FS/../var/glcas/webconfig"); - } -} +$configpath = glcas_getWebConfigPath(); +header("Accept-Ranges: bytes"); -header("Accept-Ranges: none"); +if($configpath == false) { + glcas_startInstaller(); + return; +} $glconfig = new GLCASConfig(); $glconfig->loadConfig($configpath);