mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
FIX Use DataList intead of DataObject->get()
This commit is contained in:
parent
590e7bef5d
commit
3cc660484c
@ -214,7 +214,7 @@ class Solr_Reindex extends BuildTask {
|
|||||||
$includeSubclasses = $options['include_children'];
|
$includeSubclasses = $options['include_children'];
|
||||||
$filter = $includeSubclasses ? "" : '"ClassName" = \''.$class."'";
|
$filter = $includeSubclasses ? "" : '"ClassName" = \''.$class."'";
|
||||||
|
|
||||||
$items = DataObject::get($class, $filter, "", "", array('limit' => $this->stat('recordsPerRequest'), 'start' => $start));
|
$items = DataList::create($class)->where($filter)->limit($this->stat('recordsPerRequest'), $start);
|
||||||
foreach ($items as $item) { $index->add($item); $item->destroy(); }
|
foreach ($items as $item) { $index->add($item); $item->destroy(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user