forked from ZwiiCMS-Team/ZwiiCampus
Masque les icônes de gestion dans le cours
This commit is contained in:
parent
6463037734
commit
6a8e432b10
@ -1046,7 +1046,10 @@ class layout extends common
|
|||||||
'attr' => 'data-lity'
|
'attr' => 'data-lity'
|
||||||
]) . '</li>';
|
]) . '</li>';
|
||||||
}
|
}
|
||||||
if ($this->getUser('group') >= self::GROUP_ADMIN) {
|
if (
|
||||||
|
self::$siteContent === 'home'
|
||||||
|
&& $this->getUser('group') >= self::GROUP_ADMIN
|
||||||
|
) {
|
||||||
$rightItems .= '<li>' . template::ico('puzzle', [
|
$rightItems .= '<li>' . template::ico('puzzle', [
|
||||||
'help' => 'Modules',
|
'help' => 'Modules',
|
||||||
'href' => helper::baseUrl() . 'plugin'
|
'href' => helper::baseUrl() . 'plugin'
|
||||||
@ -1241,7 +1244,7 @@ class layout extends common
|
|||||||
|
|
||||||
// Trouver la clé de l'élément recherché
|
// Trouver la clé de l'élément recherché
|
||||||
$key = array_search($elementToFind, $hierarchy);
|
$key = array_search($elementToFind, $hierarchy);
|
||||||
|
|
||||||
$previousPage = null;
|
$previousPage = null;
|
||||||
$nextPage = null;
|
$nextPage = null;
|
||||||
if ($key !== false) {
|
if ($key !== false) {
|
||||||
|
@ -884,6 +884,12 @@ class core extends common
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($access === false) {
|
if ($access === false) {
|
||||||
|
// Bascule sur le site d'accueil
|
||||||
|
if ($_SESSION['ZWII_SITE_CONTENT'] !== 'home') {
|
||||||
|
$_SESSION['ZWII_SITE_CONTENT'] = 'home';
|
||||||
|
header('Location:' . helper::baseUrl() . $this->getUrl());
|
||||||
|
exit();
|
||||||
|
}
|
||||||
http_response_code(403);
|
http_response_code(403);
|
||||||
if ($accessInfo['userName']) {
|
if ($accessInfo['userName']) {
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
@ -905,6 +911,12 @@ class core extends common
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif ($this->output['content'] === '') {
|
} elseif ($this->output['content'] === '') {
|
||||||
|
// Bascule sur le site d'accueil pour afficher la page d'erreur
|
||||||
|
if ($_SESSION['ZWII_SITE_CONTENT'] !== 'home') {
|
||||||
|
$_SESSION['ZWII_SITE_CONTENT'] = 'home';
|
||||||
|
header('Location:' . helper::baseUrl() . $this->getUrl());
|
||||||
|
exit();
|
||||||
|
}
|
||||||
http_response_code(404);
|
http_response_code(404);
|
||||||
if (
|
if (
|
||||||
$this->getData(['config', 'page404']) !== 'none'
|
$this->getData(['config', 'page404']) !== 'none'
|
||||||
|
Loading…
Reference in New Issue
Block a user