diff --git a/CHANGES.md b/CHANGES.md
index 0de36e36..b880219f 100755
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,14 @@
# Changelog
+## Version 13.1.02
+
+### Correction
+- Corrige un bug d'installation d'une fonte.
+- Corrige un bug de redirection vers la liste des fontes après édition ou ajout.
+
+### Amélioration
+- Ajoute le filtrage et le tri des fontes de puis la liste du thème.
+
## Version 13.1.01
### Améliorations
diff --git a/LISEZMOI.md b/LISEZMOI.md
index fe13bf59..49f5e88b 100644
--- a/LISEZMOI.md
+++ b/LISEZMOI.md
@@ -1,4 +1,4 @@
-# ZwiiCMS 13.1.01
+# ZwiiCMS 13.1.02
Zwii est un CMS sans base de données (flat-file) qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation.
diff --git a/README.md b/README.md
index 3f61a2cd..5ceddf97 100755
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# ZwiiCMS 13.1.01
+# ZwiiCMS 13.1.02
Zwii is a database-less (flat-file) CMS that allows you to easily create and manage a web site without any programming knowledge.
diff --git a/core/class/router.class.php b/core/class/router.class.php
index 7a26dafe..98e348d1 100644
--- a/core/class/router.class.php
+++ b/core/class/router.class.php
@@ -105,53 +105,14 @@ class core extends common
// Suppression des polices identiques
$fonts = array_unique($fonts);
- /**
- * Charge les fontes websafe
- */
- $fontFile = '';
- foreach ($fonts as $fontId) {
- if (isset($fontsAvailable['websafe'][$fontId])) {
- $fonts[$fontId] = $fontsAvailable['websafe'][$fontId]['font-family'];
- }
- }
/**
- * Chargement des polices en ligne dans un fichier font.html inclus dans main.php
- */
- $fontFile = '';
- $gf = false;
- foreach ($fonts as $fontId) {
- if (isset($fontsAvailable['imported'][$fontId])) {
- $fontFile .= '';
- // Tableau pour la construction de la feuille de style
- $fonts[$fontId] = $fontsAvailable['imported'][$fontId]['font-family'];
- $gf = strpos($fontsAvailable['imported'][$fontId]['resource'], 'fonts.googleapis.com') === false ? $gf || false : $gf || true;
- }
- }
- // Ajoute le préconnect des fontes Googles.
- $fontFile = $gf ? '' . $fontFile
- : $fontFile;
- // Enregistre la personnalisation
- if (!is_dir(self::DATA_DIR . 'font')) {
- mkdir(self::DATA_DIR . 'font');
- }
- file_put_contents(self::DATA_DIR . 'font/font.html', $fontFile);
-
- /**
- * Fontes installées localement
+ * Charge les fontes
*/
foreach ($fonts as $fontId) {
- // Validité du tableau :
- if (isset($fontsAvailable['files'][$fontId])) {
- if (file_exists(self::DATA_DIR . 'font/' . $fontId)) {
- // Chargement de la police
- $css .= '@font-face {font-family:"' . $fontsAvailable['files'][$fontId]['font-family'] . '";';
- $css .= 'src: url("' . helper::baseUrl(false) . self::DATA_DIR . 'font/' . $fontsAvailable['files'][$fontId]['resource'] . '");}';
- // Tableau pour la construction de la feuille de style
- $fonts[$fontId] = $fontsAvailable['files'][$fontId]['font-family'];
- } else {
- // Le fichier de font n'est pas disponible, fonte par défaut
- $fonts[$fontId] = 'verdana';
+ foreach (['websafe', 'imported', 'files'] as $typeFont) {
+ if (isset($fontsAvailable[$typeFont][$fontId])) {
+ $fonts[$fontId] = $fontsAvailable[$typeFont][$fontId]['font-family'];
}
}
}
@@ -311,12 +272,6 @@ class core extends common
$css .= '#footerText > p {text-align:' . $this->getData(['theme', 'footer', 'textAlign']) . '}';
$css .= '#footerCopyright{text-align:' . $this->getData(['theme', 'footer', 'copyrightAlign']) . '}';
- // Enregistre les fontes
- if (!is_dir(self::DATA_DIR . 'font')) {
- mkdir(self::DATA_DIR . 'font');
- }
- file_put_contents(self::DATA_DIR . 'font/font.html', $fontFile);
-
// Enregistre la personnalisation
file_put_contents(self::DATA_DIR . 'theme.css', $css);
@@ -352,44 +307,12 @@ class core extends common
$fonts = array_unique($fonts);
/**
- * Charge les fontes websafe
- */
- $fontFile = '';
- foreach ($fonts as $fontId) {
- if (isset($fontsAvailable['websafe'][$fontId])) {
- $fonts[$fontId] = $fontsAvailable['websafe'][$fontId]['font-family'];
- }
- }
-
- /**
- * Chargement des polices en ligne dans un fichier font.html inclus dans main.php
- */
- $fontFile = '';
- foreach ($fonts as $fontId) {
- if (isset($fontsAvailable['imported'][$fontId])) {
- $fontFile .= '';
- // Tableau pour la construction de la feuille de style
- $fonts[$fontId] = $fontsAvailable['imported'][$fontId]['font-family'];
- }
- }
- // Enregistre la personnalisation
- file_put_contents(self::DATA_DIR . 'font/font.html', $fontFile);
-
- /**
- * Fontes installées localement
+ * Charge les fontes
*/
foreach ($fonts as $fontId) {
- // Validité du tableau :
- if (isset($fontsAvailable['files'][$fontId])) {
- if (file_exists(self::DATA_DIR . 'font/' . $fontId)) {
- // Chargement de la police
- $css .= '@font-face {font-family:"' . $fontsAvailable['files'][$fontId]['font-family'] . '";';
- $css .= 'src: url("' . helper::baseUrl(false) . self::DATA_DIR . 'font/' . $fontsAvailable['files'][$fontId]['resource'] . '");}';
- // Tableau pour la construction de la feuille de style
- $fonts[$fontId] = $fontsAvailable['files'][$fontId]['font-family'];
- } else {
- // Le fichier de font n'est pas disponible, fonte par défaut
- $fonts[$fontId] = 'verdana';
+ foreach (['websafe', 'imported', 'files'] as $typeFont) {
+ if (isset($fontsAvailable[$typeFont][$fontId])) {
+ $fonts[$fontId] = $fontsAvailable[$typeFont][$fontId]['font-family'];
}
}
}
@@ -872,7 +795,7 @@ class core extends common
if ($accessInfo['userName']) {
$this->addOutput([
'title' => 'Accès verrouillé',
- 'content' => template::speech('
'. sprintf(helper::translate('La page %s est ouverte par l\'utilisateur %s
%s
'), $accessInfo['pageId'], $accessInfo['userName'], helper::translate('Retour')))
+ 'content' => template::speech('' . sprintf(helper::translate('La page %s est ouverte par l\'utilisateur %s
%s
'), $accessInfo['pageId'], $accessInfo['userName'], helper::translate('Retour')))
]);
} else {
@@ -884,7 +807,7 @@ class core extends common
} else {
$this->addOutput([
'title' => 'Accès interdit',
- 'content' => template::speech('' . helper::translate('Vous n\'êtes pas autorisé à consulter cette page (erreur 403)') . '
'. helper::translate('Retour') . '
')
+ 'content' => template::speech('' . helper::translate('Vous n\'êtes pas autorisé à consulter cette page (erreur 403)') . '
' . helper::translate('Retour') . '
')
]);
}
}
@@ -898,7 +821,7 @@ class core extends common
} else {
$this->addOutput([
'title' => 'Page indisponible',
- 'content' => template::speech('' . helper::translate('La page demandée n\'existe pas ou est introuvable (erreur 404)') . '
'. helper::translate('Retour') . '
')
+ 'content' => template::speech('' . helper::translate('La page demandée n\'existe pas ou est introuvable (erreur 404)') . '
' . helper::translate('Retour') . '
')
]);
}
}
diff --git a/core/core.php b/core/core.php
index 90fdafbe..ebc8e0cf 100644
--- a/core/core.php
+++ b/core/core.php
@@ -51,7 +51,7 @@ class common
const ACCESS_TIMER = 1800;
// Numéro de version
- const ZWII_VERSION = '13.1.01';
+ const ZWII_VERSION = '13.1.02';
// URL autoupdate
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/cms-update/raw/branch/master/';
diff --git a/core/layout/blank.php b/core/layout/blank.php
index 4d021b90..855d7adb 100644
--- a/core/layout/blank.php
+++ b/core/layout/blank.php
@@ -16,6 +16,9 @@
+
+
+
showContent(); ?>
diff --git a/core/layout/light.php b/core/layout/light.php
index 45fcb883..9d177022 100644
--- a/core/layout/light.php
+++ b/core/layout/light.php
@@ -16,6 +16,9 @@
+
+
+
showNotification(); ?>
diff --git a/core/layout/main.php b/core/layout/main.php
index 76a46803..88dc984d 100644
--- a/core/layout/main.php
+++ b/core/layout/main.php
@@ -1,5 +1,6 @@
+
@@ -13,15 +14,23 @@
showFavicon(); ?>
showVendor(); ?>
showFonts(); ?>
-
-
-
+
+
+
+
+
+
- getData(['page', $this->getUrl(0), 'moduleId']) === 'blog'
+ getData(['page', $this->getUrl(0), 'moduleId']) === 'blog'
or $this->getData(['page', $this->getUrl(0), 'moduleId']) === 'news')
and $this->getData(['module', $this->getUrl(0), 'config', 'feeds']) === TRUE
- ) : ?>
-
+ ): ?>
+
showStyle(); ?>
showInlineStyle(); ?>
@@ -30,15 +39,16 @@
include(self::DATA_DIR . 'head.inc.html');
} ?>
+
- getUser('group') > self::GROUP_MEMBER) : ?>
+ getUser('group') > self::GROUP_MEMBER): ?>
showBar(); ?>
showNotification(); ?>
- getData(['theme', 'menu', 'position']) === 'body-first' || $this->getData(['theme', 'menu', 'position']) === 'top') : ?>
+ getData(['theme', 'menu', 'position']) === 'body-first' || $this->getData(['theme', 'menu', 'position']) === 'top'): ?>
- getData(['theme', 'menu', 'burgerContent']) === 'title' ? '
' . $this->getData(['locale', 'title']) . '
' : ''; ?>
- getData(['theme', 'menu', 'burgerContent']) === 'logo' ? '
' : ''; ?>
- '2em']); ?>
+ getData(['theme', 'menu', 'burgerContent']) === 'title' ? '' . $this->getData(['locale', 'title']) . '
' : ''; ?>
+ getData(['theme', 'menu', 'burgerContent']) === 'logo' ? '' : ''; ?>
+ '2em']); ?>
+
getData(['theme', 'menu', 'position']) === 'top' ? 'class="container-large"' : 'class="container"';
- $menuClass = $this->getData(['theme', 'menu', 'wide']) === 'none' ? 'class="container-large"' : 'class="container"';
+ $menuClass = $this->getData(['theme', 'menu', 'position']) === 'top' ? 'class="container-large"' : 'class="container"';
+ $menuClass = $this->getData(['theme', 'menu', 'wide']) === 'none' ? 'class="container-large"' : 'class="container"';
?>
getData(['theme', 'menu', 'wide']) === 'none' ? 'class="container-large"' : 'class="container"';
+ $menuClass = $this->getData(['theme', 'menu', 'wide']) === 'none' ? 'class="container-large"' : 'class="container"';
?>
+ showMenu(); ?>
+
- getData(['theme', 'menu', 'position']) === 'site-first') : ?>
+ getData(['theme', 'menu', 'position']) === 'site-first'): ?>
+
getData(['theme', 'header', 'position']) === 'hide'
and $this->getUrl(0) === 'theme'
)
- ) : ?>
+ ): ?>
- getData(['theme', 'header', 'linkHomePage']) && $this->getData(['theme', 'header', 'feature']) === 'wallpaper') ? '' : ''; ?>
+ getData(['theme', 'header', 'linkHomePage']) && $this->getData(['theme', 'header', 'feature']) === 'wallpaper') ? '' : ''; ?>
getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : '';
+ $headerClass = $this->getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : '';
$headerClass .= $this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay ' : '';
?>
- getData(['theme', 'header', 'linkHomePage']) && $this->getData(['theme', 'header', 'feature']) === 'wallpaper') ? '' : ''; ?>
+ getData(['theme', 'header', 'linkHomePage']) && $this->getData(['theme', 'header', 'feature']) === 'wallpaper') ? '' : ''; ?>
getData(['theme', 'menu', 'position']) === 'site-second' ||
@@ -161,14 +181,17 @@
or ($this->getData(['theme', 'menu', 'position']) === 'hide'
and $this->getUrl(0) === 'theme'
)
- ) : ?>
+ ): ?>
-