Commit bcf5b808163683e97560d98669d3e1cb2d013e56
1 parent
d064c630
added folder sorting
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1743 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
3 additions
and
1 deletions
lib/documentmanagement/DocumentBrowser.inc
| ... | ... | @@ -90,7 +90,9 @@ class DocumentBrowser { |
| 90 | 90 | |
| 91 | 91 | // now find all the child folders relative to this one |
| 92 | 92 | // FIXME: in the same unit? |
| 93 | - $folderQuery = "SELECT id FROM $default->owl_folders_table WHERE parent_id=" . $folderID . " ORDER BY name ASC"; | |
| 93 | + | |
| 94 | + // if we're sorting by name then sort folders in the appropriate direction | |
| 95 | + $folderQuery = "SELECT id FROM $default->owl_folders_table WHERE parent_id=" . $folderID . " ORDER BY name " . ($sSortField == "name" ? $sSortDirection : "ASC"); | |
| 94 | 96 | $default->log->debug("DocumentBrowser::browseByFolder child folder query=$folderQuery"); |
| 95 | 97 | if ($sql->query($folderQuery)) { |
| 96 | 98 | while ($sql->next_record()) { | ... | ... |