DB fixes
DB fixes

--- a/aws/awsStartup.sh
+++ b/aws/awsStartup.sh
@@ -22,7 +22,7 @@
 psql -d transitdata -f /var/www/transitdata.cbrfeed.sql
 #createuser transitdata -SDRP
 #password transitdata
-#psql -c \"GRANT SELECT ON TABLE agency,calendar,calendar_dates,routes,stop_times,stops,trips TO transitdata;\"
+#psql -d transitdata -c \"GRANT SELECT ON TABLE agency,calendar,calendar_dates,routes,stop_times,stops,trips TO transitdata;\"
 php /var/www/updatedb.php
 
 wget http://s3-ap-southeast-1.amazonaws.com/busresources/Graph.obj \

--- a/include/common-db.inc.php
+++ b/include/common-db.inc.php
@@ -1,5 +1,5 @@
 <?php
-  if ($isDebugServer) $conn = pg_connect("dbname=transitdata user=postgres password=snmc");
+  if (isDebugServer()) $conn = pg_connect("dbname=transitdata user=postgres password=snmc");
   if (php_uname('n') == "actbus-www") $conn = pg_connect("dbname=transitdata user=transitdata password=transitdata host=db.actbus.dotcloud.com port=2242");
   if (!$conn) {
       echo "An error occured.\n";