From 6ebdce8a9db1dd739800ce3a727e57ef6caa8144 Mon Sep 17 00:00:00 2001 From: iouston <4319513+iouston@users.noreply.github.com> Date: Mon, 14 Oct 2019 15:13:07 +0200 Subject: [PATCH] Update document.php add 2 hidden options for set a default field and a default order on document page --- htdocs/societe/document.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php index 54a2bea1d41..5ea892f0670 100644 --- a/htdocs/societe/document.php +++ b/htdocs/societe/document.php @@ -55,6 +55,10 @@ if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; + +if (isset($conf->global->MAIN_DOC_SORT_FIELD)){$sortfield=$conf->global->MAIN_DOC_SORT_FIELD;} +if (isset($conf->global->MAIN_DOC_SORT_ORDER)){$sortorder=$conf->global->MAIN_DOC_SORT_ORDER;} + if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="position_name";