remove extra query

This commit is contained in:
ghost 2023-05-09 16:30:36 +03:00
parent e7c5e2ca9d
commit c13842b6c0

View File

@ -346,7 +346,9 @@ if (!empty($q)) {
$hostImage->uri; $hostImage->uri;
// Get local image data // Get local image data
if ($lastHostImageDescription = $db->getLastHostImageDescription($result->id)) { $lastHostImageDescription = $db->getLastHostImageDescription($result->id);
if (!empty($lastHostImageDescription->data)) {
$hostImageURLencoded = $lastHostImageDescription->data; $hostImageURLencoded = $lastHostImageDescription->data;
@ -446,7 +448,7 @@ if (!empty($q)) {
<?php if ($hostPageDescription = $db->getLastPageDescription($result->id)) { ?> <?php if ($hostPageDescription = $db->getLastPageDescription($result->id)) { ?>
<h3><?php echo $hostPageDescription->metaTitle ?></h3> <h3><?php echo $hostPageDescription->metaTitle ?></h3>
<?php } ?> <?php } ?>
<?php if ($lastHostImageDescription = $db->getLastHostImageDescription($result->id)) { ?> <?php if ($lastHostImageDescription) { ?>
<span><?php echo $lastHostImageDescription->title ?> <?php echo $lastHostImageDescription->alt ?></span> <span><?php echo $lastHostImageDescription->title ?> <?php echo $lastHostImageDescription->alt ?></span>
<?php } ?> <?php } ?>
<a href="<?php echo $hostPageURL ?>"> <a href="<?php echo $hostPageURL ?>">