From: Maxious Date: Tue, 21 Feb 2012 14:20:27 +0000 Subject: Merge branch 'master' of github.com:maxious/ACTBus-ui X-Git-Url: http://maxious.lambdacomplex.org/git/?p=busui.git&a=commitdiff&h=b3303ab48e661c1c1fac26f80227232c33078d7b --- Merge branch 'master' of github.com:maxious/ACTBus-ui --- --- /dev/null +++ b/.gitmodules @@ -1,1 +1,4 @@ +[submodule "lib/amon-php"] + path = lib/amon-php + url = https://github.com/martinrusev/amon-php.git --- a/about.php +++ b/about.php @@ -20,8 +20,8 @@

Busness Time - An ACT bus timetable webapp
Based on the maxious-canberra-transit-feed (download, - last updated )
+ href="http://busresources.lambdacomplex.org/cbrfeed.zip">download, + last updated )
Source code for the transit feed and this --- a/aws/busuidb.sh +++ b/aws/busuidb.sh @@ -7,10 +7,10 @@ psql -d transitdata -f /var/www/transitdata.cbrfeed.sql #createuser transitdata -SDRP #password transitdata -#psql -d transitdata -c "GRANT SELECT ON TABLE agency,calendar,calendar_dates,routes,stop_times,stops,trips\ -#,servicealerts_alerts,servicealerts_informed TO transitdata;" -#psql -d transitdata -c "GRANT SELECT,INSERT ON TABLE myway_observations,myway_routes,myway_stops,myway_timingdeltas TO transitdata;" -#psql -d transitdata -c "GRANT SELECT,INSERT,UPDATE ON TABLE myway_routes,myway_stops TO transitdata;" +#psql -d transitdata -c "GRANT SELECT ON TABLE agency,calendar,calendar_dates,routes,stop_times,stops,trips TO transitdata;" +#psql -d transitdata -c "GRANT SELECT,INSERT ON TABLE myway_observations,myway_timingdeltas,myway_routes,myway_stops TO transitdata;" +#psql -d transitdata -c "GRANT SELECT,INSERT,UPDATE ON TABLE servicealerts_alerts,servicealerts_informed TO transitdata;" +#psql -d transitdata -c "GRANT USAGE,SELECT ON SEQUENCE servicealerts_alerts_id_seq TO transitdata;" ##psql -d transitdata -c "GRANT SELECT ON ALL TABLES IN SCHEMA public TO transitdata;" ## INSERT INTO geometry_columns(f_table_catalog, f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, "type") ##SELECT '', 'public', 'shapes', 'shape_pt', ST_CoordDim(shape_pt), ST_SRID(shape_pt), GeometryType(shape_pt) --- a/feedback.php +++ b/feedback.php @@ -67,7 +67,7 @@ echo "\nServer host/IP: ".php_uname("n"); echo "\nCurrent date/time: ". date("c"); echo "\nCurrent code revision: ".exec("git rev-parse --short HEAD"); - echo "\nCurrent timetables version: ".date("c",@filemtime('cbrfeed.zip')); + echo "\nCurrent timetables version: ".date("c",@filemtime('../busresources/cbrfeed.zip')); echo "\nDump of session: ".print_r($_SESSION,true); ?> --- a/include/common.inc.php +++ b/include/common.inc.php @@ -61,6 +61,12 @@ || $_SERVER['SERVER_NAME'] == "localhost" || $_SERVER['SERVER_NAME'] == "127.0.0.1" || $_SERVER['SERVER_NAME'] == "192.168.1.8" || $_SERVER['SERVER_NAME'] == "192.168.178.24"); } +if (isset($_SERVER['SERVER_NAME']) && $_SERVER['SERVER_NAME'] == "maxious.xen.prgmr.com") { +// Set the exception handler +require $basePath."/lib/amon-php/amon.php"; +Amon::setup_exception_handler(); +} + include_once ("common-geo.inc.php"); include_once ("common-net.inc.php"); include_once ("common-transit.inc.php"); --- /dev/null +++ b/lib/amon-php --- a/rtpis/servicealert_editor.php +++ b/rtpis/servicealert_editor.php @@ -35,18 +35,18 @@ echo "Saved " . $_REQUEST['saveedit']; die(); } -if ($_REQUEST['delete']) { +if (isset($_REQUEST['delete'])) { $deleteParts = explode(";", $_REQUEST['delete']); deleteInformedAlert($deleteParts[0], $deleteParts[1], $deleteParts[2]); echo "Deleted network inform for {$deleteParts[0]} ({$deleteParts[1]},{$deleteParts[2]})
\n"; die(); } -if ($_REQUEST['networkinform']) { +if (isset($_REQUEST['networkinform'])) { addInformedAlert($_REQUEST['networkinform'], "agency", "0", "inform"); echo "Added network inform for" . $_REQUEST['networkinform']; die(); } -if ($_REQUEST['stopsearch']) { +if (isset($_REQUEST['stopsearch'])) { addInformedAlert($_REQUEST['stopsearch'], "stop", $_REQUEST['stopid'], "remove"); echo "Added stop remove for" . $_REQUEST['stopsearch'] . ", stop" . $_REQUEST['stopid'] . "
\n"; @@ -59,7 +59,7 @@ } die(); } -if ($_REQUEST['streetsearch']) { +if (isset($_REQUEST['streetsearch'])) { echo "Informing stops of street
\n"; foreach (getStopsByName($_REQUEST['street']) as $stop) { @@ -87,7 +87,7 @@ ?>

@@ -95,19 +95,21 @@
" />
" />
@@ -141,12 +143,12 @@ } ?>
- + '; foreach (getInformedAlerts($_REQUEST['edit'], "", "") as $informed) {