forked from ZwiiCMS-Team/ZwiiCMS
[10.0.050] Nom des modules en français
This commit is contained in:
parent
3b1bf1c777
commit
213c922664
@ -33,7 +33,7 @@ class common {
|
|||||||
const TEMP_DIR = 'site/tmp/';
|
const TEMP_DIR = 'site/tmp/';
|
||||||
|
|
||||||
// Numéro de version
|
// Numéro de version
|
||||||
const ZWII_VERSION = '10.0.049';
|
const ZWII_VERSION = '10.0.050';
|
||||||
const ZWII_UPDATE_CHANNEL = "v10";
|
const ZWII_UPDATE_CHANNEL = "v10";
|
||||||
|
|
||||||
public static $actions = [];
|
public static $actions = [];
|
||||||
|
@ -28,7 +28,14 @@ class page extends common {
|
|||||||
'' => 'Aucune'
|
'' => 'Aucune'
|
||||||
];
|
];
|
||||||
public static $moduleIds = [];
|
public static $moduleIds = [];
|
||||||
|
// Nom des modules
|
||||||
|
public static $moduleNames = [
|
||||||
|
'news' => 'Nouvelles',
|
||||||
|
'blog' => 'Blog',
|
||||||
|
'form' => 'Formulaire',
|
||||||
|
'gallery' => 'Galerie',
|
||||||
|
'redirection' => 'Redirection'
|
||||||
|
];
|
||||||
public static $typeMenu = [
|
public static $typeMenu = [
|
||||||
'text' => 'Texte',
|
'text' => 'Texte',
|
||||||
'icon' => 'Icône',
|
'icon' => 'Icône',
|
||||||
@ -316,10 +323,15 @@ class page extends common {
|
|||||||
$iterator = new DirectoryIterator('module/');
|
$iterator = new DirectoryIterator('module/');
|
||||||
foreach($iterator as $fileInfos) {
|
foreach($iterator as $fileInfos) {
|
||||||
if(is_file($fileInfos->getPathname() . '/' . $fileInfos->getFilename() . '.php')) {
|
if(is_file($fileInfos->getPathname() . '/' . $fileInfos->getFilename() . '.php')) {
|
||||||
$moduleIds[$fileInfos->getBasename()] = ucfirst($fileInfos->getBasename());
|
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;
|
self::$moduleIds = $moduleIds;
|
||||||
|
asort(self::$moduleIds);
|
||||||
// Pages sans parent
|
// Pages sans parent
|
||||||
foreach($this->getHierarchy() as $parentPageId => $childrenPageIds) {
|
foreach($this->getHierarchy() as $parentPageId => $childrenPageIds) {
|
||||||
if($parentPageId !== $this->getUrl(2)) {
|
if($parentPageId !== $this->getUrl(2)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user