Merge branch '10303' into editeur

This commit is contained in:
Fred Tempez 2020-10-11 03:46:23 +02:00
commit 2ca430f7b4
1 changed files with 17 additions and 16 deletions

View File

@ -1800,7 +1800,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 (
@ -1819,6 +1819,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 :
@ -1829,12 +1831,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']);
@ -1848,16 +1850,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
@ -1931,6 +1930,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) {
@ -2054,6 +2054,7 @@ class core extends common {
}
}
}
var_dump($access);
// Erreurs
if($access === 'login') {
http_response_code(302);