From cc5f8e6a530b12826c9882cc36fdedc3c9f3f974 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 5 Jan 2023 04:17:36 +0100 Subject: [PATCH] Fix kanban view --- htdocs/adherents/type.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 3796522e70e..f516efdd819 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -302,7 +302,13 @@ if (!$rowid && $action != 'create' && $action != 'edit') { $membertype = new AdherentType($db); - while ($i < $num) { + $i = 0; + /*$savnbfield = $totalarray['nbfield']; + $totalarray = array(); + $totalarray['nbfield'] = 0;*/ + + $imaxinloop = ($limit ? min($num, $limit) : $num); + while ($i < $imaxinloop) { $objp = $db->fetch_object($result); $membertype->id = $objp->rowid; @@ -313,7 +319,6 @@ if (!$rowid && $action != 'create' && $action != 'edit') { $membertype->amount = $objp->amount; $membertype->caneditamount = $objp->caneditamount; - if ($mode == 'kanban') { if ($i == 0) { print ''; @@ -321,7 +326,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') { } //output kanban $membertype->label = $objp->label; - $membertype->getKanbanView(''); + print $membertype->getKanbanView(''); if ($i == ($imaxinloop - 1)) { print ''; print '';