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";