aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Cobrand.pm
diff options
context:
space:
mode:
authorlouise <louise>2009-11-19 16:41:57 +0000
committerlouise <louise>2009-11-19 16:41:57 +0000
commit6ec5ce524874c7b2b96483cf4a5316692e9b19f0 (patch)
treedcfb7761110e1195b3a95ee8554107a6b62a106c /perllib/Cobrand.pm
parentbcc391ee7b2ea0c4de9b7986cc39054316325fa9 (diff)
Allow cobrands to supply some extra meta text for a problem
Diffstat (limited to 'perllib/Cobrand.pm')
-rw-r--r--perllib/Cobrand.pm19
1 files changed, 18 insertions, 1 deletions
diff --git a/perllib/Cobrand.pm b/perllib/Cobrand.pm
index fbfbfbe9a..99b46ee23 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.42 2009-11-19 15:10:28 louise Exp $
+# $Id: Cobrand.pm,v 1.43 2009-11-19 16:41:57 louise Exp $
package Cobrand;
use strict;
@@ -446,6 +446,23 @@ sub show_watermark {
}
}
+=item extra_problem_meta_text COBRAND PROBLEM
+
+Returns any extra text to be displayed with a problem.
+
+=cut
+sub extra_problem_meta_text {
+ my ($cobrand, $problem) = @_;
+ my $handle;
+ if ($cobrand){
+ $handle = cobrand_handle($cobrand);
+ }
+ if ( !$cobrand || !$handle || !$handle->can('extra_problem_meta_text')){
+ return '';
+ } else{
+ return $handle->extra_problem_meta_text($problem);
+ }
+}
=item url
Given a URL, return a URL with any extra params needed appended to it.