summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Wallace <kevin@wallace.seattle.wa.us>2019-06-07 22:57:50 -0700
committerKevin Wallace <kevin@wallace.seattle.wa.us>2019-06-07 22:57:50 -0700
commit6057b39b125f291c81e154c77a14d340a4fa7517 (patch)
treec21c26a6a8bff3f3f16c8ad986e090104c376d7c
parentmake trim behave a bit nicer (diff)
don't show more links when search completes
-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),