diff --git a/VERSIONS_HOTLINE/55110 b/VERSIONS_HOTLINE/55110 new file mode 100644 index 0000000000000000000000000000000000000000..18dcf6844bc5c773c66b7f51b227178bced557da --- /dev/null +++ b/VERSIONS_HOTLINE/55110 @@ -0,0 +1 @@ + - ticket #55110 : les vignettes des notices modifiées manuellement pour des ressources numériques sont sauvegardées correctement sur le serveur de cache mutualisé. \ No newline at end of file diff --git a/library/Class/Notice.php b/library/Class/Notice.php index 028ba8b7baff0bd5eb15607d45ca04fd61316582..27ec38fbf2252dc7f5e2b5e7a0679987822bb25e 100644 --- a/library/Class/Notice.php +++ b/library/Class/Notice.php @@ -1632,14 +1632,6 @@ class Class_Notice extends Storm_Model_Abstract { } - /** - * return int identifiant type doc codifié Pergame - */ - public function getTypeDocPergame() { - return Class_TypeDoc::find($this->getTypeDoc())->toPergame(); - } - - /** * @param $noticeUnimarc Class_NoticeUnimarc * @category testing diff --git a/library/Class/TypeDoc.php b/library/Class/TypeDoc.php index df315bedae228e6db52ed840b2861e9dd6535e11..09678a2dfd4a8de677c17372ac3e5c8876ec4c70 100644 --- a/library/Class/TypeDoc.php +++ b/library/Class/TypeDoc.php @@ -311,13 +311,6 @@ class Class_TypeDoc extends Storm_Model_Abstract { } - /** - * return int identifiant type doc codifié Pergame - */ - public function toPergame() { - return $this->getId(); - } - public function isRessourceNumerique() { return (($this->getId() >= Class_TypeDoc::LIVRE_NUM) && (!in_array($this->getId(),[static::ARTICLE, static::RSS, static::SITE]))) diff --git a/library/Class/WebService/AllServices.php b/library/Class/WebService/AllServices.php index 5da7a8c1236a268fb3baddc2eaa2786ac1b92558..92e62e910d33b22edb1c73d4b5f2e422de00a381 100644 --- a/library/Class/WebService/AllServices.php +++ b/library/Class/WebService/AllServices.php @@ -111,7 +111,7 @@ class Class_WebService_AllServices { $notice = Class_Notice::find($id); $result = static::runServiceAfiUploadVignette(array_filter(['isbn' => $notice->getIsbn(), 'ean' => $notice->getEan(), - 'type_doc' => $notice->getTypeDocPergame(), + 'type_doc' => $notice->getFamilleId(), 'titre' => $notice->getTitrePrincipal(), 'auteur' => $notice->getAuteurPrincipal(), 'image' => $url, diff --git a/tests/application/modules/admin/controllers/RecordsControllerTest.php b/tests/application/modules/admin/controllers/RecordsControllerTest.php index 2d62fafe9a8f2ffbd32ad472f3aedc5f1cfb8da2..21bdfe10a41ec5ffa40516f74fc3abb025679bb3 100644 --- a/tests/application/modules/admin/controllers/RecordsControllerTest.php +++ b/tests/application/modules/admin/controllers/RecordsControllerTest.php @@ -29,8 +29,13 @@ abstract class RecordsControllerTestCase extends Admin_AbstractControllerTestCas public function setUp() { parent::setUp(); + Class_TypeDoc::find(Class_TypeDoc::EPUB) + ->getCodifTypeDoc() + ->setFamilleId(Class_CodifTypeDoc::LIVRE) + ->save(); + $this->_notice = Class_Notice::newInstanceWithId(12345, ['isbn' => '0123456789', - 'type_doc' => Class_TypeDoc::LIVRE, + 'type_doc' => Class_TypeDoc::EPUB, 'url_vignette' => '', 'url_image' => '', 'titre_principal' => 'Harry Potter',