diff options
-rw-r--r-- | db/alert_types.sql | 10 | ||||
-rw-r--r-- | perllib/Page.pm | 4 | ||||
-rwxr-xr-x | web/index.cgi | 4 |
3 files changed, 10 insertions, 8 deletions
diff --git a/db/alert_types.sql b/db/alert_types.sql index 80745e5e2..d909450c1 100644 --- a/db/alert_types.sql +++ b/db/alert_types.sql @@ -18,7 +18,7 @@ insert into alert_type values ('new_problems', '', '', 'New problems on FixMyStreet', '/', 'The latest problems reported by users', 'problem', 'problem.state in (\'confirmed\', \'fixed\')', 'created desc', - '{{title}}', '/?id={{id}}', '{{detail}}', 'alert-problem'); + '{{title}}, {{confirmed}}', '/?id={{id}}', '{{detail}}', 'alert-problem'); -- New problems around a location insert into alert_type @@ -29,7 +29,7 @@ insert into alert_type values ('local_problems', '', '', 'New local problems on FixMyStreet', '/', 'The latest local problems reported by users', 'problem_find_nearby(?, ?, ?) as nearby,problem', 'nearby.problem_id = problem.id and problem.state in (\'confirmed\', \'fixed\')', 'created desc', - '{{title}}', '/?id={{id}}', '{{detail}}', 'alert-problem'); + '{{title}}, {{confirmed}}', '/?id={{id}}', '{{detail}}', 'alert-problem'); -- New problems sent to a particular council insert into alert_type @@ -41,7 +41,7 @@ values ('council_problems', '', '', 'New problems to {{COUNCIL}} on FixMyStreet', '/reports', 'The latest problems for {{COUNCIL}} reported by users', 'problem', 'problem.state in (\'confirmed\', \'fixed\') and (council like \'%\'||?||\'%\' or (council is null and areas like \'%,\'||?||\',%\'))', 'created desc', - '{{title}}', '/?id={{id}}', '{{detail}}', 'alert-problem' + '{{title}}, {{confirmed}}', '/?id={{id}}', '{{detail}}', 'alert-problem' ); -- New problems within a particular ward sent to a particular council @@ -55,7 +55,7 @@ values ('ward_problems', '', '', 'The latest problems for {{COUNCIL}} within {{WARD}} ward reported by users', 'problem', 'problem.state in (\'confirmed\', \'fixed\') and (council like \'%\'||?||\'%\' or council is null) and areas like \'%,\'||?||\',%\'', 'created desc', - '{{title}}', '/?id={{id}}', '{{detail}}', 'alert-problem' + '{{title}}, {{confirmed}}', '/?id={{id}}', '{{detail}}', 'alert-problem' ); -- New problems within a particular voting area (ward, constituency, whatever) @@ -68,6 +68,6 @@ values ('area_problems', '', '', 'New problems within {{NAME}}\'s boundary on FixMyStreet', '/reports', 'The latest problems within {{NAME}}\'s boundary reported by users', 'problem', 'problem.state in (\'confirmed\', \'fixed\') and areas like \'%,\'||?||\',%\'', 'created desc', - '{{title}}', '/?id={{id}}', '{{detail}}', 'alert-problem' + '{{title}}, {{confirmed}}', '/?id={{id}}', '{{detail}}', 'alert-problem' ); diff --git a/perllib/Page.pm b/perllib/Page.pm index f131f929d..078cd9574 100644 --- a/perllib/Page.pm +++ b/perllib/Page.pm @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: Page.pm,v 1.60 2007-08-23 11:45:44 matthew Exp $ +# $Id: Page.pm,v 1.61 2007-08-27 11:40:38 matthew Exp $ # package Page; @@ -377,7 +377,7 @@ sub _ { sub display_problem_text { my ($q, $problem) = @_; - my $out = $q->h1(ent($problem->{title})); + my $out = $q->h1(ent(ucfirst $problem->{title})); # Display information about problem $out .= '<p><em>Reported '; diff --git a/web/index.cgi b/web/index.cgi index 9a64bf7c4..289f75528 100755 --- a/web/index.cgi +++ b/web/index.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: index.cgi,v 1.160 2007-08-24 12:27:30 matthew Exp $ +# $Id: index.cgi,v 1.161 2007-08-27 11:40:39 matthew Exp $ use strict; require 5.8.0; @@ -210,6 +210,8 @@ sub submit_problem { my $q = shift; my @vars = qw(council title detail name email phone pc easting northing skipped anonymous category flickr); my %input = map { $_ => scalar $q->param($_) } @vars; + $input{title} = lc $input{title} if $input{title} !~ /[a-z]/; + $input{detail} = lc $input{detail} if $input{detail} !~ /[a-z]/; my @errors; my $fh = $q->upload('photo'); |