Skip to content

Commit

Permalink
Cast as int scroll and nblus
Browse files Browse the repository at this point in the history
  • Loading branch information
Simounet committed Jan 10, 2024
1 parent 64507f9 commit 0ffb5c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions article.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//recuperation de tous les flux
$allFeeds = $feedManager->getFeedsPerFolder();
$tpl->assign('allFeeds',$allFeeds);
$scroll = isset($_['scroll']) ? $_['scroll'] : 0;
$scroll = isset($_['scroll']) ? (int) $_['scroll'] : 0;
$tpl->assign('scrollpage',$scroll);
// récupération des variables pour l'affichage
$articleConf['articlePerPages'] = (int) $configurationManager->get('articlePerPages');
Expand Down Expand Up @@ -47,7 +47,7 @@
if($articleDisplayAuthor) $target .= '`'.MYSQL_PREFIX.'event`.`creator`,';
$target .= '`'.MYSQL_PREFIX.'event`.`id`';

$nblus = isset($_['nblus']) ? $_['nblus'] : 0;
$nblus = isset($_['nblus']) ? (int) $_['nblus'] : 0;
$articleConf['startArticle'] = ($scroll*$articleConf['articlePerPages'])-$nblus;
if ($articleConf['startArticle'] < 0) $articleConf['startArticle']=0;
$action = $_['action'];
Expand Down

0 comments on commit 0ffb5c8

Please sign in to comment.