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

View File

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