diff --git a/VERSIONS_HOTLINE/95486 b/VERSIONS_HOTLINE/95486 new file mode 100644 index 0000000000000000000000000000000000000000..c6ed628c640d76553638b71b1e3c81151dfa3c42 --- /dev/null +++ b/VERSIONS_HOTLINE/95486 @@ -0,0 +1 @@ + - ticket #95486 : articles, albums, fiches bibliothèque: les vignettes générées sont maintenant en 500px \ No newline at end of file diff --git a/library/Class/Album.php b/library/Class/Album.php index 32a3c9a1694289ce885a82e6767032b9e8afe308..de8d4e8ab35c9c72cb1cb29e8b61684a843e66bd 100644 --- a/library/Class/Album.php +++ b/library/Class/Album.php @@ -739,7 +739,7 @@ class Class_Album extends Storm_Model_Abstract { try { $image = new Imagick($this->getVignettePath()); - $image->thumbnailImage(300, 0); + $image->thumbnailImage(THUMBNAIL_FIT_WIDTH_HEIGHT, THUMBNAIL_FIT_WIDTH_HEIGHT, true, false); if (!$image->writeImage($this->getThumbnailPath())) { $this->addError('Erreur lors de l\'enregistrement de la vignette'); diff --git a/library/Class/AlbumRessource.php b/library/Class/AlbumRessource.php index 9912bf5c92cd594f381af9bc2b1c5a405f221e4f..351df03add207c4f7b455f86c78bf90f6c818154 100644 --- a/library/Class/AlbumRessource.php +++ b/library/Class/AlbumRessource.php @@ -318,7 +318,7 @@ class Class_AlbumRessource extends Storm_Model_Abstract { try { $image = $this->getImage(); - $image->thumbnailImage(160, 0); + $image->thumbnailImage(THUMBNAIL_FIT_WIDTH_HEIGHT, THUMBNAIL_FIT_WIDTH_HEIGHT, true, false); if (!$image->writeImage($this->getThumbnailPath())) { $this->addError($this->_('Erreur lors de l\'enregistrement de la vignette')); diff --git a/library/Class/Bib.php b/library/Class/Bib.php index 14abc2dc82e9a7b74cbcd35f16bf2b0e8d26fceb..d56f1f411a75e16fee990fc1769885227ba49604 100644 --- a/library/Class/Bib.php +++ b/library/Class/Bib.php @@ -845,7 +845,7 @@ class Class_Bib extends Storm_Model_Abstract { try { $image = self::getImageFactory($this->getBasePath() . $this->getFile()); - $image->thumbnailImage(160, 0); + $image->thumbnailImage(THUMBNAIL_FIT_WIDTH_HEIGHT, THUMBNAIL_FIT_WIDTH_HEIGHT, true, false); if (!$image->writeImage($this->getThumbnailPath())) { $this->addError('Erreur lors de l\'enregistrement de la vignette'); diff --git a/library/Class/Notice/Thumbnail/ProviderLocal.php b/library/Class/Notice/Thumbnail/ProviderLocal.php index 4d14b3f3619e07aa3adec237c7cdec50b924b9da..0f041bd68ecf5c4f83a9cb6ad413b1f56a856d5a 100644 --- a/library/Class/Notice/Thumbnail/ProviderLocal.php +++ b/library/Class/Notice/Thumbnail/ProviderLocal.php @@ -32,7 +32,7 @@ class Class_Notice_Thumbnail_ProviderLocal $filename = $this->_record->getClefAlpha().'.jpg'; - $image->thumbnailImage(160, 220, true, true); + $image->thumbnailImage(THUMBNAIL_FIT_WIDTH_HEIGHT, THUMBNAIL_FIT_WIDTH_HEIGHT, true, false); try { $image->writeImage($this->_getPath($filename)); diff --git a/library/startup.php b/library/startup.php index bd60f174571cd623c36d3c653fa77ce63c99a388..3b136b53fc4ea31de1f8c1b99da37b74878f24d6 100644 --- a/library/startup.php +++ b/library/startup.php @@ -138,6 +138,7 @@ class Bokeh_Engine { defineConstant('MEMCACHED_PORT', '11211'); defineConstant('IMAGE_MAGICK_PATH', 'convert'); + defineConstant('THUMBNAIL_FIT_WIDTH_HEIGHT', '500'); defineConstant('PATCH_PATH', ROOT_PATH . '/cosmogramme/sql/patch/'); return $this; diff --git a/tests/application/modules/admin/controllers/CmsControllerTest.php b/tests/application/modules/admin/controllers/CmsControllerTest.php index 02462f8436103a3bf2ef76f707b19c6d0b8f0ac3..6e49b08209ca3b9384b218bcd07840f7a35b0d3c 100644 --- a/tests/application/modules/admin/controllers/CmsControllerTest.php +++ b/tests/application/modules/admin/controllers/CmsControllerTest.php @@ -932,7 +932,7 @@ class CmsControllerArticleConcertEditActionPostTest extends CmsControllerWithPer $image = $this->mock() ->whenCalled('thumbnailImage') - ->with(160, 220, true, true) + ->with(500, 500, true, false) ->answers(null) ->whenCalled('writeImage') diff --git a/tests/library/Class/ArticleTest.php b/tests/library/Class/ArticleTest.php index 5f2fd33fdaad095734f60a5d7e658a35d0e0709d..7f4f617588e5f61d8fad6ffb8157bf9cbfc7eb7d 100644 --- a/tests/library/Class/ArticleTest.php +++ b/tests/library/Class/ArticleTest.php @@ -1105,7 +1105,7 @@ class ArticleIndexAllTest extends ModelTestCase { $image = $this->mock() ->whenCalled('thumbnailImage') - ->with(160, 220, true, true) + ->with(500, 500, true, false) ->answers(null) ->whenCalled('writeImage') diff --git a/tests/library/Class/NoticeTest.php b/tests/library/Class/NoticeTest.php index d103fa05efa9d05b68ea81efbb13565f6f39dab4..4c21255d917c6d6babbd2a543d104d698fe139de 100644 --- a/tests/library/Class/NoticeTest.php +++ b/tests/library/Class/NoticeTest.php @@ -344,7 +344,7 @@ class NoticeVignetteTest extends ModelTestCase { ->beStrict()); $image = $this->mock() ->whenCalled('thumbnailImage') - ->with(160, 220, true, true) + ->with(500, 500, true, false) ->answers(null) ->whenCalled('writeImage') diff --git a/tests/library/Class/WebService/VignetteTest.php b/tests/library/Class/WebService/VignetteTest.php index f9967bfdf6d80cf4fe02de5d2ef8d81e0fc58e8a..768f97aaa21048fb0d5130bb255351b680133d0a 100644 --- a/tests/library/Class/WebService/VignetteTest.php +++ b/tests/library/Class/WebService/VignetteTest.php @@ -142,7 +142,7 @@ class Class_WebService_VignetteWrongFrbrTest extends ModelTestCase { $image = $this->mock() ->whenCalled('thumbnailImage') - ->with(160, 220, true, true) + ->with(500, 500, true, false) ->answers(null) ->whenCalled('writeImage')