Skip to content

Commit

Permalink
Can now specify sort direction ("dir") even if "order" parameter is n…
Browse files Browse the repository at this point in the history
…ot given.
  • Loading branch information
arnemorken committed Nov 17, 2023
1 parent 6c0828e commit 67bbfa8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions data/mysql/anyTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -884,11 +884,10 @@ protected function dbSearchList(&$data,$group_table=null)
$this->mGrouping = $my_grouping;
}
$order = Parameters::get("order");
if ($order) {
if ($order)
$this->mOrderBy = ltrim($order);
if (Parameters::get("dir"))
$this->mOrderDir = ltrim(Parameters::get("dir"));
}
if (Parameters::get("dir"))
$this->mOrderDir = ltrim(Parameters::get("dir"));
$limit = !$this->mSimpleList ? $this->findLimit() : ""; // Use same limit for all groups
$this->mNumResults = 0; // Init total number of results
// Build and execute the query
Expand Down

0 comments on commit 67bbfa8

Please sign in to comment.