bug routeur

This commit is contained in:
Fred Tempez 2020-10-11 03:34:13 +02:00
parent 107c41f409
commit 920f012007

View File

@ -1743,7 +1743,7 @@ class core extends common {
$accessInfo['userName'] = '';
$accessInfo['pageId'] = '';
if($this->getData(['page', $this->getUrl(0)]) !== null
OR $this->getData(['page', $this->getUrl(2)]) !== NULL) { // Page Redirection éviter une valeur nulle
) {
if(
$this->getData(['page', $this->getUrl(0), 'group']) === self::GROUP_VISITOR
OR (
@ -1762,6 +1762,8 @@ class core extends common {
}
}
}
var_dump($access);
echo $this->getUrl(0);
/**
* Contrôle si la page demandée est en édition ou accès à la gestion du site
* conditions de blocage :
@ -1772,12 +1774,12 @@ class core extends common {
*/
foreach($this->getData(['user']) as $userId => $userIds){
$t = explode('/',$this->getData(['user', $userId, 'accessUrl']));
if ( $this->getuser('id') &&
$userId !== $this->getuser('id') &&
$this->getData(['user', $userId,'accessUrl']) === $this->getUrl() &&
array_intersect($t,self::$accessList) &&
array_intersect($t,self::$accessExclude) !== false &&
time() < $this->getData(['user', $userId,'accessTimer']) + self::ACCESS_TIMER
if ( $this->getuser('id')
AND $userId !== $this->getuser('id')
AND $this->getData(['user', $userId,'accessUrl']) === $this->getUrl()
AND array_intersect($t,self::$accessList)
AND array_intersect($t,self::$accessExclude) !== false
AND time() < $this->getData(['user', $userId,'accessTimer']) + self::ACCESS_TIMER
) {
$access = false;
$accessInfo['userName'] = $this->getData(['user', $userId, 'lastname']) . ' ' . $this->getData(['user', $userId, 'firstname']);
@ -1791,16 +1793,13 @@ class core extends common {
}
// Breadcrumb
$title = $this->getData(['page', $this->getUrl(0), 'title']);
if (!empty($this->getData(['page', $this->getUrl(0), 'parentPageId'])) &&
$this->getData(['page', $this->getUrl(0), 'breadCrumb'])) {
$title = '<a href="' . helper::baseUrl() .
$this->getData(['page', $this->getUrl(0), 'parentPageId']) .
'">' .
ucfirst($this->getData(['page',$this->getData(['page', $this->getUrl(0), 'parentPageId']), 'title'])) .
'</a> &#8250; '.
$this->getData(['page', $this->getUrl(0), 'title']);
if (!empty($this->getData(['page', $this->getUrl(0), 'parentPageId']))
AND $this->getData(['page', $this->getUrl(0), 'breadCrumb'])) {
$title = '<a href="' . helper::baseUrl() . $this->getData(['page', $this->getUrl(0), 'parentPageId']) .
'">' . ucfirst($this->getData(['page',$this->getData(['page', $this->getUrl(0), 'parentPageId']), 'title'])) .
'</a> &#8250; '. $this->getData(['page', $this->getUrl(0), 'title']);
}
var_dump($access);
// Importe la page
if(
$this->getData(['page', $this->getUrl(0)]) !== null
@ -1874,6 +1873,7 @@ class core extends common {
)
)
AND $output['access'] === true
AND $access !== false
) {
// Enregistrement du contenu de la méthode POST lorsqu'une notice est présente
if(common::$inputNotices) {
@ -1997,6 +1997,7 @@ class core extends common {
}
}
}
var_dump($access);
// Erreurs
if($access === 'login') {
http_response_code(302);