This commit is contained in:
Laurent Destailleur 2020-04-23 12:42:03 +02:00
parent de90f24bd4
commit 93278b2dca

View File

@ -40,6 +40,17 @@ $id=GETPOST('id', 'int');
$ref=GETPOST('ref', 'alpha');
$action = GETPOST('action', 'alpha');
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortfield) $sortfield = 'a.datep,a.id';
if (!$sortorder) $sortorder = 'DESC,DESC';
if (GETPOST('actioncode', 'array'))
{
$actioncode=GETPOST('actioncode', 'array', 3);
@ -217,7 +228,7 @@ if (!empty($object->id))
// List of all actions
$filters = array();
$filters['search_agenda_label'] = $search_agenda_label;
show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters);
show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder);
}
// End of page