update : save version when save config
This commit is contained in:
parent
90d0fc2127
commit
7f4e03f2c6
@ -407,7 +407,8 @@ class blog extends common {
|
|||||||
$this->setData(['module', $this->getUrl(0), 'config',[
|
$this->setData(['module', $this->getUrl(0), 'config',[
|
||||||
'feeds' => $this->getInput('blogConfigShowFeeds',helper::FILTER_BOOLEAN),
|
'feeds' => $this->getInput('blogConfigShowFeeds',helper::FILTER_BOOLEAN),
|
||||||
'feedsLabel' => $this->getInput('blogConfigFeedslabel',helper::FILTER_STRING_SHORT),
|
'feedsLabel' => $this->getInput('blogConfigFeedslabel',helper::FILTER_STRING_SHORT),
|
||||||
'itemsperPage' => $this->getInput('blogConfigItemsperPage', helper::FILTER_INT,true)
|
'itemsperPage' => $this->getInput('blogConfigItemsperPage', helper::FILTER_INT,true),
|
||||||
|
'version' => $this->getData(['module', $this->getUrl(0), 'config', 'version'])
|
||||||
]]);
|
]]);
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
|
@ -422,6 +422,7 @@ class download extends common {
|
|||||||
'feeds' => $this->getInput('downloadConfigShowFeeds',helper::FILTER_BOOLEAN),
|
'feeds' => $this->getInput('downloadConfigShowFeeds',helper::FILTER_BOOLEAN),
|
||||||
'feedsLabel' => $this->getInput('downloadConfigFeedslabel',helper::FILTER_STRING_SHORT),
|
'feedsLabel' => $this->getInput('downloadConfigFeedslabel',helper::FILTER_STRING_SHORT),
|
||||||
'itemsperPage' => $this->getInput('blogConfigItemsperPage', helper::FILTER_INT,true),
|
'itemsperPage' => $this->getInput('blogConfigItemsperPage', helper::FILTER_INT,true),
|
||||||
|
'version' => $this->getData(['module', $this->getUrl(0), 'config', 'version'])
|
||||||
]]);
|
]]);
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
|
@ -67,9 +67,9 @@ class news extends common {
|
|||||||
*/
|
*/
|
||||||
private function update() {
|
private function update() {
|
||||||
// Insitialisation de la version
|
// Insitialisation de la version
|
||||||
if ($this->getData(['module', $this->getUrl(0), 'config', 'version']) === NULL) {
|
//if ($this->getData(['module', $this->getUrl(0), 'config', 'version']) === NULL) {
|
||||||
$this->setData(['module', $this->getUrl(0), 'config', 'version','0.0']);
|
// $this->setData(['module', $this->getUrl(0), 'config', 'version','0.0']);
|
||||||
}
|
//}
|
||||||
// Version 3.0
|
// Version 3.0
|
||||||
if (version_compare($this->getData(['module', $this->getUrl(0), 'config', 'version']), '3.0', '<') ) {
|
if (version_compare($this->getData(['module', $this->getUrl(0), 'config', 'version']), '3.0', '<') ) {
|
||||||
$this->setData(['module', $this->getUrl(0), 'config', 'itemsperPage', 16]);
|
$this->setData(['module', $this->getUrl(0), 'config', 'itemsperPage', 16]);
|
||||||
@ -181,7 +181,8 @@ class news extends common {
|
|||||||
'feeds' => $this->getInput('newsConfigShowFeeds',helper::FILTER_BOOLEAN),
|
'feeds' => $this->getInput('newsConfigShowFeeds',helper::FILTER_BOOLEAN),
|
||||||
'feedsLabel' => $this->getInput('newsConfigFeedslabel',helper::FILTER_STRING_SHORT),
|
'feedsLabel' => $this->getInput('newsConfigFeedslabel',helper::FILTER_STRING_SHORT),
|
||||||
'itemsperPage' => $this->getInput('newsConfigItemsperPage', helper::FILTER_INT,true),
|
'itemsperPage' => $this->getInput('newsConfigItemsperPage', helper::FILTER_INT,true),
|
||||||
'itemsperCol' => $this->getInput('newsConfigItemsperCol', helper::FILTER_INT,true)
|
'itemsperCol' => $this->getInput('newsConfigItemsperCol', helper::FILTER_INT,true),
|
||||||
|
'version' => $this->getData(['module', $this->getUrl(0), 'config', 'version'])
|
||||||
]]);
|
]]);
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
|
Loading…
Reference in New Issue
Block a user