From 8aeddf77c14f963726169d39acd94a212731921f Mon Sep 17 00:00:00 2001 From: fredtempez Date: Mon, 12 Jun 2023 21:13:33 +0200 Subject: [PATCH] Formulaire d'installation --- core/core.php | 33 +++++++------- .../install/view/postinstall/postinstall.php | 44 +++++++++---------- 2 files changed, 38 insertions(+), 39 deletions(-) diff --git a/core/core.php b/core/core.php index 7cfc89fb..6d322536 100644 --- a/core/core.php +++ b/core/core.php @@ -1806,7 +1806,6 @@ class core extends common public function router() { - // $layout = new layout($this); // Installation @@ -1910,21 +1909,23 @@ class core extends common */ $accessInfo['userName'] = ''; $accessInfo['pageId'] = ''; - foreach ($this->getData(['user']) as $userId => $userIds) { - if (!is_null($this->getData(['user', $userId, 'accessUrl']))) { - $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 - ) { - $access = false; - $accessInfo['userName'] = $this->getData(['user', $userId, 'lastname']) . ' ' . $this->getData(['user', $userId, 'firstname']); - $accessInfo['pageId'] = end($t); + if ($this->getData(['user'])) { + foreach ($this->getData(['user']) as $userId => $userIds) { + if (!is_null($this->getData(['user', $userId, 'accessUrl']))) { + $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 + ) { + $access = false; + $accessInfo['userName'] = $this->getData(['user', $userId, 'lastname']) . ' ' . $this->getData(['user', $userId, 'firstname']); + $accessInfo['pageId'] = end($t); + } } } // Accès concurrent stocke la page visitée diff --git a/core/module/install/view/postinstall/postinstall.php b/core/module/install/view/postinstall/postinstall.php index 281f4131..b86e1199 100644 --- a/core/module/install/view/postinstall/postinstall.php +++ b/core/module/install/view/postinstall/postinstall.php @@ -11,12 +11,32 @@
-
+
+ 'off', + 'label' => 'Prénom' + ]); ?> +
+
+ 'off', + 'label' => 'Nom' + ]); ?> +
+
+
+
'off', 'label' => 'Identifiant' ]); ?>
+
+ 'off', + 'label' => 'Adresse électronique' + ]); ?> +
@@ -32,28 +52,6 @@ ]); ?>
-
-
- 'off', - 'label' => 'Adresse électronique' - ]); ?> -
-
-
-
- 'off', - 'label' => 'Prénom' - ]); ?> -
-
- 'off', - 'label' => 'Nom' - ]); ?> -
-