From 2addcbe28c9280d03a27aba88b7b81284ce8d32c Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Sat, 7 May 2005 21:21:54 +0000 Subject: [PATCH 1/1] Bugfix. --- src/lib/listador.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/listador.php b/src/lib/listador.php index 06cf54f..50b41d6 100644 --- a/src/lib/listador.php +++ b/src/lib/listador.php @@ -54,7 +54,11 @@ function listar($item, $link = '', $caption = null, $summary = null, $cant = 15) if ($pags == 1) return; // Si tengo una sóla página, para qué el paginador? // Arrastro query string, si corresponde $query = $_SERVER['QUERY_STRING']; - if ($pos = strpos($query, 'lista_from=')) $query = substr($query, 0,--$pos); + if (($pos = strpos($query, 'lista_from=')) !== false) + { + if ($pos) $query = substr($query, 0, --$pos); + else $query = ''; + } for ($i = 0; $i < $pags; ++$i) { $from = $i * $cant; -- 2.43.0