mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 08:55:54 +00:00
getDocumentList() accepts parameter for direction of order
This commit is contained in:
parent
148088f42a
commit
eef3b28270
|
@ -733,7 +733,7 @@ class SeedDMS_Core_DMS {
|
|||
* І have already taken care of.
|
||||
* @return array list of documents
|
||||
*/
|
||||
function getDocumentList($listtype, $param1=null, $param2='') { /* {{{ */
|
||||
function getDocumentList($listtype, $param1=null, $param2='', $param3='') { /* {{{ */
|
||||
/* The following query will get all documents and lots of additional
|
||||
* information. It requires the two temporary tables ttcontentid and
|
||||
* ttstatid.
|
||||
|
@ -919,11 +919,16 @@ class SeedDMS_Core_DMS {
|
|||
case 'MyDocs': // Documents owned by me
|
||||
$user = $param1;
|
||||
$orderby = $param2;
|
||||
if($param3 == 'desc')
|
||||
$orderdir = 'DESC';
|
||||
else
|
||||
$orderdir = 'ASC';
|
||||
$queryStr .= "AND `tblDocuments`.`owner` = '".$user->getID()."' ";
|
||||
if ($orderby=='e') $queryStr .= "ORDER BY `expires`";
|
||||
else if ($orderby=='u') $queryStr .= "ORDER BY `statusDate`";
|
||||
else if ($orderby=='s') $queryStr .= "ORDER BY `status`";
|
||||
else $queryStr .= "ORDER BY `name`";
|
||||
$queryStr .= " ".$orderdir;
|
||||
break;
|
||||
case 'CheckedOutByMe': // Documents I have checked out
|
||||
$user = $param1;
|
||||
|
|
Loading…
Reference in New Issue
Block a user