diff --git a/VERSIONS_HOTLINE/24903 b/VERSIONS_HOTLINE/24903 new file mode 100644 index 0000000000000000000000000000000000000000..2e29e418e0cc6d7e3e1f7cc1d78dd512634a3e96 --- /dev/null +++ b/VERSIONS_HOTLINE/24903 @@ -0,0 +1 @@ +- ticket #24903 : les urls de génération des vignettes utilisent le format ZF, ce qui corrige un problème de chargement selon l'infrastructure d'installation \ No newline at end of file diff --git a/library/Class/WebService/Vignette.php b/library/Class/WebService/Vignette.php index 93ca6a458bc7c117bad284b819f36d3eca041074..bf2434ac13ce49854ff613e1df667ac3e508438e 100644 --- a/library/Class/WebService/Vignette.php +++ b/library/Class/WebService/Vignette.php @@ -63,7 +63,12 @@ class Class_WebService_Vignette extends Class_WebService_Abstract { public static function getAjaxUrl($notice) { $clef_controle = Class_WebService_Vignette::getClefControle(); - return BASE_URL."/recherche/vignette?clef=".$clef_controle."&id_notice=".$notice->getId(); + return Class_Url::assemble(['controller' => 'recherche', + 'action' => 'vignette', + 'clef' => $clef_controle, + 'id_notice' => $notice->getId()], + null, + true); } //------------------------------------------------------------------------------------------------------ diff --git a/tests/application/modules/telephone/controllers/RechercheControllerTest.php b/tests/application/modules/telephone/controllers/RechercheControllerTest.php index 52b146603a7ddb831933df106ac66a73bb5bcee8..91e018fa23cd124814ebc6f3d79cd5b4da24c831 100644 --- a/tests/application/modules/telephone/controllers/RechercheControllerTest.php +++ b/tests/application/modules/telephone/controllers/RechercheControllerTest.php @@ -255,7 +255,7 @@ class Telephone_RechercheControllerFrbrWithLinksTest extends TelephoneAbstractCo /** @test */ public function tintinPicarosShouldHaveImageFromVignetteAction() { - $this->assertXPath('//li/a/img[contains(@src, "/recherche/vignette?clef=")]'); + $this->assertXPath('//li/a/img[contains(@src, "/recherche/vignette/clef")][contains(@src, "/id_notice/555")]'); } } diff --git a/tests/library/Class/NoticeTest.php b/tests/library/Class/NoticeTest.php index 76469df673c799dcc25da1082adfba059c2c16d1..b00af223c850c59a135cadb4790b6cd7efd0a2a0 100644 --- a/tests/library/Class/NoticeTest.php +++ b/tests/library/Class/NoticeTest.php @@ -118,7 +118,7 @@ class NoticeVignetteTest extends Storm_Test_ModelTestCase { /** @test */ public function withoutThumbnailFetchUrlVignetteShouldAnswerVignetteActionForAjax() { - $this->assertContains('/recherche/vignette?clef=', + $this->assertContains('/recherche/vignette/clef/', $this->_notice_without_thumbnails->fetchUrlVignette()); $this->assertFalse($this->_http_client->methodHasBeenCalled('open_url')); }