X-Git-Url: https://git.llucax.com/z.facultad/75.43/tp1.git/blobdiff_plain/08de4b17e5c06824b84120d67479eef7cfdaba21..HEAD:/src/lib/faq.functions.php?ds=inline diff --git a/src/lib/faq.functions.php b/src/lib/faq.functions.php index 3ce9649..abf95d0 100644 --- a/src/lib/faq.functions.php +++ b/src/lib/faq.functions.php @@ -338,22 +338,27 @@ function Faq_Listador($ObjetosAListar,$link = '', $cant = 2) // Arrastro query string, si corresponde if ( isset($_SERVER['QUERY_STRING'] ) ) { - $query = $_SERVER['QUERY_STRING']; + $query = str_replace('&', '&', $_SERVER['QUERY_STRING']); } else { $query = ''; } - if (($pos = strpos($query, 'lista_from=')) !== false) + if (($pos = strpos($query, '&lista_from=')) !== false) { - if ($pos) $query = substr($query, 0, --$pos); + if ($pos) $query = substr($query, 0, $pos); + else $query = ''; + } + 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; - $q = $query ? "$query&lista_from=$from" : "lista_from=$from"; - printfl('%s', $link, $q, $i + 1); + $from = $i * $cant; + $q = $query ? "$query&lista_from=$from" : "lista_from=$from"; + printfl('%s', $link, $q, $i + 1); } printfl(''); }