summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/index.php b/index.php
index 7418c15..84fcf35 100644
--- a/index.php
+++ b/index.php
@@ -109,7 +109,7 @@ li:target {
$depth = 0;
$count = 0;
$anchor = '';
- find_expr($selected_index, $q, function($score, $text) use (&$depth, &$count, &$anchor, $more, $max_more) {
+ $retval = find_expr($selected_index, $q, function($score, $text) use (&$depth, &$count, &$anchor, $more, $max_more) {
if ($score == '#') {
$depth++;
if ($depth == $more) {
@@ -131,7 +131,7 @@ li:target {
</ol>
<?php
$first_more = TRUE;
- while ($depth <= $max_more) {
+ while ($retval != 0 && $depth <= $max_more) {
?>
<a<?=$anchor?> class="more" href="?<?=http_build_query([
'idx' => index_name($selected_index),