From: Alexander Sadleir Date: Sat, 05 Nov 2011 02:11:24 +0000 Subject: Tell pagodabox to conenct to AWS db server X-Git-Url: http://maxious.lambdacomplex.org/git/?p=busui.git&a=commitdiff&h=65ad37179e68ddcaf102fc3aaac120f7d47d0fa3 --- Tell pagodabox to conenct to AWS db server --- --- a/include/common-db.inc.php +++ b/include/common-db.inc.php @@ -15,7 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -if (php_uname('n') == "actbus-www") { +if (strstr(php_uname('n'),"actbus")) { $conn = new PDO("pgsql:dbname=transitdata;user=transitdata;password=transitdata;host=bus-main.lambdacomplex.org"); } else if (isDebugServer()) { $conn = new PDO("pgsql:dbname=transitdata;user=postgres;password=snmc;host=localhost"); --- a/include/common.inc.php +++ b/include/common.inc.php @@ -31,7 +31,7 @@ $cloudmadeAPIkey = "daa03470bb8740298d4b10e3f03d63e6"; $googleMapsAPIkey = "ABQIAAAA95XYXN0cki3Yj_Sb71CFvBTPaLd08ONybQDjcH_VdYtHHLgZvRTw2INzI_m17_IoOUqH3RNNmlTk1Q"; $otpAPIurl = 'http://localhost:8080/opentripplanner-api-webapp/'; -if (isDebug("awsotp") || php_uname('n') == "maxious.xen.prgmr.com") { +if (isDebug("awsotp") || php_uname('n') == "maxious.xen.prgmr.com" || strstr(php_uname('n'),"actbus")) { $otpAPIurl = 'http://bus-main.lambdacomplex.org:8080/opentripplanner-api-webapp/'; } if (isDebug("dotcloudotp") || php_uname('n') == "actbus-www") { @@ -56,7 +56,7 @@ function isDebugServer() { - return php_sapi_name() == "cli" || isset($_SERVER['SERVER_NAME']) && ( $_SERVER['SERVER_NAME'] == "azusa" || $_SERVER['SERVER_NAME'] == "vanille" + return php_sapi_name() == "cli" || strstr(php_uname('n'),"actbus") || isset($_SERVER['SERVER_NAME']) && ( $_SERVER['SERVER_NAME'] == "azusa" || $_SERVER['SERVER_NAME'] == "vanille" || $_SERVER['SERVER_NAME'] == "localhost" || $_SERVER['SERVER_NAME'] == "127.0.0.1" || $_SERVER['SERVER_NAME'] == "192.168.1.8"); }