Bug page privée et désactivée + bug module de recherche groupes pages enfants

This commit is contained in:
fredtempez 2020-12-01 18:29:58 +01:00
parent b38628d726
commit 1e76d58f7e
2 changed files with 21 additions and 10 deletions

View File

@ -2430,12 +2430,17 @@ class layout extends common {
// Mise en page de l'item // Mise en page de l'item
$itemsLeft .= '<li>'; $itemsLeft .= '<li>';
if ( $this->getData(['page',$parentPageId,'disable']) === true if ( ( $this->getData(['page',$parentPageId,'disable']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
) OR (
{$itemsLeft .= '<a class="' . $parentPageId . '" href="'.$this->getUrl(1).'">'; $this->getData(['page',$parentPageId,'disable']) === true
AND $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
AND $this->getUser('group') < self::GROUP_MODERATOR
)
){
$itemsLeft .= '<a class="' . $parentPageId . '" href="'. helper::baseUrl() . $this->getUrl(0).'">';
} else { } else {
$itemsLeft .= '<a class="' . $active . $parentPageId . '" href="' . helper::baseUrl() . $parentPageId . '"' . $targetBlank . '>'; $itemsLeft .= '<a class="' . $active . $parentPageId . '" href="' . helper::baseUrl() . $parentPageId . '"' . $targetBlank . '>';
} }
switch ($this->getData(['page', $parentPageId, 'typeMenu'])) { switch ($this->getData(['page', $parentPageId, 'typeMenu'])) {
@ -2485,9 +2490,15 @@ class layout extends common {
$targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : ''; $targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : '';
// Mise en page du sous-item // Mise en page du sous-item
$itemsLeft .= '<li>'; $itemsLeft .= '<li>';
if ( $this->getData(['page',$childKey,'disable']) === true if ( ( $this->getData(['page',$childKey,'disable']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) { AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
$itemsLeft .= '<a class="' . $parentPageId . '" href="'.$this->getUrl(1).'">'; ) OR (
$this->getData(['page',$childKey,'disable']) === true
AND $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
AND $this->getUser('group') < self::GROUP_MODERATOR
)
){
$itemsLeft .= '<a class="' . $parentPageId . '" href="'.helper::baseUrl() . $this->getUrl(0).'">';
} else { } else {
$itemsLeft .= '<a class="' . $active . $parentPageId . '" href="' . helper::baseUrl() . $childKey . '"' . $targetBlank . '>'; $itemsLeft .= '<a class="' . $active . $parentPageId . '" href="' . helper::baseUrl() . $childKey . '"' . $targetBlank . '>';
} }

View File

@ -126,8 +126,8 @@ class search extends common {
foreach($childIds as $childId) { foreach($childIds as $childId) {
// Sous page // Sous page
if ($this->getData(['page', $childId, 'disable']) === false && if ($this->getData(['page', $childId, 'disable']) === false &&
$this->getUser('group') >= $this->getData(['page', $parentId, 'group']) && $this->getUser('group') >= $this->getData(['page', $childId, 'group']) &&
$this->getData(['page', $parentId, 'block']) !== 'bar') { $this->getData(['page', $childId, 'block']) !== 'bar') {
$url = $childId; $url = $childId;
$titre = $this->getData(['page', $childId, 'title']); $titre = $this->getData(['page', $childId, 'title']);
$contenu = ' ' . $titre . ' ' . $this->getData(['page', $childId, 'content']); $contenu = ' ' . $titre . ' ' . $this->getData(['page', $childId, 'content']);