Skip to content
Snippets Groups Projects
Commit e0dfc722 authored by Ghislain Loas's avatar Ghislain Loas
Browse files

dev #66057 fix tests failures

parent 4b15718d
Branches
Tags
2 merge requests!2379Dev#66057 bonus utiliser la grande image plutot que la vignette en affichage notice,!2372Dev#66057 bonus utiliser la grande image plutot que la vignette en affichage notice
Pipeline #2744 failed with stage
in 20 minutes and 26 seconds
......@@ -58,7 +58,7 @@ abstract class ZendAfi_View_Helper_Notice_VignetteStrategy {
$this->_preferences = $preferences;
$this->_label = $this->_('Afficher "%s"', $record->getTitrePrincipal());
$this->_initImagesUrls();
$this->_initUrl();
return Class_WebService_Vignette::NO_DATA == $this->_getUrl()
? $this->_renderNoThumbnail()
......@@ -66,15 +66,6 @@ abstract class ZendAfi_View_Helper_Notice_VignetteStrategy {
}
protected function _initImagesUrls() {
if(!$this->_record->hasUrlVignette())
$this->_record->fetchUrlVignette();
if(!$this->_record->hasUrlImage())
$this->_record->fetchUrlImage();
}
protected function _renderNoThumbnail() {
return $this->view->notice_HtmlThumbnail($this->_record, $this->_preferences);
}
......@@ -102,6 +93,7 @@ abstract class ZendAfi_View_Helper_Notice_VignetteStrategy {
abstract protected function _getUrl();
abstract protected function _fetchUrl();
abstract protected function _initUrl();
}
......@@ -125,6 +117,12 @@ class ZendAfi_View_Helper_Notice_VignetteStrategyResult
protected function _fetchUrl() {
return $this->_record->fetchUrlVignette();
}
protected function _initUrl() {
if(!$this->_record->hasUrlVignette())
$this->_record->fetchUrlVignette();
}
}
......@@ -161,4 +159,10 @@ class ZendAfi_View_Helper_Notice_VignetteStrategyView
protected function _getUrl() {
return $this->_fetchUrl();
}
protected function _initUrl() {
if(!$this->_record->hasUrlImage())
$this->_record->fetchUrlImage();
}
}
\ No newline at end of file
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