Recursively search for database config
authorJoey Schulze <joey@infodrom.org>
Mon, 21 Sep 2015 10:10:45 +0000 (10:10 +0000)
committerJoey Schulze <joey@infodrom.org>
Mon, 21 Sep 2015 10:10:45 +0000 (10:10 +0000)
Styles/service.style

index 25da7cc..9b49130 100644 (file)
@@ -54,7 +54,7 @@
 
 <td valign=top><img src=<root_prefix>pix/imgdot-1x1-transp.gif width=3 height=0 alt=""></td>
 
-<td valign=top align=left width=90%>
+<td valign=top align=left width=90% id="content">
 
 <table class=font width=100% border=0 cellpadding=1 cellspacing=0 bgcolor=#<bar-bgcolor>>
 <tr>
@@ -103,7 +103,15 @@ img.calendar {
 
 <define-tag future>
 <?php
-require_once('<root_prefix>/config.php');
+$dir = getcwd();
+while (strlen($dir) > 1) {
+  if (file_exists($dir.'/config.php')) {
+    require_once($dir.'/config.php');
+    break;
+  }
+  $dir = dirname($dir);
+}
+
 require_once('<root_prefix>/future.php');
 ?>
 </define-tag>