aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2014-01-30 15:36:22 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2014-01-30 15:36:22 +0000
commit114659f272d26a646c6f2098cdbe0803843726f4 (patch)
treea11d00ad4589a2b3e6f131759af7cc185cbda711
parent3f63107eb5f7cc5f6de70826b773de16cedbec1d (diff)
[Bromley] Reduce update character limit to 1750.
Following on from f117167 (and fixing comment from that commit).
-rw-r--r--perllib/FixMyStreet/DB/Result/Comment.pm5
-rw-r--r--perllib/FixMyStreet/DB/Result/Problem.pm5
2 files changed, 6 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm
index 2d5b6b2c3..e170a5655 100644
--- a/perllib/FixMyStreet/DB/Result/Comment.pm
+++ b/perllib/FixMyStreet/DB/Result/Comment.pm
@@ -126,9 +126,10 @@ sub check_for_errors {
$errors{update} = _('Please enter a message')
unless $self->text =~ m/\S/;
+ # Bromley Council custom character limit
if ( $self->text && $self->problem && $self->problem->bodies_str
- && $self->problem->bodies_str eq '2482' && length($self->text) > 2000 ) {
- $errors{update} = _('Updates are limited to 2000 characters in length. Please shorten your update');
+ && $self->problem->bodies_str eq '2482' && length($self->text) > 1750 ) {
+ $errors{update} = sprintf( _('Updates are limited to %s characters in length. Please shorten your update'), 1750 );
}
return \%errors;
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm
index 90c75401e..a06a339bf 100644
--- a/perllib/FixMyStreet/DB/Result/Problem.pm
+++ b/perllib/FixMyStreet/DB/Result/Problem.pm
@@ -389,11 +389,12 @@ sub check_for_errors {
}
if ( $self->bodies_str && $self->detail ) {
- # Barnet Council custom character limit.
+ # Custom character limit:
+ # Bromley Council
if ( $self->bodies_str eq '2482' && length($self->detail) > 1750 ) {
$errors{detail} = sprintf( _('Reports are limited to %s characters in length. Please shorten your report'), 1750 );
}
-
+ # Oxfordshire
if ( $self->bodies_str eq '2237' && length($self->detail) > 1700 ) {
$errors{detail} = sprintf( _('Reports are limited to %s characters in length. Please shorten your report'), 1700 );
}