From 1ea0dfca2a38a9a1726b659478be8628b9a006ac Mon Sep 17 00:00:00 2001 From: llaffont <laurent.laffont@gmail.com> Date: Mon, 27 Jan 2014 09:55:59 +0100 Subject: [PATCH] =?UTF-8?q?Suppression=20des=20dates=20de=20nouveaut=C3=A9?= =?UTF-8?q?s=20pour=20les=20albums=20en=20attendant=20une=20gestion=20corr?= =?UTF-8?q?ecte=20de=20la=20MAJ=20de=20notices=20pour=20l'indexation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/Class/Notice.php | 6 ------ .../RechercheControllerAlbumAudioRecordTest.php | 10 +++++++--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/library/Class/Notice.php b/library/Class/Notice.php index 4cc5cbbef08..f29ad298ed3 100644 --- a/library/Class/Notice.php +++ b/library/Class/Notice.php @@ -1798,12 +1798,6 @@ class Class_Notice extends Storm_Model_Abstract { } - public function beforeSave() { - if ($this->isNew() and !$this->getDateCreation()) - $this->setDateCreation(date('Y-m-d', $this->getCurrentTime())); - } - - public function isTypeDocSonore() { if (!$type_doc = Class_TypeDoc::find($this->getTypeDoc())) return false; diff --git a/tests/application/modules/opac/controllers/RechercheControllerAlbumAudioRecordTest.php b/tests/application/modules/opac/controllers/RechercheControllerAlbumAudioRecordTest.php index 1f3336a16f0..f1fb43fa95a 100644 --- a/tests/application/modules/opac/controllers/RechercheControllerAlbumAudioRecordTest.php +++ b/tests/application/modules/opac/controllers/RechercheControllerAlbumAudioRecordTest.php @@ -82,15 +82,19 @@ class RechercheControllerAlbumAudioRecordViewNoticeTest extends RechercheControl } - /** @test */ + /** + * @disabledtest + * en attendant de bien gérer la nouveauté pour les albums bib num (update de notice et non nouvelle création + */ public function dateCreationShouldBe2014_01_19() { $this->assertEquals('2014-01-19', $this->_notice->getDateCreation()); } /** @test */ - public function noticeShouldBeNouveaute() { - $this->assertTrue($this->_notice->isNouveaute()); + public function noticeShouldNotBeNouveaute() { + /** en attendant de bien gérer la nouveauté pour les albums bib num */ + $this->assertFalse($this->_notice->isNouveaute()); } -- GitLab