aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Cobrand.pm
diff options
context:
space:
mode:
authorlouise <louise>2009-09-22 15:56:44 +0000
committerlouise <louise>2009-09-22 15:56:44 +0000
commit46f8f19ad7fd1bb3c0d36eb0624dadf2c25bb9f2 (patch)
tree7f9f1b3f6e53d4e3524316b4ad01f179015b0d3c /perllib/Cobrand.pm
parent994efa210dfe0dea7c8fb92e870c05b1407e8b3f (diff)
Adding the ability to return a hash of header params
Diffstat (limited to 'perllib/Cobrand.pm')
-rw-r--r--perllib/Cobrand.pm21
1 files changed, 20 insertions, 1 deletions
diff --git a/perllib/Cobrand.pm b/perllib/Cobrand.pm
index cb174aa9c..079f9957c 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.18 2009-09-22 14:54:01 louise Exp $
+# $Id: Cobrand.pm,v 1.19 2009-09-22 15:56:44 louise Exp $
package Cobrand;
use strict;
@@ -346,6 +346,25 @@ sub url {
return $url . '?' . extra_params($cobrand, $q);
}
+=item header_params
+
+Return any params to be added to responses
+
+=cut
+
+sub header_params {
+ my ($cobrand, $q) = @_;
+ my $handle;
+ if ($cobrand){
+ $handle = cobrand_handle($cobrand);
+ }
+ if ( !$cobrand || !$handle || !$handle->can('header_params')){
+ return {};
+ } else{
+ return $handle->header_params($q);
+ }
+}
+
1;