--- a/include/common-template.inc.php
+++ b/include/common-template.inc.php
@@ -156,11 +156,11 @@
echo '
';
}
}
- if ($serviceAlertsEnabled) {
- $serviceAlerts = getServiceAlerts("network","network");
- foreach ($serviceAlerts['entities'] as $entity) {
- echo "".date("F j, g:i a",strtotime($entity['alert']['active_period']['start']))." to ". date("F j, g:i a", strtotime($entity['alert']['active_period']['end']))."{$entity['alert']['header_text']['translation']['text']}
Warning: {$entity['alert']['description_text']['translation']['text']}
-
Source ";
+ if ($GTFSREnabled) {
+ $serviceAlerts = getServiceAlertsAsArray("agency","0");
+ foreach ($serviceAlerts['entity'] as $entity) {
+ echo "".date("F j, g:i a",strtotime($entity['alert']['active_period'][0]['start']))." to ". date("F j, g:i a", strtotime($entity['alert']['active_period'][0]['end']))."{$entity['alert']['header_text']['translation'][0]['text']}
Warning: {$entity['alert']['description_text']['translation'][0]['text']}
+
Source ";
}
}
}