Skip to content

Commit

Permalink
Merge pull request #12118 from iouston/patch-3
Browse files Browse the repository at this point in the history
NEW: Add 2 hidden options to set the default sorting (sort and order) on document page
  • Loading branch information
eldy committed Oct 14, 2019
2 parents 3038a49 + 176436e commit 0d4866c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions htdocs/comm/propal/document.php
Expand Up @@ -60,6 +60,10 @@
$offset = $conf->liste_limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;

if (! empty($conf->global->MAIN_DOC_SORT_FIELD)) { $sortfield=$conf->global->MAIN_DOC_SORT_FIELD; }
if (! empty($conf->global->MAIN_DOC_SORT_ORDER)) { $sortorder=$conf->global->MAIN_DOC_SORT_ORDER; }

if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="name";

Expand Down

0 comments on commit 0d4866c

Please sign in to comment.