aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r--perllib/FixMyStreet/App/Controller/Photo.pm5
-rw-r--r--perllib/FixMyStreet/Cobrand/Zurich.pm2
2 files changed, 2 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Photo.pm b/perllib/FixMyStreet/App/Controller/Photo.pm
index cefb2695a..8b00d1533 100644
--- a/perllib/FixMyStreet/App/Controller/Photo.pm
+++ b/perllib/FixMyStreet/App/Controller/Photo.pm
@@ -74,10 +74,7 @@ sub index :LocalRegex('^(c/)?(\d+)(?:\.(full|tn|fp))?\.jpeg$') {
$c->detach( 'no_photo' ) unless @photo;
my $item = $photo[0];
- # This should only be for reports, not updates
- unless ( $c->cobrand->allow_photo_display($item) || ( $c->user_exists && $c->user->from_body ) ) {
- $c->detach( 'no_photo' )
- }
+ $c->detach( 'no_photo' ) unless $c->cobrand->allow_photo_display($item); # Should only be for reports, not updates
my $photo = $item->photo;
# If photo field contains a hash
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm
index 0d9fd5752..ffdc1feab 100644
--- a/perllib/FixMyStreet/Cobrand/Zurich.pm
+++ b/perllib/FixMyStreet/Cobrand/Zurich.pm
@@ -107,7 +107,7 @@ sub updates_as_hashref {
sub allow_photo_display {
my ( $self, $r ) = @_;
if (ref($r) ne 'HASH') {
- return $r->extra->{publish_photo};
+ return $r->extra && $r->extra->{publish_photo};
}
my $extra = $r->{extra};
utf8::encode($extra) if utf8::is_utf8($extra);