diff options
Diffstat (limited to 'web')
-rwxr-xr-x | web/contact.cgi | 5 | ||||
-rwxr-xr-x | web/index.cgi | 10 |
2 files changed, 9 insertions, 6 deletions
diff --git a/web/contact.cgi b/web/contact.cgi index af7135c95..665990ee9 100755 --- a/web/contact.cgi +++ b/web/contact.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: contact.cgi,v 1.46 2009-11-11 15:59:49 louise Exp $ +# $Id: contact.cgi,v 1.47 2009-11-16 17:47:18 louise Exp $ use strict; use Standard; @@ -113,7 +113,8 @@ sub contact_page { 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 @vars = qw(name em subject message); my %input = map { $_ => $q->param($_) || '' } @vars; my %input_h = map { $_ => $q->param($_) ? ent($q->param($_)) : '' } @vars; 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 ''; } |