diff options
Diffstat (limited to 'application/front/controller/visitor/PictureWallController.php')
-rw-r--r-- | application/front/controller/visitor/PictureWallController.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/application/front/controller/visitor/PictureWallController.php b/application/front/controller/visitor/PictureWallController.php index 23553ee6..9c8f07d7 100644 --- a/application/front/controller/visitor/PictureWallController.php +++ b/application/front/controller/visitor/PictureWallController.php | |||
@@ -30,19 +30,19 @@ class PictureWallController extends ShaarliVisitorController | |||
30 | ); | 30 | ); |
31 | 31 | ||
32 | // Optionally filter the results: | 32 | // Optionally filter the results: |
33 | $links = $this->container->bookmarkService->search($request->getQueryParams()); | 33 | $bookmarks = $this->container->bookmarkService->search($request->getQueryParams())->getBookmarks(); |
34 | $linksToDisplay = []; | 34 | $links = []; |
35 | 35 | ||
36 | // Get only bookmarks which have a thumbnail. | 36 | // Get only bookmarks which have a thumbnail. |
37 | // Note: we do not retrieve thumbnails here, the request is too heavy. | 37 | // Note: we do not retrieve thumbnails here, the request is too heavy. |
38 | $formatter = $this->container->formatterFactory->getFormatter('raw'); | 38 | $formatter = $this->container->formatterFactory->getFormatter('raw'); |
39 | foreach ($links as $key => $link) { | 39 | foreach ($bookmarks as $key => $bookmark) { |
40 | if (!empty($link->getThumbnail())) { | 40 | if (!empty($bookmark->getThumbnail())) { |
41 | $linksToDisplay[] = $formatter->format($link); | 41 | $links[] = $formatter->format($bookmark); |
42 | } | 42 | } |
43 | } | 43 | } |
44 | 44 | ||
45 | $data = ['linksToDisplay' => $linksToDisplay]; | 45 | $data = ['linksToDisplay' => $links]; |
46 | $this->executePageHooks('render_picwall', $data, TemplatePage::PICTURE_WALL); | 46 | $this->executePageHooks('render_picwall', $data, TemplatePage::PICTURE_WALL); |
47 | 47 | ||
48 | foreach ($data as $key => $value) { | 48 | foreach ($data as $key => $value) { |