Update test hosts to include raj
authorMichael Ang <mang@archive.org>
Thu, 12 Aug 2010 23:28:54 +0000 (23:28 +0000)
committerMichael Ang <mang@archive.org>
Thu, 12 Aug 2010 23:28:54 +0000 (23:28 +0000)
BookReaderIA/datanode/BookReaderJSIA.php
BookReaderIA/datanode/BookReaderMeta.inc.php

index e549d44..e20c44e 100644 (file)
@@ -23,10 +23,17 @@ $itemPath = $_REQUEST['itemPath'];
 $subPrefix = $_REQUEST['subPrefix'];
 $server = $_REQUEST['server'];
 
+// $$$mang this code has been refactored into BookReaderMeta.inc.php for use e.g. by
+//         BookReaderPreview.php and BookReaderImages.php.  The code below should be
+//         taken out and replaced by calls into BookReaderMeta
+
 // Check if we're on a dev vhost and point to JSIA in the user's public_html on the datanode
+
 // $$$ TODO consolidate this logic
 if (strpos($_SERVER["REQUEST_URI"], "/~mang") === 0) { // Serving out of home dir
     $server .= ':80/~mang';
+} else if (strpos($_SERVER["REQUEST_URI"], "/~rkumar") === 0) { // Serving out of home dir
+    $server .= ':80/~rkumar';
 } else if (strpos($_SERVER["REQUEST_URI"], "/~testflip") === 0) { // Serving out of home dir
     $server .= ':80/~testflip';
 }
index c0afca3..d73ed4e 100644 (file)
@@ -418,10 +418,11 @@ class BookReaderMeta {
         
         // Check if we're on a dev vhost and point to JSIA in the user's public_html on the datanode
         // $$$ TODO consolidate this logic
-        if (strpos($_SERVER["REQUEST_URI"], "/~mang") === 0) { // Serving out of home dir
-            $server .= ':80/~mang';
-        } else if (strpos($_SERVER["REQUEST_URI"], "/~testflip") === 0) { // Serving out of home dir
-            $server .= ':80/~testflip';
+        $devHosts = array('testflip', 'rkumar', 'mang');
+        foreach ($devHosts as $host) {
+            if (strpos($_SERVER["REQUEST_URI"], '/~' . $host) === 0) { // Serving out of home dir
+                $server .= ':80/' . $host;
+            }
         }
         
         $this->emitResponse( $this->buildMetadata($id, $itemPath, $subPrefix, $server) );