aboutsummaryrefslogtreecommitdiffstats
path: root/web/index.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'web/index.cgi')
-rwxr-xr-xweb/index.cgi10
1 files changed, 6 insertions, 4 deletions
diff --git a/web/index.cgi b/web/index.cgi
index 355c63ded..c7f67b558 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.318 2009-11-16 10:55:42 louise Exp $
+# $Id: index.cgi,v 1.319 2009-11-16 17:47:18 louise Exp $
use strict;
use Standard;
@@ -432,7 +432,8 @@ sub display_form {
my ($q, $errors, $field_errors) = @_;
my @errors = @$errors;
my %field_errors = %{$field_errors};
- push @errors, _('There were problems with your report. Please see below.') if (scalar keys %field_errors);
+ my $cobrand = Page::get_cobrand($q);
+ push @errors, _('There were problems with your report. Please see below.') if (scalar keys %field_errors && $cobrand ne 'emptyhomes');
my ($pin_x, $pin_y, $pin_tile_x, $pin_tile_y) = (0,0,0,0);
my @vars = qw(title detail name email phone pc easting northing x y skipped council anonymous partial upload_fileid lat lon);
@@ -901,7 +902,8 @@ sub display_problem {
my ($q, $errors, $field_errors) = @_;
my @errors = @$errors;
my %field_errors = %{$field_errors};
- push @errors, _('There were problems with your update. Please see below.') if (scalar keys %field_errors);
+ my $cobrand = Page::get_cobrand($q);
+ push @errors, _('There were problems with your update. Please see below.') if (scalar keys %field_errors && $cobrand ne 'emptyhomes');
my @vars = qw(id name rznvy update fixed add_alert upload_fileid x y submit_update);
my %input = map { $_ => $q->param($_) || '' } @vars;
@@ -919,7 +921,7 @@ sub display_problem {
}
# Redirect old /?id=NNN URLs to /report/NNN
- if (!@errors && $q->url(-absolute=>1) eq '/') {
+ if (!@errors && !scalar keys %field_errors && $q->url(-absolute=>1) eq '/') {
print $q->redirect(-location => $base . '/report/' . $input{id}, -status => 301);
return '';
}