Skip to content
Snippets Groups Projects
Commit 0d585fe6 authored by efalcy's avatar efalcy
Browse files

hotline #13566 : viewcritics should display 50 if number display set to null or empty

parent 5994f0da
Branches
Tags
3 merge requests!1046Master,!1045Hotline master,!1039Hotline #13566 default nb display viewcritics
......@@ -90,6 +90,13 @@ class BlogController extends ZendAfi_Controller_Action {
}
protected function updateBlogConfigDefault() {
if (!$this->view->config['nb_display'] || $this->view->config['nb_display']<1) {
$this->view->config['nb_display']=(new Class_Systeme_ModulesAppli())->getValeursParDefaut('blog', 'viewcritiques')['nb_display'];
}
}
public function viewcritiquesAction() {
$this->view->page = $this->_getParam('page',1);
$id_module = (int)$this->_getParam('id_module');
......@@ -97,7 +104,7 @@ class BlogController extends ZendAfi_Controller_Action {
$preferences = $profil
->getModuleAccueilPreferences($id_module, 'CRITIQUES');
$this->view->config=$profil->getConfigurationOf('blog','viewcritiques','');
$this->updateBlogConfigDefault();
$avis = Class_AvisNotice::getAvisFromPreferences($preferences,[$this->view->page, $this->view->config['nb_display']]);
$this->view->liste_avis = $avis;
......
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