forked from ZwiiCMS-Team/ZwiiCMS
11505 bug catégorie de fonte vide + warning sur variable non initialisée
This commit is contained in:
parent
98bddca72a
commit
af49819e37
@ -430,6 +430,7 @@ class theme extends common {
|
||||
/**
|
||||
* Stocker les images incluses dans la bannière perso dans un tableau
|
||||
*/
|
||||
$files = [];
|
||||
preg_match_all('/<img[^>]+>/i',$featureContent, $results);
|
||||
foreach($results[0] as $value) {
|
||||
// Lire le contenu XML
|
||||
@ -1188,8 +1189,7 @@ class theme extends common {
|
||||
*/
|
||||
$gf = false;
|
||||
$fileContent = '<!-- Fontes personnalisées -->';
|
||||
//if ( is_array($this->getData(['fonts', 'imported'])) &&
|
||||
// !empty($this->getData(['fonts', 'imported'])) ) {
|
||||
if ( !empty($this->getData(['fonts', 'imported'])) ) {
|
||||
foreach ($this->getData(['fonts', 'imported']) as $fontId => $fontValue) {
|
||||
if (
|
||||
( $scope === 'user' && in_array($fontId, $fontsInstalled) )
|
||||
@ -1202,7 +1202,7 @@ class theme extends common {
|
||||
$gf = strpos($fontValue['resource'], 'fonts.googleapis.com') === false ? $gf || false : $gf || true;
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
// 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
|
||||
@ -1214,8 +1214,7 @@ class theme extends common {
|
||||
* Fontes installées localement
|
||||
*/
|
||||
$fileContentCss = '';
|
||||
//if ( is_array($this->getData(['fonts', 'files'])) &&
|
||||
// !empty($this->getData(['fonts', 'files'])) ) {
|
||||
if ( !empty($this->getData(['fonts', 'files'])) ) {
|
||||
foreach ($this->getData(['fonts', 'files']) as $fontId => $fontValue) {
|
||||
if (
|
||||
( $scope === 'user' && in_array($fontId, $fontsInstalled) )
|
||||
@ -1234,7 +1233,7 @@ class theme extends common {
|
||||
}
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
// Enregistre la personnalisation
|
||||
file_put_contents(self::DATA_DIR.'fonts/fonts.html', $fileContent);
|
||||
|
Loading…
Reference in New Issue
Block a user