hello
[glcas.git] / libglcas / config.php
index 506a0b3..2009823 100644 (file)
@@ -74,4 +74,19 @@ class GLCASConfig {
        
 }
 
+function glcas_getWebConfigPath()
+{
+       global $WEB_ROOT_FS, $URL_HANDLERS, $BASE_URL;
+
+       // if you wish to add more places to find webconfig, add them here.
+       $configpath = false;
+       if(file_exists($WEB_ROOT_FS."/../var/glcas/webconfig")) return realpath($WEB_ROOT_FS."/../var/glcas/webconfig");
+       if(file_exists("/var/lib/glcas/webconfig")) return realpath("/var/lib/glcas/webconfig");
+       if(file_exists("/var/run/glcas/webconfig")) return realpath("/var/run/glcas/webconfig");
+       
+       return $configpath;
+       //return false; 
+}
+
+
 ?>
\ No newline at end of file