Fixed - showing old service alerts when calling the future alerts function
Fixed - showing old service alerts when calling the future alerts function

--- a/include/db/servicealert-dao.inc.php
+++ b/include/db/servicealert-dao.inc.php
@@ -106,7 +106,19 @@
 
 function getFutureAlerts() {
     global $conn;
-    $query = "SELECT id,extract('epoch' from start) as start, extract('epoch' from \"end\") as \"end\",cause,effect,header,description,url from servicealerts_alerts where NOW() > start or NOW() < \"end\"";
+    $query = "SELECT id,extract('epoch' from start) as start, extract('epoch' from \"end\") as \"end\",cause,effect,header,description,url from servicealerts_alerts where  NOW() < \"end\"";
+    // debug($query, "database");
+    $query = $conn->prepare($query);
+    $query->execute();
+    if (!$query) {
+        databaseError($conn->errorInfo());
+        return Array();
+    }
+    return $query->fetchAll();
+}
+function getAllAlerts() {
+    global $conn;
+    $query = "SELECT id,extract('epoch' from start) as start, extract('epoch' from \"end\") as \"end\",cause,effect,header,description,url from servicealerts_alerts";
     // debug($query, "database");
     $query = $conn->prepare($query);
     $query->execute();

--- a/rtpis/servicealert_editor.php
+++ b/rtpis/servicealert_editor.php
@@ -82,7 +82,7 @@
 <table>
     <?php
     foreach (getFutureAlerts() as $alert) {
-        echo "<tr><td>" . date("c", $alert['start']) . "</td><td>" . date("c", $alert['end']) . "</td><td>" . substr($alert['description'], 0, 999) . '</td><td><a href="?edit=' . $alert['id'] . '">edit</a></td></tr>';
+        echo "<tr><td>" . date("c", $alert['start']) . "<br>to<br>" . date("c", $alert['end']) . "</td><td><b>" .$alert['header']."</b><br>". $alert['description'] . '</td><td><a href="?edit=' . $alert['id'] . '">edit</a></td></tr>';
     }
     ?>
 </table>

--- /dev/null
+++ b/setup/graph-config.xml
@@ -1,1 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:context="http://www.springframework.org/schema/context"
+    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
 
+    <bean id="graphBundle" class="org.opentripplanner.model.GraphBundle">
+        <property name="path" value="c:\tmp\" />
+    </bean>
+
+    <bean id="gtfsBuilder" class="org.opentripplanner.graph_builder.impl.GtfsGraphBuilderImpl">
+        <property name="gtfsBundles">
+            <bean id="gtfsBundles" class="org.opentripplanner.graph_builder.model.GtfsBundles">
+                <property name="bundles">
+                    <list>
+                        <bean class="org.opentripplanner.graph_builder.model.GtfsBundle">
+                            <property name="path" value="C:\tmp\cbrfeed.zip" />
+                        </bean>
+                    </list>
+                </property>
+            </bean>
+        </property>
+    </bean>
+
+    <bean id="osmBuilder" class="org.opentripplanner.graph_builder.impl.osm.OpenStreetMapGraphBuilderImpl">
+        <property name="provider">
+    <bean class="org.opentripplanner.openstreetmap.impl.AnyFileBasedOpenStreetMapProviderImpl">
+        <property name="path" value="C:\Users\Madoka\Documents\canberra.osm" />
+    </bean>
+        </property>
+    </bean>
+
+    <bean id="transitStreetLink" class="org.opentripplanner.graph_builder.impl.TransitToStreetNetworkGraphBuilderImpl" />
+   <bean id="optimizeTransit" class="org.opentripplanner.graph_builder.impl.OptimizeTransitGraphBuilderImpl" />
+
+    <bean id="graphBuilderTask" class="org.opentripplanner.graph_builder.GraphBuilderTask">
+        <property name="graphBundle" ref="graphBundle" />
+        <property name="graphBuilders">
+            <list>
+                <!-- GTFS comes before OSM, because we use the loaded set of stops to determine our OSM coverage -->
+                <ref bean="gtfsBuilder" />
+                <ref bean="osmBuilder" />
+                <ref bean="transitStreetLink" />
+                <ref bean="optimizeTransit" />
+            </list>
+        </property>
+<property name="modes">
+  <list>
+    <bean class="org.opentripplanner.routing.core.TraverseOptions">
+      <property name="mode" value="WALK" />
+      <property name="optimize" value="QUICK" />
+    </bean>
+      </list>
+    </property>
+    <property name="contractionFactor" value="0.97" /> 
+</bean>
+</beans>