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) {
|
||||
//La page a une galerie
|
||||
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) {
|
||||
// Droits les deux groupes
|
||||
$this->setData(['module', $parent, $article,'editConsent', 3]);
|
||||
$this->setData(['module', $parent, 'posts', $article,'editConsent', 3]);
|
||||
// Limite de taille 500
|
||||
$this->setData(['module', $parent, $article,'commentMaxlength', '500']);
|
||||
$this->setData(['module', $parent, 'posts', $article,'commentMaxlength', '500']);
|
||||
// Pas d'approbation des commentaires
|
||||
$this->setData(['module', $parent, $article,'commentApproved', false ]);
|
||||
$this->setData(['module', $parent, 'posts', $article,'commentApproved', false ]);
|
||||
// pas de notification
|
||||
$this->setData(['module', $parent, $article,'commentNotification', false ]);
|
||||
$this->setData(['module', $parent, 'posts', $article,'commentNotification', false ]);
|
||||
// groupe de notification
|
||||
$this->setData(['module', $parent, $article,'commentGroupNotification', 3 ]);
|
||||
$this->setData(['module', $parent, 'posts', $article,'commentGroupNotification', 3 ]);
|
||||
}
|
||||
// Traitement des commentaires
|
||||
if ( is_array($this->getData(['module', $parent, $article,'comment'])) ) {
|
||||
foreach($this->getData(['module', $parent, $article,'comment']) as $commentId => $comment) {
|
||||
if ( is_array($this->getData(['module', $parent, 'posts', $article,'comment'])) ) {
|
||||
foreach($this->getData(['module', $parent, 'posts', $article,'comment']) as $commentId => $comment) {
|
||||
// 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
|
||||
$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));
|
||||
// Crée l'article
|
||||
$this->setData(['module',
|
||||
|
@ -354,7 +354,7 @@ class blog extends common {
|
|||
*/
|
||||
public function config() {
|
||||
// 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
|
||||
$filterData=[];
|
||||
foreach ($articleIds as $key => $value) {
|
||||
|
|
Loading…
Reference in New Issue