Skip to content

Commit

Permalink
Retain page information even when forcing filter Wunderbyte-GmbH#155.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelpollak committed Feb 11, 2021
1 parent cfcf651 commit 3bd9492
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions view/view_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,17 @@ protected function set__patterns() {
*/
public function set_filter($filteroptions = true, $ignoreurl = false) {
$fm = $this->_df->get_filter_manager($this);
$urlparams = $fm::get_filter_options_from_url();
$urloptions = array();

if (!$ignoreurl) {
$urloptions = $filteroptions ? $fm::get_filter_options_from_url() : array();
} else {
$urloptions = array();
// Keep page to allow for pagination.
if (isset($urlparams['page'])) {
$urloptions['page'] = $urlparams['page'];
}

// Add all url parameters.
if (!$ignoreurl && $filteroptions) {
$urloptions = $urlparams;
}

if (is_array($filteroptions)) {
Expand Down

0 comments on commit 3bd9492

Please sign in to comment.