mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Only put sortOptions to the session if the List query succeeded
This commit is contained in:
parent
7e98e199a4
commit
61129b48ec
@ -1496,14 +1496,20 @@ class Lists extends WidgetBase
|
||||
|
||||
$this->sortColumn = $sortOptions['column'] = $column;
|
||||
|
||||
$this->putSession('sort', $sortOptions);
|
||||
|
||||
/*
|
||||
* Persist the page number
|
||||
*/
|
||||
$this->currentPageNumber = post('page');
|
||||
|
||||
return $this->onRefresh();
|
||||
/*
|
||||
* Try to refresh the list with the new sortOptions. Put the
|
||||
* new sortOptions in to the session if the query succeeded.
|
||||
*/
|
||||
$result = $this->onRefresh();
|
||||
|
||||
$this->putSession('sort', $sortOptions);
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user