Licence and jqmobile beta 3 upgrade
[busui.git] / include / common-db.inc.php
blob:a/include/common-db.inc.php -> blob:b/include/common-db.inc.php
--- 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");
@@ -27,7 +27,9 @@
 }
 
 function databaseError($errMsg) {
-    die($errMsg);
+    if ($errMsg[1] != "") {
+    die(print_r($errMsg,true));
+    }
 }
 
 include ('db/route-dao.inc.php');