Commit 7d8bf43b authored by Ghislain Loas's avatar Ghislain Loas
Browse files

hotline #67202 fix first RT comment

parent ef66cf3a
......@@ -132,16 +132,15 @@ class Class_Indexation_PseudoNotice {
if (!$this->_ensureRecord())
return false;
if ($this->_notice->hasExemplaires())
array_map(function($item) { $item->delete();}, $this->_notice->getExemplaires());
if ($this->_notice->hasExemplaires()) {
$this->_exemplaire = $this->_notice->hasExemplaires()[0];
return true;
}
$this->_exemplaire = Class_Exemplaire::newInstance(['id_bib' => $this->_datas['id_bib'],
'id_notice' => $this->_notice->getId(),
'id_origine' => $this->_model->getId(),
'activite' => $this->_('A consulter sur le portail')]);
if($this->_notice->isDilicom())
$this->_dilicomAlbumToZone995();
if ($this->_exemplaire->save()) {
$this->_notice->addExemplaire($this->_exemplaire);
return true;
......@@ -243,6 +242,9 @@ class Class_Indexation_PseudoNotice {
protected function _indexItem() {
if($this->_notice->isDilicom())
$this->_dilicomAlbumToZone995();
$genre = null;
if ($this->dataExist('genre', $this->_datas)) {
$genres = explode(';', $this->_datas['genre']);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment