Commit ef34e712 authored by Patrick Barroca's avatar Patrick Barroca 🐧

Merge branch…

Merge branch 'hotline#95486_articles_les_vignettes_generees_en_resultat_de_recherche_sont_trop_petites' into 'hotline'

article thumbnails to 500px

See merge request !3195
parents dd8e0f90 b6681e0f
Pipeline #8004 passed with stage
in 36 minutes and 35 seconds
- ticket #95486 : articles, albums, fiches bibliothèque: les vignettes générées sont maintenant en 500px
\ No newline at end of file
......@@ -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');
......
......@@ -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'));
......
......@@ -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');
......
......@@ -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));
......
......@@ -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;
......
......@@ -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')
......
......@@ -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')
......
......@@ -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')
......
......@@ -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')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment