Don't even connect DB on feedback page
--- a/include/common-template.inc.php
+++ b/include/common-template.inc.php
@@ -169,6 +169,7 @@
</div><!-- /header -->
<a name="maincontent" id="maincontent"></a>
<div data-role="content"> ';
+ if ($GTFSREnabled) {
$overrides = getServiceOverride();
if ($overrides['service_id']) {
if ($overrides['service_id'] == "noservice") {
@@ -178,7 +179,6 @@
echo '<div id="servicewarning">Buses are running on an altered timetable today due to industrial action/public holiday. See <a href="http://www.action.act.gov.au">http://www.action.act.gov.au</a> for details.</div>';
}
}
- 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");