From 83b4f41eb5749e267f2219ffe9a68dcf028690ba Mon Sep 17 00:00:00 2001 From: iouston <4319513+iouston@users.noreply.github.com> Date: Mon, 14 Oct 2019 15:15:34 +0200 Subject: [PATCH] Update document.php add 2 hidden options for set a default field sort and a default order on a document page --- htdocs/contact/document.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/contact/document.php b/htdocs/contact/document.php index 6fb2803f715..b081582337e 100644 --- a/htdocs/contact/document.php +++ b/htdocs/contact/document.php @@ -62,6 +62,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="name";