Durcir update blog et news
This commit is contained in:
parent
3136da34ca
commit
e414988bee
@ -1462,22 +1462,28 @@ class common {
|
||||
}
|
||||
// Mettre à jour les données des blogs les articles sont dans posts
|
||||
foreach ($pageList as $parentKey => $parent) {
|
||||
//La page a une galerie
|
||||
//La page a un blog
|
||||
if ($this->getData(['page',$parent,'moduleId']) === 'blog' ) {
|
||||
foreach ( $this->getData(['module', $parent]) as $blogKey => $blogItem) {
|
||||
$data = $this->getdata(['module',$parent,$blogKey]);
|
||||
$this->deleteData(['module',$parent, $blogKey]);
|
||||
$this->setData([ 'module', $parent, 'posts', $blogKey, $data ]);
|
||||
if (is_array($this->getData(['module', $parent]))) {
|
||||
foreach ( $this->getData(['module', $parent]) as $blogKey => $blogItem) {
|
||||
if ($blogKey === 'posts' OR $blogKey === 'config') {continue;}
|
||||
$data = $this->getdata(['module',$parent,$blogKey]);
|
||||
$this->deleteData(['module',$parent, $blogKey]);
|
||||
$this->setData([ 'module', $parent, 'posts', $blogKey, $data ]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach ($pageList as $parentKey => $parent) {
|
||||
//La page a une galerie
|
||||
//La page a une news
|
||||
if ($this->getData(['page',$parent,'moduleId']) === 'news' ) {
|
||||
foreach ( $this->getData(['module', $parent]) as $newsKey => $newsItem) {
|
||||
$data = $this->getdata(['module',$parent,$newsKey]);
|
||||
$this->deleteData(['module',$parent, $newsKey]);
|
||||
$this->setData([ 'module', $parent, 'posts', $newsKey, $data ]);
|
||||
if (is_array($this->getData(['module', $parent]))) {
|
||||
foreach ( $this->getData(['module', $parent]) as $newsKey => $newsItem) {
|
||||
if ($blogKey === 'posts' OR $blogKey === 'config') {continue;}
|
||||
$data = $this->getdata(['module',$parent,$newsKey]);
|
||||
$this->deleteData(['module',$parent, $newsKey]);
|
||||
$this->setData([ 'module', $parent, 'posts', $newsKey, $data ]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user