aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App')
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin.pm3
-rw-r--r--perllib/FixMyStreet/App/Controller/Location.pm2
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm2
3 files changed, 5 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm
index 047d15fe3..bd45ad55e 100644
--- a/perllib/FixMyStreet/App/Controller/Admin.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin.pm
@@ -73,6 +73,9 @@ sub index : Path : Args(0) {
bodies_str => { '!=', undef },
# Ignore very recent ones that probably just haven't been sent yet
confirmed => { '<', \"current_timestamp - '5 minutes'::interval" },
+ },
+ {
+ order_by => 'confirmed',
} )->all;
$c->stash->{unsent_reports} = \@unsent;
diff --git a/perllib/FixMyStreet/App/Controller/Location.pm b/perllib/FixMyStreet/App/Controller/Location.pm
index 81c2c33fc..416fb942a 100644
--- a/perllib/FixMyStreet/App/Controller/Location.pm
+++ b/perllib/FixMyStreet/App/Controller/Location.pm
@@ -112,7 +112,7 @@ sub determine_location_from_pc : Private {
# Log failure in a log db
try {
my $dbfile = FixMyStreet->path_to('../data/analytics.sqlite');
- my $db = DBI->connect("dbi:SQLite:dbname=$dbfile", undef, undef) or die "$DBI::errstr\n";
+ my $db = DBI->connect("dbi:SQLite:dbname=$dbfile", undef, undef, { PrintError => 0 }) or die "$DBI::errstr\n";
my $sth = $db->prepare("INSERT INTO location_searches_with_no_results
(datetime, cobrand, geocoder, url, user_input)
VALUES (?, ?, ?, ?, ?)") or die $db->errstr . "\n";
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index faa02f9fe..1a300da21 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -1247,7 +1247,7 @@ sub check_for_errors : Private {
if ( $c->cobrand->allow_anonymous_reports ) {
my $anon_details = $c->cobrand->anonymous_account;
$report->user->email(undef) if $report->user->email eq $anon_details->{email};
- $report->name(undef) if $report->name eq $anon_details->{name};
+ $report->name(undef) if $report->name && $report->name eq $anon_details->{name};
}
return;