aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2016-02-23 16:37:14 +0000
committerMatthew Somerville <matthew@mysociety.org>2016-02-23 18:11:18 +0000
commit0d0b35dadf3ebf4781e00ae8d83b4061a99cfcc6 (patch)
tree722afef3118275cc9d952d45e89fbd8e75ba746a /perllib/FixMyStreet/DB
parent28144f5153a0a7f7bad9466c883bd5c147568028 (diff)
Only load images from disk when needed.
Fixes #1337.
Diffstat (limited to 'perllib/FixMyStreet/DB')
-rw-r--r--perllib/FixMyStreet/DB/Result/Comment.pm2
-rw-r--r--perllib/FixMyStreet/DB/Result/Problem.pm2
2 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm
index 3ae56591f..5734ff8d5 100644
--- a/perllib/FixMyStreet/DB/Result/Comment.pm
+++ b/perllib/FixMyStreet/DB/Result/Comment.pm
@@ -183,7 +183,7 @@ sub photos {
url_full => "/photo/c/$id.$i.full.$format?$cachebust",
idx => $i++,
}
- } map { $_->[0] } $photoset->all_images;
+ } $photoset->all_ids;
return \@photos;
}
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm
index 8f9e76ad6..2a90d0bec 100644
--- a/perllib/FixMyStreet/DB/Result/Problem.pm
+++ b/perllib/FixMyStreet/DB/Result/Problem.pm
@@ -874,7 +874,7 @@ sub photos {
url_fp => "/photo/$id.$i.fp.$format?$cachebust",
idx => $i++,
}
- } map { $_->[0] } $photoset->all_images;
+ } $photoset->all_ids;
return \@photos;
}