diff options
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Photo.pm | 5 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Zurich.pm | 2 | ||||
-rw-r--r-- | templates/web/zurich/admin/report_edit-sdm.html | 3 | ||||
-rw-r--r-- | templates/web/zurich/admin/report_edit.html | 3 |
4 files changed, 4 insertions, 9 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); diff --git a/templates/web/zurich/admin/report_edit-sdm.html b/templates/web/zurich/admin/report_edit-sdm.html index 85fa0a067..fcdb03602 100644 --- a/templates/web/zurich/admin/report_edit-sdm.html +++ b/templates/web/zurich/admin/report_edit-sdm.html @@ -47,8 +47,7 @@ <li><span class="mock-label">[% loc('Created:') %]</span> [% PROCESS format_date this_date=problem.created %] [% problem.created.hms %]</li> [% IF problem.photo %] -[% photo = problem.get_photo_params %] -<li><img alt="" src="[% c.cobrand.base_url %][% photo.url %]"></li> +<li><img alt="" src="[% c.cobrand.base_url %]/photo/[% problem.photo %].temp.jpeg"></li> [% END %] <li><span class="mock-label">[% loc('State:') %]</span> [% states.${problem.state} %]</li> diff --git a/templates/web/zurich/admin/report_edit.html b/templates/web/zurich/admin/report_edit.html index b604a7ea0..5c5b1f7b1 100644 --- a/templates/web/zurich/admin/report_edit.html +++ b/templates/web/zurich/admin/report_edit.html @@ -62,8 +62,7 @@ [% IF problem.photo %] -[% photo = problem.get_photo_params %] -<li><img alt="" src="[% c.cobrand.base_url %][% photo.url %]"> +<li><img alt="" src="[% c.cobrand.base_url %]/photo/[% problem.photo %].temp.jpeg"> <br> <input type="submit" name="rotate_photo" value="[% loc('Rotate Left') %]"> <input type="submit" name="rotate_photo" value="[% loc('Rotate Right') %]"> |