aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Cobrand.pm
diff options
context:
space:
mode:
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 1acff1358..d4d76aeec 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.27 2009-10-15 16:34:31 louise Exp $
+# $Id: Cobrand.pm,v 1.28 2009-10-19 11:10:32 louise Exp $
package Cobrand;
use strict;
@@ -471,6 +471,25 @@ sub on_map_list_limit {
}
}
+=item allow_photo_upload COBRAND
+
+Return a boolean indicating whether the cobrand allows photo uploads
+
+=cut
+
+sub allow_photo_upload {
+ my ($cobrand) = @_;
+ my $handle;
+ if ($cobrand){
+ $handle = cobrand_handle($cobrand);
+ }
+ if ( !$cobrand || !$handle || !$handle->can('allow_photo_upload')){
+ return 1;
+ } else{
+ return $handle->allow_photo_upload();
+ }
+}
+
1;