SortBox::handleRequest(): check whether $this->query !== null
refs #9220
This commit is contained in:
parent
dd58f1466c
commit
afa0dc0956
|
@ -109,11 +109,13 @@ class SortBox extends AbstractWidget
|
|||
|
||||
public function handleRequest(Request $request = null)
|
||||
{
|
||||
if ($request === null) {
|
||||
$request = Icinga::app()->getFrontController()->getRequest();
|
||||
}
|
||||
if ($sort = $request->getParam('sort')) {
|
||||
$this->query->order($sort, $request->getParam('dir'));
|
||||
if ($this->query !== null) {
|
||||
if ($request === null) {
|
||||
$request = Icinga::app()->getFrontController()->getRequest();
|
||||
}
|
||||
if ($sort = $request->getParam('sort')) {
|
||||
$this->query->order($sort, $request->getParam('dir'));
|
||||
}
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue