Skip to content

Commit 103482c

Browse files
(Host|Service)Controller: Shift the required param
- Otherwise the searchbar uses it as base filter and apply it on the query
1 parent 8c8e3eb commit 103482c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

application/controllers/HostController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class HostController extends Controller
4949

5050
public function init()
5151
{
52-
$name = $this->params->getRequired('name');
52+
$name = $this->params->shiftRequired('name');
5353

5454
$query = Host::on($this->getDb())->with(['state', 'icon_image', 'timeperiod']);
5555
$query

application/controllers/ServiceController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ class ServiceController extends Controller
4242

4343
public function init()
4444
{
45-
$name = $this->params->getRequired('name');
46-
$hostName = $this->params->getRequired('host.name');
45+
$name = $this->params->shiftRequired('name');
46+
$hostName = $this->params->shiftRequired('host.name');
4747

4848
$query = Service::on($this->getDb())
4949
->withColumns(['has_problematic_parent'])

0 commit comments

Comments
 (0)