Refactor trip/route view
[busui.git] / updatedb.php
blob:a/updatedb.php -> blob:b/updatedb.php
--- a/updatedb.php
+++ b/updatedb.php
@@ -1,5 +1,7 @@
 <?php
-include('include/common-db.inc.php');
+if ( php_sapi_name() == "cli") {
+include ('include/common.inc.php');
+$conn = pg_connect("dbname=transitdata user=postgres password=snmc host=localhost") or die('connection failed');
 // Unzip cbrfeed.zip, import all csv files to database
 $unzip = true;
 $zip = zip_open(dirname(__FILE__) . "/cbrfeed.zip");
@@ -56,5 +58,6 @@
 
 	}
 }
+}
 ?>