From 1e8f417c53f5f317487d29646f8b79db19cc7771 Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Thu, 30 Jan 2020 12:36:48 +0100 Subject: [PATCH] fix(form): unused variable Signed-off-by: Thierry Bugier --- inc/form.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/inc/form.class.php b/inc/form.class.php index 49b2e5401..fb500ff99 100644 --- a/inc/form.class.php +++ b/inc/form.class.php @@ -1048,10 +1048,11 @@ protected function showSearchBar() { } protected function showMyLastForms() { + $limit = 5; $userId = Session::getLoginUserID(); echo '
'; - echo '
'.__('My last forms (requester)', 'formcreator').'
'; - $result = PluginFormcreatorFormAnswer::getMyLastAnswersAsRequester(); + echo '
'.sprintf(__('My %1$d last forms (requester)', 'formcreator'), $limit).'
'; + $result = PluginFormcreatorFormAnswer::getMyLastAnswersAsRequester($limit); if ($result->count() == 0) { echo '
'.__('No form posted yet', 'formcreator').'
'; echo "
    "; @@ -1092,7 +1093,7 @@ protected function showMyLastForms() { foreach ($groupList as $group) { $groupIdList[] = $group['id']; } - $result = PluginFormcreatorFormAnswer::getMyLastAnswersAsValidator(); + $result = PluginFormcreatorFormAnswer::getMyLastAnswersAsValidator($limit); if ($result->count() == 0) { echo '
    '.__('No form waiting for validation', 'formcreator').'
    '; } else {