aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/Cobrand.pm21
1 files changed, 20 insertions, 1 deletions
diff --git a/perllib/Cobrand.pm b/perllib/Cobrand.pm
index 3b7daae60..ccf508b9d 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.38 2009-11-16 17:20:37 louise Exp $
+# $Id: Cobrand.pm,v 1.39 2009-11-17 10:36:35 louise Exp $
package Cobrand;
use strict;
@@ -130,6 +130,25 @@ sub base_url_for_emails {
}
}
+=item admin_base_url COBRAND
+
+Base URL for the admin interface.
+
+=cut
+sub admin_base_url {
+ my ($cobrand) = @_;
+ my $handle;
+ if ($cobrand){
+ $handle = cobrand_handle($cobrand);
+ }
+ if ( !$cobrand || !$handle || ! $handle->can('admin_base_url')){
+ return 0;
+ }{
+ return $handle->admin_base_url();
+ }
+
+}
+
=item contact_email COBRAND
Return the contact email for the cobranded version of the site