news update simplifié

This commit is contained in:
Fred Tempez 2021-03-31 14:36:09 +02:00
parent 51b6f4b51d
commit b0e8be710b
1 changed files with 4 additions and 8 deletions

View File

@ -70,15 +70,11 @@ class news extends common {
if ($this->getData(['module', $this->getUrl(0), 'config', 'version']) === NULL) {
$this->setData(['module', $this->getUrl(0), 'config', 'version','0.0']);
}
// Version 2.4
// Version 3.0
if (version_compare($this->getData(['module', $this->getUrl(0), 'versionData']), self::VERSION, '<') ) {
$this->setData(['module', $this->getUrl(0),'config', [
'itemsperPage' => 16,
'itemsperCol'=> 6,
'feeds' => $this->getData(['module', $this->getUrl(0), 'config','feeds']),
'feedsLabel' => $this->getData(['module', $this->getUrl(0), 'config','feedsLabel']),
'version' => '3.0'
]]);
$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']);
}
}