From 07e5f40ff540c1f3e8e1d7436e2e18c02cd1a556 Mon Sep 17 00:00:00 2001 From: plegall Date: Mon, 21 Mar 2011 13:25:05 +0000 Subject: merge r9808 from trunk to branch 2.1 bug 1197 fixed: avoid warning message on history search when a photo was deleted git-svn-id: http://piwigo.org/svn/branches/2.1@9809 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/history.php | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/admin/history.php b/admin/history.php index bcd812b5d..7549114b1 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