From c13842b6c04e235d80be4f83c12471431169c42a Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 9 May 2023 16:30:36 +0300 Subject: [PATCH] remove extra query --- public/search.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/search.php b/public/search.php index c3551c3..1dcb276 100644 --- a/public/search.php +++ b/public/search.php @@ -346,7 +346,9 @@ if (!empty($q)) { $hostImage->uri; // Get local image data - if ($lastHostImageDescription = $db->getLastHostImageDescription($result->id)) { + $lastHostImageDescription = $db->getLastHostImageDescription($result->id); + + if (!empty($lastHostImageDescription->data)) { $hostImageURLencoded = $lastHostImageDescription->data; @@ -446,7 +448,7 @@ if (!empty($q)) { getLastPageDescription($result->id)) { ?>

metaTitle ?>

- getLastHostImageDescription($result->id)) { ?> + title ?> alt ?>