[Solar-svn] Revision 3002

pmjones at solarphp.com pmjones at solarphp.com
Mon Mar 17 10:19:36 CDT 2008


Solar binary: look up config file relative to a solar-system installation


Modified: trunk/bin/solar
===================================================================
--- trunk/bin/solar	2008-03-17 15:12:56 UTC (rev 3001)
+++ trunk/bin/solar	2008-03-17 15:19:35 UTC (rev 3002)
@@ -102,12 +102,18 @@
  * Discover the config file
  */
 
-$config_key = 'PHP_' . strtoupper($vendor) . '_CONFIG_FILE';
+$vendor_key = 'PHP_' . strtoupper($vendor) . '_CONFIG_FILE';
 switch (true) {
 
+// are we in a "solar system" installation? recognize this from the standard
+// directory structure and the physical file location within it.
+case (substr(__FILE__, -23) == '/source/solar/bin/solar'):
+    $config = substr(__FILE__, 0, -23) . "/config/$vendor.config.php";
+    break;
+    
 // the vendor-specific default config
-case (! empty($_SERVER[$config_key])):
-    $config = $_SERVER[$config_key];
+case (! empty($_SERVER[$vendor_key])):
+    $config = $_SERVER[$vendor_key];
     break;
     
 // fall back to the solar default config




More information about the Solar-svn mailing list