Skip to content

Commit

Permalink
filters now additonal sort the result by the evt_event_date_to fiel…
Browse files Browse the repository at this point in the history
…d in ascending order
  • Loading branch information
hertsch committed May 6, 2013
1 parent f1edc46 commit 676a8d7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
Ralf Hertsch, Stockholmer Str. 31, 13359 Berlin (Germany)
http://phpManufaktur.de - [email protected]

0.43 - JUST IN PROGRESS
0.43 - 2013-05-06

* added TODAY_PERSISTS for the filter DATE - show also events which started in
the past and are also running TODAY.
* filters now additional sort the result by the `evt_event_date_to` field in
ascending order (important at multiple hits with the same start date)

0.42 - 2013-04-09

Expand Down
9 changes: 7 additions & 2 deletions class.frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -1607,14 +1607,19 @@ private function viewEventFilter() {
break;
endswitch;
}
if (!empty($add))
$SQL .= " ORDER BY $add ".$this->params[self::PARAM_SORT];
if (!empty($add)) {

$SQL .= " ORDER BY $add ".$this->params[self::PARAM_SORT];
}
}
else {
// set the default order and sort mode
$SQL .= " ORDER BY `evt_event_date_from` ".$this->params[self::PARAM_SORT];
}

// the second parameter is always `evt_event_date_to` in ascending order
$SQL .= ", `evt_event_date_to` ASC";

// but... it's possible that we have a limit!
if (!empty($this->params[self::PARAM_LIMIT])) {
$limit = (int) $this->params[self::PARAM_LIMIT];
Expand Down
2 changes: 1 addition & 1 deletion info.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
$module_directory = 'kit_event';
$module_name = 'kitEvent';
$module_function = 'tool';
$module_version = '0.42';
$module_version = '0.43';
$module_status = 'Beta';
$module_platform = '2.8';
$module_author = 'Ralf Hertsch, Berlin (Germany)';
Expand Down

0 comments on commit 676a8d7

Please sign in to comment.