aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Cobrand.pm
diff options
context:
space:
mode:
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 079f9957c..0030c2ccf 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.19 2009-09-22 15:56:44 louise Exp $
+# $Id: Cobrand.pm,v 1.20 2009-09-23 11:31:31 louise Exp $
package Cobrand;
use strict;
@@ -365,6 +365,23 @@ sub header_params {
}
}
+=item root_path_pattern COBRAND
+
+=cut
+
+sub root_path_pattern {
+ my ($cobrand) = @_;
+ my $handle;
+ if ($cobrand){
+ $handle = cobrand_handle($cobrand);
+ }
+ if ( !$cobrand || !$handle || !$handle->can('root_path_pattern')){
+ return '//g';
+ } else{
+ return $handle->root_path_pattern();
+ }
+}
+
1;