Fix limit

This commit is contained in:
Laurent Destailleur (aka Eldy) 2025-01-19 21:40:23 +01:00
parent 47a2162b88
commit f563ae7aaf

View File

@ -35,6 +35,9 @@ $entity = GETPOSTINT('entity') ? GETPOSTINT('entity') : $conf->entity;
$original_file = GETPOST("file", "alpha");
$l = GETPOST('l', 'aZ09');
$limit = GETPOSTINT('limit');
if ($limit <= 0 || $limit > 100) {
$limit = 20;
}
$cachedelay = GETPOSTINT('cachedelay'); // The delay in second of the cache
// Parameters for RSS
@ -131,7 +134,7 @@ if ($rss) {
$filters['lang'] = $l;
}
$MAXNEWS = ($limit ? $limit : 20);
$MAXNEWS = $limit;
$arrayofblogs = $websitepage->fetchAll($website->id, 'DESC', 'date_creation', $MAXNEWS, 0, $filters);
$eventarray = array();
if (is_array($arrayofblogs)) {