diff --git a/FEATURES/92386 b/FEATURES/92386 deleted file mode 100644 index 8f6e28c02fc441183a840738e685265d003467b7..0000000000000000000000000000000000000000 --- a/FEATURES/92386 +++ /dev/null @@ -1,10 +0,0 @@ - '92386' => - ['Label' => $this->_('Import périodiques PMB'), - 'Desc' => '', - 'Image' => '', - 'Video' => '', - 'Category' => '', - 'Right' => function($feature_description, $user) {return true;}, - 'Wiki' => '', - 'Test' => '', - 'Date' => '2019-05-15'], \ No newline at end of file diff --git a/application/modules/opac/controllers/NoticeajaxController.php b/application/modules/opac/controllers/NoticeajaxController.php index 9f84636048900b38938f65e05a858c1b4bf89003..63b2743e9bac2ca82d7082a0655b90c19b1840df 100644 --- a/application/modules/opac/controllers/NoticeajaxController.php +++ b/application/modules/opac/controllers/NoticeajaxController.php @@ -115,8 +115,8 @@ class NoticeAjaxController extends ZendAfi_Controller_Action { public function exemplairesAction() { - if (($first_item = $this->notice->getFirstExemplaire()) && $first_item->isTypeSerialArticle()) - $this->notice = $first_item->getPMBSerialRecord(); + if ($this->notice->isFirstItemTypeSerialArticle()) + $this->notice = $this->notice->getFirstExemplaire()->getPMBSerialRecord(); $nb_notices_oeuvre = Class_Notice::countBy(['clef_oeuvre' => $this->notice->getClefOeuvre(), 'id_notice not' => $this->notice->getId()]); diff --git a/library/Class/Codification.php b/library/Class/Codification.php index 14cc4991360e173419f36332235513f7e281f1a2..443f8817e404d330b9fcb655664c4db7936cb723 100644 --- a/library/Class/Codification.php +++ b/library/Class/Codification.php @@ -271,7 +271,7 @@ class Class_Codification { if (!$notice->isPeriodique()) return $me->_('Voir tous les tomes'); - if (($first_item = $notice->getFirstExemplaire()) && $first_item->isTypeSerialArticle()) + if ($notice->isFirstItemTypeSerialArticle()) return $me->_('Voir tous les articles de ce numéro'); return $me->_('Voir tous les numéros'); diff --git a/library/Class/Notice.php b/library/Class/Notice.php index 84853c2ecb251d348d236270273854bc7ff4c268..bc5cd9c1d50d610d5c592bc3d96d32a46f0896f2 100644 --- a/library/Class/Notice.php +++ b/library/Class/Notice.php @@ -1705,6 +1705,12 @@ class Class_Notice extends Storm_Model_Abstract { return $type_doc->isSonore(); } + + public function isFirstItemTypeSerialArticle() { + return ($first_item = $this->getFirstExemplaire()) && $first_item->isTypeSerialArticle(); + } + + public function toUnimarcISO2709() { $unimarc = new Class_NoticeUnimarc_Writer(); $unimarc->setNotice($this->getUnimarc());