diff options
author | matthew <matthew> | 2009-09-24 20:41:36 +0000 |
---|---|---|
committer | matthew <matthew> | 2009-09-24 20:41:36 +0000 |
commit | 5a157fbfab7df7ad5db33d9c39326073e5702e9e (patch) | |
tree | 7a988cae826fd93810b1d014a8cc47bcac4ed7ad | |
parent | a3e01d551e97c872dd38c786c031f6021210bb9a (diff) |
Redirect lat/lon RSS to equivalent OS. Add FAQ about mobile apps.
-rwxr-xr-x | bin/test-run | 25 | ||||
-rwxr-xr-x | templates/website/faq.html | 9 | ||||
-rwxr-xr-x | web/rss.cgi | 6 |
3 files changed, 36 insertions, 4 deletions
diff --git a/bin/test-run b/bin/test-run index ccaf4e319..b7f9c4ce8 100755 --- a/bin/test-run +++ b/bin/test-run @@ -19,7 +19,7 @@ # RSS # Whatever I've missed! -my $rcsid = ''; $rcsid .= '$Id: test-run,v 1.22 2009-09-24 09:29:27 louise Exp $'; +my $rcsid = ''; $rcsid .= '$Id: test-run,v 1.23 2009-09-24 20:41:36 matthew Exp $'; use strict; require 5.8.0; @@ -34,7 +34,7 @@ use File::Find; use lib "$FindBin::Bin/../perllib"; use Cobrand; -my @actions = ('report', 'update', 'questionnaire', 'alert', 'static', 'cobrand', 'unit', 'eha_alert', 'import'); +my @actions = ('report', 'update', 'questionnaire', 'alert', 'static', 'cobrand', 'unit', 'eha_alert', 'import', 'rss'); my %actions_desc = ( 'report' => 'report a problem', 'update' => 'leave an update on a report', @@ -45,6 +45,7 @@ my %actions_desc = ( 'cobrand' => 'check cobranding', 'unit' => 'run the unit tests', 'import' => 'check the ability to programmatically import a problem', + 'rss' => 'check RSS feeds', ); date_print("Set up web test harness..."); @@ -96,6 +97,7 @@ foreach (@actions) { do_unit() if $_ eq 'unit'; do_eha_alert() if $_ eq 'eha_alert'; do_import() if $_ eq 'import'; + do_rss() if $_ eq 'rss'; } # Check for any unhandled mails or errors @@ -489,6 +491,25 @@ sub do_static { $wth->email_get_containing('%This is a test message%'); } +sub do_rss { + $wth->browser_get($base_url . '/rss/l/52.5/-1.9'); + print $wth->browser_uri() . "\n"; + $wth->browser_get($base_url . '/rss/2524/1779'); + print $wth->browser_uri() . "\n"; + $wth->browser_get($base_url . '/rss/pc/SW1A1AA'); + print $wth->browser_uri() . "\n"; + $wth->browser_get($base_url . '/rss/area/Birmingham'); + print $wth->browser_uri() . "\n"; + $wth->browser_get($base_url . '/rss/reports/Birmingham'); + print $wth->browser_uri() . "\n"; + $wth->browser_get($base_url . '/rss/reports/Birmingham/Lozells'); + print $wth->browser_uri() . "\n"; + $wth->browser_get($base_url . '/rss/reports/Gloucestershire'); + print $wth->browser_uri() . "\n"; + $wth->browser_get($base_url . '/rss/area/Gloucestershire'); + print $wth->browser_uri() . "\n"; +} + #browser_get(URL) #browser_follow_link(text_regex => qr//) #browser_check_contents(qr// | '') diff --git a/templates/website/faq.html b/templates/website/faq.html index f7331465f..d2acf152e 100755 --- a/templates/website/faq.html +++ b/templates/website/faq.html @@ -54,6 +54,15 @@ then together lobby the council to fix it, or fix it directly yourselves.</dd> <dd>The site is free to use, yes. FixMyStreet is run by a registered charity, though, so if you want to make a contribution, <a href="https://secure.mysociety.org/donate/">please do</a>.</dd> + + <dt>Can I use FixMyStreet on my mobile?</dt> + <dd>There is an iPhone app for FixMyStreet, written by us and + <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=297456545&mt=8">available for download on the App Store</a> + (link opens the App Store in iTunes). + There is an Android app written by a volunteer, Anna Powell-Smith, + available from the Android Market. + </dd> + <dt>Why do you only cover the countries of Great Britain?</dt> <dd>We would love to cover Northern Ireland, but as we were funded for FixMyStreet by the Department for Constitutional Affairs (now the Ministry diff --git a/web/rss.cgi b/web/rss.cgi index 215a7421a..d455e9d1a 100755 --- a/web/rss.cgi +++ b/web/rss.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: rss.cgi,v 1.28 2009-09-15 17:42:43 louise Exp $ +# $Id: rss.cgi,v 1.29 2009-09-24 20:41:36 matthew Exp $ use strict; use Error qw(:try); @@ -44,7 +44,7 @@ sub main { } else { my $base = mySociety::Config::get('BASE_URL'); print $q->redirect($base . '/alert'); - exit; + return ''; } print $q->header( -type => 'application/xml; charset=utf-8' ); $out =~ s/FixMyStreet/EnviroCrime/g if $q->{site} eq 'scambs'; @@ -66,6 +66,8 @@ sub rss_local_problems { ($e, $n) = mySociety::GeoUtil::wgs84_to_national_grid($lat, $lon, 'G'); $x = Page::os_to_tile($e); $y = Page::os_to_tile($n); + print $q->redirect(-location => "$base/rss/$x/$y"); + return ''; } elsif ($x && $y) { $e = Page::tile_to_os($x); $n = Page::tile_to_os($y); |