forked from ZwiiCMS-Team/ZwiiCMS
11502 bug fontes
This commit is contained in:
parent
8023cb0826
commit
cec51c03aa
@ -1,5 +1,9 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## Version 11.5.02
|
||||||
|
### Correction :
|
||||||
|
- Bug de la génération des feuilles de style des fontes.
|
||||||
|
|
||||||
## Version 11.5.01
|
## Version 11.5.01
|
||||||
### Modifications :
|
### Modifications :
|
||||||
- Restauration du bouton d'installation d'une archive de module depuis le store.
|
- Restauration du bouton d'installation d'une archive de module depuis le store.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# ZwiiCMS 11.5.01
|
# ZwiiCMS 11.5.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.
|
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.
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ class common {
|
|||||||
|
|
||||||
// Numéro de version
|
// Numéro de version
|
||||||
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/';
|
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/';
|
||||||
const ZWII_VERSION = '11.5.01';
|
const ZWII_VERSION = '11.5.02';
|
||||||
const ZWII_UPDATE_CHANNEL = "v11";
|
const ZWII_UPDATE_CHANNEL = "v11";
|
||||||
|
|
||||||
public static $actions = [];
|
public static $actions = [];
|
||||||
|
@ -1190,8 +1190,8 @@ class theme extends common {
|
|||||||
*/
|
*/
|
||||||
$gf = false;
|
$gf = false;
|
||||||
$fileContent = '<!-- Fontes personnalisées -->';
|
$fileContent = '<!-- Fontes personnalisées -->';
|
||||||
if ( is_array($this->getData(['fonts', 'imported'])) &&
|
//if ( is_array($this->getData(['fonts', 'imported'])) &&
|
||||||
!empty($this->getData(['fonts', 'imported'])) ) {
|
// !empty($this->getData(['fonts', 'imported'])) ) {
|
||||||
foreach ($this->getData(['fonts', 'imported']) as $fontId => $fontValue) {
|
foreach ($this->getData(['fonts', 'imported']) as $fontId => $fontValue) {
|
||||||
if (
|
if (
|
||||||
( $scope === 'user' && in_array($fontId, $fontsInstalled) )
|
( $scope === 'user' && in_array($fontId, $fontsInstalled) )
|
||||||
@ -1199,13 +1199,13 @@ class theme extends common {
|
|||||||
) {
|
) {
|
||||||
//Pré chargement à revoir
|
//Pré chargement à revoir
|
||||||
//$fileContent .= '<link rel="preload" href="' . $fontValue['resource'] . '" crossorigin="anonymous" as="style">';
|
//$fileContent .= '<link rel="preload" href="' . $fontValue['resource'] . '" crossorigin="anonymous" as="style">';
|
||||||
$fileContent .= '<link href="' . $fontValue['resource'] .'" rel="stylesheet">';
|
$fileContent = '<link href="' . $fontValue['resource'] .'" rel="stylesheet">';
|
||||||
// Pré connect pour api.google
|
// Pré connect pour api.google
|
||||||
$gf = strpos($fontValue['resource'], 'fonts.googleapis.com') === false ? $gf || false : $gf || true;
|
$gf = strpos($fontValue['resource'], 'fonts.googleapis.com') === false ? $gf || false : $gf || true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
//}
|
||||||
|
|
||||||
// Ajoute le préconnect des fontes Googles.
|
// Ajoute le préconnect des fontes Googles.
|
||||||
$fileContent = $gf ? '<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>' . $fileContent
|
$fileContent = $gf ? '<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>' . $fileContent
|
||||||
: $fileContent;
|
: $fileContent;
|
||||||
@ -1217,8 +1217,8 @@ class theme extends common {
|
|||||||
*/
|
*/
|
||||||
$fileContentCss = '';
|
$fileContentCss = '';
|
||||||
$fileContent = '<!-- Fontes personnalisées -->';
|
$fileContent = '<!-- Fontes personnalisées -->';
|
||||||
if ( is_array($this->getData(['fonts', 'files'])) &&
|
//if ( is_array($this->getData(['fonts', 'files'])) &&
|
||||||
!empty($this->getData(['fonts', 'files'])) ) {
|
// !empty($this->getData(['fonts', 'files'])) ) {
|
||||||
foreach ($this->getData(['fonts', 'files']) as $fontId => $fontValue) {
|
foreach ($this->getData(['fonts', 'files']) as $fontId => $fontValue) {
|
||||||
if (
|
if (
|
||||||
( $scope === 'user' && in_array($fontId, $fontsInstalled) )
|
( $scope === 'user' && in_array($fontId, $fontsInstalled) )
|
||||||
@ -1237,7 +1237,7 @@ class theme extends common {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
//}
|
||||||
|
|
||||||
// Enregistre la personnalisation
|
// Enregistre la personnalisation
|
||||||
file_put_contents(self::DATA_DIR.'fonts/fonts.html', $fileContent);
|
file_put_contents(self::DATA_DIR.'fonts/fonts.html', $fileContent);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user