forked from ZwiiCMS-Team/ZwiiCMS
merge fix WIP
This commit is contained in:
parent
e4ff62f984
commit
0f12d2e3f0
|
@ -1483,24 +1483,24 @@ class common {
|
||||||
foreach ($pageList as $parentKey => $parent) {
|
foreach ($pageList as $parentKey => $parent) {
|
||||||
//La page a une galerie
|
//La page a une galerie
|
||||||
if ($this->getData(['page',$parent,'moduleId']) === 'blog' ) {
|
if ($this->getData(['page',$parent,'moduleId']) === 'blog' ) {
|
||||||
$articleIds = array_keys(helper::arrayCollumn($this->getData(['module',$parent]), 'publishedOn', 'SORT_DESC'));
|
$articleIds = array_keys(helper::arrayCollumn($this->getData(['module',$parent,'posts']), 'publishedOn', 'SORT_DESC'));
|
||||||
foreach ($articleIds as $key => $article) {
|
foreach ($articleIds as $key => $article) {
|
||||||
// Droits les deux groupes
|
// Droits les deux groupes
|
||||||
$this->setData(['module', $parent, $article,'editConsent', 3]);
|
$this->setData(['module', $parent, 'posts', $article,'editConsent', 3]);
|
||||||
// Limite de taille 500
|
// Limite de taille 500
|
||||||
$this->setData(['module', $parent, $article,'commentMaxlength', '500']);
|
$this->setData(['module', $parent, 'posts', $article,'commentMaxlength', '500']);
|
||||||
// Pas d'approbation des commentaires
|
// Pas d'approbation des commentaires
|
||||||
$this->setData(['module', $parent, $article,'commentApproved', false ]);
|
$this->setData(['module', $parent, 'posts', $article,'commentApproved', false ]);
|
||||||
// pas de notification
|
// pas de notification
|
||||||
$this->setData(['module', $parent, $article,'commentNotification', false ]);
|
$this->setData(['module', $parent, 'posts', $article,'commentNotification', false ]);
|
||||||
// groupe de notification
|
// groupe de notification
|
||||||
$this->setData(['module', $parent, $article,'commentGroupNotification', 3 ]);
|
$this->setData(['module', $parent, 'posts', $article,'commentGroupNotification', 3 ]);
|
||||||
}
|
}
|
||||||
// Traitement des commentaires
|
// Traitement des commentaires
|
||||||
if ( is_array($this->getData(['module', $parent, $article,'comment'])) ) {
|
if ( is_array($this->getData(['module', $parent, 'posts', $article,'comment'])) ) {
|
||||||
foreach($this->getData(['module', $parent, $article,'comment']) as $commentId => $comment) {
|
foreach($this->getData(['module', $parent, 'posts', $article,'comment']) as $commentId => $comment) {
|
||||||
// Approbation
|
// Approbation
|
||||||
$this->setData(['module', $parent, $article,'comment', $commentId, 'approval', true ]);
|
$this->setData(['module', $parent, 'posts', $article,'comment', $commentId, 'approval', true ]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,7 +152,7 @@ class blog extends common {
|
||||||
}
|
}
|
||||||
// Incrémente l'id de l'article
|
// Incrémente l'id de l'article
|
||||||
$articleId = helper::increment($this->getInput('blogAddTitle', helper::FILTER_ID), $this->getData(['page']));
|
$articleId = helper::increment($this->getInput('blogAddTitle', helper::FILTER_ID), $this->getData(['page']));
|
||||||
$articleId = helper::increment($articleId, (array) $this->getData(['module', $this->getUrl(0)]));
|
$articleId = helper::increment($articleId, (array) $this->getData(['module', $this->getUrl(0),'posts']));
|
||||||
$articleId = helper::increment($articleId, array_keys(self::$actions));
|
$articleId = helper::increment($articleId, array_keys(self::$actions));
|
||||||
// Crée l'article
|
// Crée l'article
|
||||||
$this->setData(['module',
|
$this->setData(['module',
|
||||||
|
@ -354,7 +354,7 @@ class blog extends common {
|
||||||
*/
|
*/
|
||||||
public function config() {
|
public function config() {
|
||||||
// Ids des articles par ordre de publication
|
// Ids des articles par ordre de publication
|
||||||
$articleIds = array_keys(helper::arrayCollumn($this->getData(['module', $this->getUrl(0)]), 'publishedOn', 'SORT_DESC'));
|
$articleIds = array_keys(helper::arrayCollumn($this->getData(['module', $this->getUrl(0),'posts']), 'publishedOn', 'SORT_DESC'));
|
||||||
// Gestion des droits d'accès
|
// Gestion des droits d'accès
|
||||||
$filterData=[];
|
$filterData=[];
|
||||||
foreach ($articleIds as $key => $value) {
|
foreach ($articleIds as $key => $value) {
|
||||||
|
|
Loading…
Reference in New Issue