Browse Source

fix pagination variables definition

pull/8/head
d47081 2 years ago
parent
commit
a6f9bd095f
  1. 11
      public/index.php

11
public/index.php

@ -73,11 +73,10 @@ foreach ($db->getData($ns, $tx, $query, $limit, PAGE_LIMIT) as $value) {
]; ];
} }
if (!$query) { $older = false;
if (in_array($page, [0, 1])) {
$newer = false; $newer = false;
} else {
if (!in_array($page, [0, 1])) {
if ($page == 2) { if ($page == 2) {
$newer = ($ns ? $ns : ''); $newer = ($ns ? $ns : '');
} else { } else {
@ -91,10 +90,6 @@ if (!$query) {
} else { } else {
$older = ($ns ? $ns . '/' . ($page + 1) : ($page + 1)); $older = ($ns ? $ns . '/' . ($page + 1) : ($page + 1));
} }
} else {
$older = false;
}
} }
if ($ns) { if ($ns) {

Loading…
Cancel
Save