books must be grouped by type
This commit is contained in:
@@ -395,11 +395,19 @@ class NetBiblio extends WebService
|
|||||||
}
|
}
|
||||||
$s->addSortField('availabilityDate');
|
$s->addSortField('availabilityDate');
|
||||||
|
|
||||||
|
try {
|
||||||
$results = $s->getResults(0, $itemsByGroup);
|
$results = $s->getResults(0, $itemsByGroup);
|
||||||
|
} catch(SolrClientException $e) {
|
||||||
|
throw new WebException ("SolrError", $e->getMessage(), -710);
|
||||||
|
}
|
||||||
|
|
||||||
$ids = array_map(function($r) { return $r['id']; }, $results['response']['docs']);
|
$ids = array_map(function($r) { return $r['id']; }, $results['response']['docs']);
|
||||||
$books = AudioBook::findBy('NoticeID', $ids, true);
|
$books = AudioBook::findBy('NoticeID', $ids, true);
|
||||||
$this->data = array_map(array($this, 'AddFiles'), $books);
|
$books = array_map(array($this, 'AddFiles'), $books);
|
||||||
|
|
||||||
|
foreach($books as $b) {
|
||||||
|
$this->data[$b['type']][] = $b;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function Output()
|
protected function Output()
|
||||||
|
|||||||
Reference in New Issue
Block a user