$dao = new wsDAOCollection($core->con);\r
$collection = $dao->selectById($id);\r
\r
-\r
$c = $core->con->openCursor('book_collection_compile');\r
$c->collection_id = $id;\r
$c->compile_date = $time;\r
$dir = WS_COLLECTIONS . '/versions/' . $this->collectionId . '/' . $time . '/';
- $books = $this->getPublicationsIds();
+ $books = $this->getPublicationsIds(true);
$exporter = new wsExporter();
foreach ($os as $o) {
return $time;
}
- protected function getPublicationsIds() {
+ protected function getPublicationsIds($onlyonline = false) {
$books = array();
foreach ($this->collection->datas as $group) {
foreach ($group['publications'] as $p) {
+ if ($onlyonline && (!isset($p['online']) || !$p['online'])) {
+ continue;
+ }
$books[] = $p['id'];
}
}