diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 25d08b637a4..bc9cd22257a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -16373,6 +16373,7 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null, $sql2 .= " AND mc.fk_mailing=m.rowid"; } + $num = 0; $MAXWITHOUTPAGINATION = getDolGlobalInt('AGENDA_MAX_EVENTS_ON_PAGE_WITHOUT_PAGINATION', 100); if ($sql || $sql2) { // May not be defined if module Agenda is not enabled and mailing module disabled too @@ -16385,7 +16386,6 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null, //TODO Add navigation with this limits... $offset = 0; $limit = $MAXWITHOUTPAGINATION; - $num = 0; // Complete request and execute it with limit $sql .= $db->order($sortfield_new, $sortorder);