mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 08:44:11 +02:00
IcingaObjectDatafieldTable: cast to int when...
...comparing ids fixes #726
This commit is contained in:
parent
8e0235a7e1
commit
28f322a107
@ -12,9 +12,13 @@ class IcingaObjectDatafieldTable extends QuickTable
|
|||||||
{
|
{
|
||||||
protected $object;
|
protected $object;
|
||||||
|
|
||||||
|
/** @var int */
|
||||||
|
protected $objectId;
|
||||||
|
|
||||||
public function setObject(IcingaObject $object)
|
public function setObject(IcingaObject $object)
|
||||||
{
|
{
|
||||||
$this->object = $object;
|
$this->object = $object;
|
||||||
|
$this->objectId = (int) $object->id;
|
||||||
$this->setConnection($object->getConnection());
|
$this->setConnection($object->getConnection());
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@ -41,7 +45,7 @@ class IcingaObjectDatafieldTable extends QuickTable
|
|||||||
|
|
||||||
protected function getActionUrl($row)
|
protected function getActionUrl($row)
|
||||||
{
|
{
|
||||||
if ($row->object_id !== $this->object->id) {
|
if ((int) $row->object_id !== $this->objectId) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,7 +54,7 @@ class IcingaObjectDatafieldTable extends QuickTable
|
|||||||
|
|
||||||
protected function getRowClasses($row)
|
protected function getRowClasses($row)
|
||||||
{
|
{
|
||||||
if ($row->object_id !== $this->object->id) {
|
if ((int) $row->object_id !== $this->objectId) {
|
||||||
return array('disabled');
|
return array('disabled');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user