mirror of
https://github.com/YGGverse/Yo.git
synced 2025-02-06 03:44:14 +00:00
fix found totals
This commit is contained in:
parent
02dd3649a7
commit
7ea9cbffcd
@ -116,6 +116,9 @@ switch (true)
|
|||||||
$query = $index->search($q);
|
$query = $index->search($q);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get found
|
||||||
|
$found = empty($q) ? $total : $query->get()->getTotal();
|
||||||
|
|
||||||
// Search request begin
|
// Search request begin
|
||||||
$results = $query->offset($p * $config->webui->pagination->limit - $config->webui->pagination->limit)
|
$results = $query->offset($p * $config->webui->pagination->limit - $config->webui->pagination->limit)
|
||||||
->limit($config->webui->pagination->limit)
|
->limit($config->webui->pagination->limit)
|
||||||
@ -311,7 +314,7 @@ $results = $query->offset($p * $config->webui->pagination->limit - $config->webu
|
|||||||
<?php if ($response) { ?>
|
<?php if ($response) { ?>
|
||||||
<div><?php echo $response ?></div>
|
<div><?php echo $response ?></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<div><?php echo sprintf(_('Found: %s'), number_format($results->getTotal())) ?></div>
|
<div><?php echo sprintf(_('Found: %s'), number_format($found)) ?></div>
|
||||||
<?php foreach ($results as $result) { ?>
|
<?php foreach ($results as $result) { ?>
|
||||||
<div>
|
<div>
|
||||||
<?php
|
<?php
|
||||||
|
Loading…
x
Reference in New Issue
Block a user