From 00165690244af4c05097566b952a4e568f2eb1af Mon Sep 17 00:00:00 2001 From: plegall Date: Mon, 21 Mar 2011 13:24:02 +0000 Subject: bug 1197 fixed: avoid warning message on history search when a photo was deleted git-svn-id: http://piwigo.org/svn/trunk@9808 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/history.php | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'admin') diff --git a/admin/history.php b/admin/history.php index df5c3d67d..cbc4a2cdf 100644 --- a/admin/history.php +++ b/admin/history.php @@ -448,12 +448,20 @@ SELECT ) ); - $element = array( - 'id' => $line['image_id'], - 'file' => $file_of_image[$line['image_id']], - 'path' => $path_of_image[$line['image_id']], - 'tn_ext' => $tn_ext_of_image[$line['image_id']], - ); + if (isset($file_of_image[$line['image_id']])) + { + $element = array( + 'id' => $line['image_id'], + 'file' => $file_of_image[$line['image_id']], + 'path' => $path_of_image[$line['image_id']], + 'tn_ext' => $tn_ext_of_image[$line['image_id']], + ); + $thumbnail_display = $page['search']['fields']['display_thumbnail']; + } + else + { + $thumbnail_display = 'no_display_thumbnail'; + } $image_title = '('.$line['image_id'].')'; @@ -468,7 +476,7 @@ SELECT $image_string = ''; - switch ($page['search']['fields']['display_thumbnail']) + switch ($thumbnail_display) { case 'no_display_thumbnail': { -- cgit v1.2.3