mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-09-25 18:59:05 +02:00
ImportRun: allow to fetch specific keys
This commit is contained in:
parent
70f8a8986e
commit
354392d216
@ -57,7 +57,7 @@ class ImportRun extends DbObject
|
|||||||
return $db->fetchCol($query);
|
return $db->fetchCol($query);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function fetchRows($columns, $filter = null)
|
public function fetchRows($columns, $filter = null, $keys = null)
|
||||||
{
|
{
|
||||||
$db = $this->getDb();
|
$db = $this->getDb();
|
||||||
$binchecksum = $this->rowset_checksum;
|
$binchecksum = $this->rowset_checksum;
|
||||||
@ -96,6 +96,10 @@ class ImportRun extends DbObject
|
|||||||
$empty->$k = null;
|
$empty->$k = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($keys !== null) {
|
||||||
|
$query->where('r.object_name IN (?)', $keys);
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($db->fetchAll($query) as $row) {
|
foreach ($db->fetchAll($query) as $row) {
|
||||||
if (! array_key_exists($row->object_name, $result)) {
|
if (! array_key_exists($row->object_name, $result)) {
|
||||||
$result[$row->object_name] = clone($empty);
|
$result[$row->object_name] = clone($empty);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user