diff --git a/VERSIONS_HOTLINE/#28245 b/VERSIONS_HOTLINE/#28245 new file mode 100644 index 0000000000000000000000000000000000000000..3a985505c8a89a15416ae5964f03d0d3e71b2a12 --- /dev/null +++ b/VERSIONS_HOTLINE/#28245 @@ -0,0 +1 @@ +- ticket #28245: Corrige l'affichage aléatoire des critiques diff --git a/application/modules/opac/controllers/BlogController.php b/application/modules/opac/controllers/BlogController.php index 27a13c20daf03d821d4b14b73850af8189b80e21..eb3ef969305bfa28a9153ea6e75bed1f46c0b703 100644 --- a/application/modules/opac/controllers/BlogController.php +++ b/application/modules/opac/controllers/BlogController.php @@ -100,6 +100,9 @@ class BlogController extends ZendAfi_Controller_Action { $avis = Class_AvisNotice::getAvisFromPreferences($preferences,[$this->view->page, $this->view->config['nb_display']]); + if (isset($preferences['display_order']) && $preferences['display_order'] == 'Random') + shuffle($avis); + $this->view->liste_avis = $avis; $params_url=$this->_request->getParams(); diff --git a/library/ZendAfi/View/Helper/Accueil/Critiques.php b/library/ZendAfi/View/Helper/Accueil/Critiques.php index fc8710fc050e40c82524ab8c47ddfd76ee330c0a..4cf889d5026a6d9943dc074df7f12eb8570892ca 100644 --- a/library/ZendAfi/View/Helper/Accueil/Critiques.php +++ b/library/ZendAfi/View/Helper/Accueil/Critiques.php @@ -36,7 +36,7 @@ class ZendAfi_View_Helper_Accueil_Critiques extends ZendAfi_View_Helper_Accueil_ $fetched_avis = Class_AvisNotice::getAvisFromPreferences($this->getPreferences()); - if ($this->getPreferences('display_order') == 'Random') + if ($this->getPreference('display_order') == 'Random') shuffle($fetched_avis); $selected_avis = [];