X-Git-Url: https://git.llucax.com/z.facultad/75.43/tp1.git/blobdiff_plain/5e595351f8c3cab53f024f9117bd19c8d6396673..765b3c57f081d3863ff59951a67da5874554db42:/src/lib/faq.functions.php?ds=inline
diff --git a/src/lib/faq.functions.php b/src/lib/faq.functions.php
index 75d422c..abf95d0 100644
--- a/src/lib/faq.functions.php
+++ b/src/lib/faq.functions.php
@@ -331,28 +331,34 @@ function Faq_Listador($ObjetosAListar,$link = '', $cant = 2)
$obj->toHTML();
}
}
- printfl('
');
+
$pags = ceil($total / $cant);
if ($pags == 1) return;
- // Arrastro query string, si corresponde
+ printfl('');
+ // 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);
+ else $query = '';
+ }
+ if (($pos = strpos($query, 'lista_from=')) !== false)
{
- if ($pos) $query = substr($query, 0, --$pos);
+ 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('
');
}