aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Cobrand.pm
diff options
context:
space:
mode:
authorlouise <louise>2009-12-08 17:43:13 +0000
committerlouise <louise>2009-12-08 17:43:13 +0000
commit0e2504c3634a29ceeac5070b7ede550ee4828e3c (patch)
tree6d961188ea3ec7cb08777d089c7a3a69b311d985 /perllib/Cobrand.pm
parent48c3414765c34109bcc5f6c114ce4425c8a6f292 (diff)
Allow cobrands to decide if they\'re going to ask people if they\'ve ever reported a problem before
Diffstat (limited to 'perllib/Cobrand.pm')
-rw-r--r--perllib/Cobrand.pm22
1 files changed, 21 insertions, 1 deletions
diff --git a/perllib/Cobrand.pm b/perllib/Cobrand.pm
index 410fec969..d225fdb8e 100644
--- a/perllib/Cobrand.pm
+++ b/perllib/Cobrand.pm
@@ -7,7 +7,7 @@
# Copyright (c) 2009 UK Citizens Online Democracy. All rights reserved.
# Email: louise@mysociety.org. WWW: http://www.mysociety.org
#
-# $Id: Cobrand.pm,v 1.48 2009-12-08 11:13:30 louise Exp $
+# $Id: Cobrand.pm,v 1.49 2009-12-08 17:43:13 louise Exp $
package Cobrand;
use strict;
@@ -785,6 +785,26 @@ sub all_councils_report {
}
}
+=item ask_ever_reported
+
+Return a boolean indicating whether people should be asked whether this
+is the first time they've reported a problem.
+
+=cut
+
+sub ask_ever_reported {
+ my ($cobrand) = @_;
+ my $handle;
+ if ($cobrand){
+ $handle = cobrand_handle($cobrand);
+ }
+ if ( !$cobrand || !$handle || !$handle->can('ask_ever_reported')){
+ return 1;
+ } else{
+ return $handle->ask_ever_reported();
+ }
+}
+
=item admin_pages COBRAND
List of names of pages to display on the admin interface