mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 05:44:36 +02:00
parent
c5b5d3c9c3
commit
fe41d312ca
@ -5,6 +5,7 @@ namespace Icinga\Repository;
|
|||||||
|
|
||||||
use Iterator;
|
use Iterator;
|
||||||
use IteratorAggregate;
|
use IteratorAggregate;
|
||||||
|
use Traversable;
|
||||||
use Icinga\Application\Benchmark;
|
use Icinga\Application\Benchmark;
|
||||||
use Icinga\Application\Logger;
|
use Icinga\Application\Logger;
|
||||||
use Icinga\Data\QueryInterface;
|
use Icinga\Data\QueryInterface;
|
||||||
@ -581,7 +582,12 @@ class RepositoryQuery implements QueryInterface, SortRules, Iterator
|
|||||||
$this->order();
|
$this->order();
|
||||||
}
|
}
|
||||||
|
|
||||||
$iterator = $this->repository->getDataSource()->query($this->query);
|
if ($this->query instanceof Traversable) {
|
||||||
|
$iterator = $this->query;
|
||||||
|
} else {
|
||||||
|
$iterator = $this->repository->getDataSource()->query($this->query);
|
||||||
|
}
|
||||||
|
|
||||||
if ($iterator instanceof IteratorAggregate) {
|
if ($iterator instanceof IteratorAggregate) {
|
||||||
$this->iterator = $iterator->getIterator();
|
$this->iterator = $iterator->getIterator();
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user