From c0372654c34957b4b62e80760c6751c73f95f494 Mon Sep 17 00:00:00 2001 From: Nils Asmussen Date: Sun, 21 Aug 2016 15:43:37 +0200 Subject: [PATCH] Add {next,previous}Photo to search results. This allows to delete and move photos in the search view as well. --- php/helpers/search.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/php/helpers/search.php b/php/helpers/search.php index f7df5db..d1f8908 100755 --- a/php/helpers/search.php +++ b/php/helpers/search.php @@ -29,6 +29,11 @@ function search($term) { while($photo = $result->fetch_assoc()) { $photo = Photo::prepareData($photo); + + // for operations in the search view + $photo['nextPhoto'] = ''; + $photo['previousPhoto'] = ''; + $return['photos'][$photo['id']] = $photo; }