Update document.php

add 2 hidden options for set a default field and a defaut order on document page
This commit is contained in:
iouston 2019-10-14 15:09:59 +02:00 committed by GitHub
parent 0cd451ef1a
commit f6aafea33c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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