added some config jargon
[glcas.git] / libglcas / lib.php
index 05811a6..ef329be 100644 (file)
@@ -46,4 +46,18 @@ function glcas_pluginLoader($path="")
        }
 }
 
+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