forked from ZwiiCMS-Team/ZwiiCMS
parent
f1da9bead6
commit
f4d75f0142
|
@ -1797,10 +1797,7 @@ class core extends common {
|
||||||
}
|
}
|
||||||
// Check l'accès à la page
|
// Check l'accès à la page
|
||||||
$access = null;
|
$access = null;
|
||||||
if($this->getData(['page', $this->getUrl(0)]) !== null
|
if($this->getData(['page', $this->getUrl(0)]) !== null)
|
||||||
OR $this->getData(['page', $this->getUrl(1)]) !== null
|
|
||||||
OR $this->getData(['page', $this->getUrl(2)]) !== null
|
|
||||||
) {
|
|
||||||
if(
|
if(
|
||||||
$this->getData(['page', $this->getUrl(0), 'group']) === self::GROUP_VISITOR
|
$this->getData(['page', $this->getUrl(0), 'group']) === self::GROUP_VISITOR
|
||||||
OR (
|
OR (
|
||||||
|
@ -1822,8 +1819,6 @@ class core extends common {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var_dump($access);
|
|
||||||
echo $this->getUrl(1);
|
|
||||||
/**
|
/**
|
||||||
* Contrôle si la page demandée est en édition ou accès à la gestion du site
|
* Contrôle si la page demandée est en édition ou accès à la gestion du site
|
||||||
* conditions de blocage :
|
* conditions de blocage :
|
||||||
|
@ -1836,12 +1831,12 @@ class core extends common {
|
||||||
$accessInfo['pageId'] = '';
|
$accessInfo['pageId'] = '';
|
||||||
foreach($this->getData(['user']) as $userId => $userIds){
|
foreach($this->getData(['user']) as $userId => $userIds){
|
||||||
$t = explode('/',$this->getData(['user', $userId, 'accessUrl']));
|
$t = explode('/',$this->getData(['user', $userId, 'accessUrl']));
|
||||||
if ( $this->getuser('id')
|
if ( $this->getuser('id') &&
|
||||||
AND $userId !== $this->getuser('id')
|
$userId !== $this->getuser('id') &&
|
||||||
AND $this->getData(['user', $userId,'accessUrl']) === $this->getUrl()
|
$this->getData(['user', $userId,'accessUrl']) === $this->getUrl() &&
|
||||||
AND array_intersect($t,self::$accessList)
|
array_intersect($t,self::$accessList) &&
|
||||||
AND array_intersect($t,self::$accessExclude) !== false
|
array_intersect($t,self::$accessExclude) !== false &&
|
||||||
AND time() < $this->getData(['user', $userId,'accessTimer']) + self::ACCESS_TIMER
|
time() < $this->getData(['user', $userId,'accessTimer']) + self::ACCESS_TIMER
|
||||||
) {
|
) {
|
||||||
$access = false;
|
$access = false;
|
||||||
$accessInfo['userName'] = $this->getData(['user', $userId, 'lastname']) . ' ' . $this->getData(['user', $userId, 'firstname']);
|
$accessInfo['userName'] = $this->getData(['user', $userId, 'lastname']) . ' ' . $this->getData(['user', $userId, 'firstname']);
|
||||||
|
@ -1855,13 +1850,16 @@ class core extends common {
|
||||||
}
|
}
|
||||||
// Breadcrumb
|
// Breadcrumb
|
||||||
$title = $this->getData(['page', $this->getUrl(0), 'title']);
|
$title = $this->getData(['page', $this->getUrl(0), 'title']);
|
||||||
if (!empty($this->getData(['page', $this->getUrl(0), 'parentPageId']))
|
if (!empty($this->getData(['page', $this->getUrl(0), 'parentPageId'])) &&
|
||||||
AND $this->getData(['page', $this->getUrl(0), 'breadCrumb'])) {
|
$this->getData(['page', $this->getUrl(0), 'breadCrumb'])) {
|
||||||
$title = '<a href="' . helper::baseUrl() . $this->getData(['page', $this->getUrl(0), 'parentPageId']) .
|
$title = '<a href="' . helper::baseUrl() .
|
||||||
'">' . ucfirst($this->getData(['page',$this->getData(['page', $this->getUrl(0), 'parentPageId']), 'title'])) .
|
$this->getData(['page', $this->getUrl(0), 'parentPageId']) .
|
||||||
'</a> › '. $this->getData(['page', $this->getUrl(0), 'title']);
|
'">' .
|
||||||
|
ucfirst($this->getData(['page',$this->getData(['page', $this->getUrl(0), 'parentPageId']), 'title'])) .
|
||||||
|
'</a> › '.
|
||||||
|
$this->getData(['page', $this->getUrl(0), 'title']);
|
||||||
}
|
}
|
||||||
var_dump($access);
|
|
||||||
// Importe la page
|
// Importe la page
|
||||||
if(
|
if(
|
||||||
$this->getData(['page', $this->getUrl(0)]) !== null
|
$this->getData(['page', $this->getUrl(0)]) !== null
|
||||||
|
@ -1935,7 +1933,6 @@ class core extends common {
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
AND $output['access'] === true
|
AND $output['access'] === true
|
||||||
AND $access !== false
|
|
||||||
) {
|
) {
|
||||||
// Enregistrement du contenu de la méthode POST lorsqu'une notice est présente
|
// Enregistrement du contenu de la méthode POST lorsqu'une notice est présente
|
||||||
if(common::$inputNotices) {
|
if(common::$inputNotices) {
|
||||||
|
@ -2059,7 +2056,6 @@ class core extends common {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var_dump($access);
|
|
||||||
// Erreurs
|
// Erreurs
|
||||||
if($access === 'login') {
|
if($access === 'login') {
|
||||||
http_response_code(302);
|
http_response_code(302);
|
||||||
|
|
Loading…
Reference in New Issue