fix pagination link condition

This commit is contained in:
ghost 2023-04-02 23:39:13 +03:00
parent 4ea01bf8b4
commit a3bdccddd6

View File

@ -190,7 +190,7 @@ if (!empty($q)) {
<a href="<?php echo $result->url ?>"><?php echo $result->url ?></a> <a href="<?php echo $result->url ?>"><?php echo $result->url ?></a>
</div> </div>
<?php } ?> <?php } ?>
<?php if ($p * WEBSITE_PAGINATION_SEARCH_RESULTS_LIMIT < $resultsTotal) { ?> <?php if ($p * WEBSITE_PAGINATION_SEARCH_RESULTS_LIMIT <= $resultsTotal) { ?>
<div> <div>
<a href="<?php echo WEBSITE_DOMAIN; ?>/search.php?q=<?php echo urlencode(htmlentities($q)) ?>&p=<?php echo $p + 1 ?>"><?php echo _('Next page') ?></a> <a href="<?php echo WEBSITE_DOMAIN; ?>/search.php?q=<?php echo urlencode(htmlentities($q)) ?>&p=<?php echo $p + 1 ?>"><?php echo _('Next page') ?></a>
</div> </div>