diff --git a/module/blog/blog.php b/module/blog/blog.php index 5b4f4370..b619b715 100755 --- a/module/blog/blog.php +++ b/module/blog/blog.php @@ -115,7 +115,7 @@ class blog extends common { $this->setData(['module', $this->getUrl(0), 'config', 'version','4.5']); } // Version 5.0 - if (version_compare($this->getData(['module', $this->getUrl(0), 'versionData']), '5.0', '<') ) { + if (version_compare($this->getData(['module', $this->getUrl(0), 'config', 'version']), '5.0', '<') ) { $this->setData(['module', $this->getUrl(0), 'config', 'itemsperPage', 6]); $this->setData(['module', $this->getUrl(0), 'config', 'version','5.0']); } @@ -263,7 +263,7 @@ class blog extends common { // Ids des commentaires par ordre de création $commentIds = array_keys(helper::arrayCollumn($comments, 'createdOn', 'SORT_DESC')); // Pagination - $pagination = helper::pagination($commentIds, $this->getUrl(),$this->getData(['config','itemsperPage'])); + $pagination = helper::pagination($commentIds, $this->getUrl(),$this->getData(['module', $this->getUrl(0), 'config', 'itemsperPage']) ); // Liste des pages self::$pages = $pagination['pages']; // Commentaires en fonction de la pagination @@ -712,7 +712,7 @@ class blog extends common { } $commentIds = array_keys(helper::arrayCollumn($commentsApproved, 'createdOn', 'SORT_DESC')); // Pagination - $pagination = helper::pagination($commentIds, $this->getUrl(),$this->getData(['module', $this->getUrl(0),'config', 'itemsperPage']),'#comment'); + $pagination = helper::pagination($commentIds, $this->getUrl(), $this->getData(['module', $this->getUrl(0),'config', 'itemsperPage']),'#comment'); // Liste des pages self::$pages = $pagination['pages']; // Signature de l'article diff --git a/module/news/news.php b/module/news/news.php index 85fa93df..9fed8b52 100755 --- a/module/news/news.php +++ b/module/news/news.php @@ -71,7 +71,7 @@ class news extends common { $this->setData(['module', $this->getUrl(0), 'config', 'version','0.0']); } // Version 3.0 - if (version_compare($this->getData(['module', $this->getUrl(0), 'versionData']), self::VERSION, '<') ) { + if (version_compare($this->getData(['module', $this->getUrl(0), 'config', 'version']), self::VERSION, '<') ) { $this->setData(['module', $this->getUrl(0), 'config', 'itemsperPage', 16]); $this->setData(['module', $this->getUrl(0), 'config', 'itemsperCol', 6]); $this->setData(['module', $this->getUrl(0), 'config', 'version','3.0']); @@ -103,7 +103,7 @@ class news extends common { // Corps des articles $newsIdsPublishedOns = helper::arrayCollumn($this->getData(['module', $this->getUrl(0), 'posts']), 'publishedOn', 'SORT_DESC'); // Articles de la première page uniquement - $newsIdsPublishedOns = array_slice($newsIdsPublishedOns, 0, $this->getData(['config', 'itemsperPage']) ); + $newsIdsPublishedOns = array_slice($newsIdsPublishedOns, 0, $this->getData(['module', $this->getUrl(0), 'config', 'itemsperPage']) ); $newsIdsStates = helper::arrayCollumn($this->getData(['module', $this->getUrl(0), 'posts']), 'state', 'SORT_DESC'); foreach($newsIdsPublishedOns as $newsId => $newsPublishedOn) { if($newsPublishedOn <= time() AND $newsIdsStates[$newsId]) { @@ -193,7 +193,7 @@ class news extends common { // Ids des news par ordre de publication $newsIds = array_keys(helper::arrayCollumn($this->getData(['module', $this->getUrl(0), 'posts']), 'publishedOn', 'SORT_DESC')); // Pagination - $pagination = helper::pagination($newsIds, $this->getUrl(),$this->getData(['config','itemsperPage'])); + $pagination = helper::pagination($newsIds, $this->getUrl(),$this->getData(['module', $this->getUrl(0), 'config', 'itemsperPage']) ); // Liste des pages self::$pages = $pagination['pages']; // News en fonction de la pagination