From: Alexander Sadleir Date: Sat, 05 Nov 2011 02:02:24 +0000 Subject: Don't even connect DB on feedback page X-Git-Url: https://maxious.lambdacomplex.org/git/?p=busui.git&a=commitdiff&h=6d1606f58a46ebb4c7782d407efeb68f1dee45a2 --- Don't even connect DB on feedback page --- --- a/.box +++ /dev/null @@ -1,5 +1,1 @@ -shared_writable_dirs: - - /labs/tiles - - /lib/staticmaplite/cache -php_extensions: [pgsql, pdo, pdo_pgsql, curl] --- /dev/null +++ b/Boxfile @@ -1,1 +1,7 @@ +web1: + php_extensions: + - pgsql + - pdo + - pdo_pgsql + - curl --- a/feedback.php +++ b/feedback.php @@ -1,5 +1,6 @@
'; + if ($GTFSREnabled) { $overrides = getServiceOverride(); if ($overrides['service_id']) { if ($overrides['service_id'] == "noservice") { @@ -178,7 +179,6 @@ echo '
Buses are running on an altered timetable today due to industrial action/public holiday. See http://www.action.act.gov.au for details.
'; } } - if ($GTFSREnabled) { $serviceAlerts = getServiceAlertsAsArray("agency", "0"); if (isset($serviceAlerts['entity']) && sizeof($serviceAlerts['entity']) > 0) { foreach ($serviceAlerts['entity'] as $entity) { --- a/include/common.inc.php +++ b/include/common.inc.php @@ -63,7 +63,9 @@ include_once ("common-geo.inc.php"); include_once ("common-net.inc.php"); include_once ("common-transit.inc.php"); -include_once ("common-db.inc.php"); +if (!strstr($_SERVER['PHP_SELF'], "feedback")) { + include_once ("common-db.inc.php"); +} include_once ("common-request.inc.php"); include_once ("common-session.inc.php");