From 186d696009c380da00983539d56fbe4273e8ec4b Mon Sep 17 00:00:00 2001 From: Kevin Wallace Date: Thu, 9 May 2019 01:03:39 -0700 Subject: sometimes ignore $more in an attempt to always return at least 1 result --- index.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index 7ef5fb6..dc8ee35 100644 --- a/index.php +++ b/index.php @@ -48,8 +48,8 @@ foreach ($index_files as $file) { } } $q = $_GET['q'] ?: ""; -$more = 1; -$autofocus = ' autofocus'; +$more = 0; +$autofocus = 'autofocus '; if ($_GET['more']) { $more = (int)($_GET['more']); $autofocus = ''; @@ -105,15 +105,17 @@ $max_more = 10;
    $more; + return $depth > $more && ($count > 0 || $depth > $max_more); } + $count++; ?>
  1. >
$more && $more != $max_more) { + if ($depth > $more && $depth <= $max_more) { ?> class="more" href="? index_name($selected_index), -- cgit v1.2.3