From 213c922664f090e1f2b728a5e441ad07a49297da Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Sat, 4 Apr 2020 19:15:32 +0200 Subject: [PATCH] =?UTF-8?q?[10.0.050]=20Nom=20des=20modules=20en=20fran?= =?UTF-8?q?=C3=A7ais?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core.php | 2 +- core/module/page/page.php | 22 +++++++++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/core/core.php b/core/core.php index 895b9a45..0db8d5ba 100644 --- a/core/core.php +++ b/core/core.php @@ -33,7 +33,7 @@ class common { const TEMP_DIR = 'site/tmp/'; // Numéro de version - const ZWII_VERSION = '10.0.049'; + const ZWII_VERSION = '10.0.050'; const ZWII_UPDATE_CHANNEL = "v10"; public static $actions = []; diff --git a/core/module/page/page.php b/core/module/page/page.php index ffcc111d..c1d8acb8 100755 --- a/core/module/page/page.php +++ b/core/module/page/page.php @@ -28,7 +28,14 @@ class page extends common { '' => 'Aucune' ]; public static $moduleIds = []; - + // Nom des modules + public static $moduleNames = [ + 'news' => 'Nouvelles', + 'blog' => 'Blog', + 'form' => 'Formulaire', + 'gallery' => 'Galerie', + 'redirection' => 'Redirection' + ]; public static $typeMenu = [ 'text' => 'Texte', 'icon' => 'Icône', @@ -316,10 +323,15 @@ class page extends common { $iterator = new DirectoryIterator('module/'); foreach($iterator as $fileInfos) { if(is_file($fileInfos->getPathname() . '/' . $fileInfos->getFilename() . '.php')) { - $moduleIds[$fileInfos->getBasename()] = ucfirst($fileInfos->getBasename()); - } - } - self::$moduleIds = $moduleIds; + if (array_key_exists($fileInfos->getBasename(),self::$moduleNames)) { + $moduleIds[$fileInfos->getBasename()] = self::$moduleNames[$fileInfos->getBasename()]; + } else { + $moduleIds[$fileInfos->getBasename()] = ucfirst($fileInfos->getBasename()); + } + } + } + self::$moduleIds = $moduleIds; + asort(self::$moduleIds); // Pages sans parent foreach($this->getHierarchy() as $parentPageId => $childrenPageIds) { if($parentPageId !== $this->getUrl(2)) {