aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatthew <matthew>2007-08-27 11:47:55 +0000
committermatthew <matthew>2007-08-27 11:47:55 +0000
commitd5096b4f393d2f8a18515b7808bd064dc71567ac (patch)
treed8be55dfb03e934395ecf2fcd77e34e594bc53e2
parentcf686992077d4e8ca977a6b3e7211fcb02874999 (diff)
Sort case upon database insertion.
-rw-r--r--perllib/Page.pm4
-rwxr-xr-xweb/index.cgi8
2 files changed, 7 insertions, 5 deletions
diff --git a/perllib/Page.pm b/perllib/Page.pm
index 078cd9574..5fd8a665d 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.61 2007-08-27 11:40:38 matthew Exp $
+# $Id: Page.pm,v 1.62 2007-08-27 11:47:55 matthew Exp $
#
package Page;
@@ -377,7 +377,7 @@ sub _ {
sub display_problem_text {
my ($q, $problem) = @_;
- my $out = $q->h1(ent(ucfirst $problem->{title}));
+ my $out = $q->h1(ent($problem->{title}));
# Display information about problem
$out .= '<p><em>Reported ';
diff --git a/web/index.cgi b/web/index.cgi
index 289f75528..760b08f2b 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.161 2007-08-27 11:40:39 matthew Exp $
+# $Id: index.cgi,v 1.162 2007-08-27 11:47:55 matthew Exp $
use strict;
require 5.8.0;
@@ -210,8 +210,10 @@ 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]/;
+ for (qw(title detail)) {
+ $input{$_} = lc $input{$_} if $input{$_} !~ /[a-z]/;
+ $input{$_} = ucfirst $input{$_};
+ }
my @errors;
my $fh = $q->upload('photo');