aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-06-13 12:57:59 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-06-13 12:57:59 +0100
commit49e90bb2b91fb145c0e4cc96b3976170a711361d (patch)
treeae99b5114485e60128f45e34087547ab004c8109
parent33f89095b8ea6e1344aff35ee426e503486f8793 (diff)
Default cobrand has a moniker of an empty string, to match old data.
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index 249027c5c..e4061c744 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -39,7 +39,9 @@ the last part of the class name lowercased - eg 'F::C::SomeCobrand' becomes
sub moniker {
my $class = ref( $_[0] ) || $_[0]; # deal with object or class
my ($last_part) = $class =~ m{::(\w+)$};
- return lc($last_part);
+ $last_part = lc($last_part);
+ return '' if $last_part eq 'default';
+ return $last_part;
}
=head2 is_default
@@ -52,7 +54,7 @@ Returns true if this is the default cobrand, false otherwise.
sub is_default {
my $self = shift;
- return $self->moniker eq 'default';
+ return $self->moniker eq '';
}
=head2 path_to_web_templates