update ajout des fontes locales

This commit is contained in:
fredtempez 2022-03-21 11:18:01 +01:00
parent 40c6b8d787
commit c6144c3aa8

View File

@ -936,6 +936,20 @@ if ($this->getData(['core', 'dataVersion']) < 11400) {
];
$this->setData(['fonts', 'imported', $fonts]);
// Conversion des fontes locales
$files = $this->getData(['fonts', 'files']);
if (is_array($files)) {
$this->deleteData(['fonts', 'files']);
foreach ($files as $fontId => $fontName) {
$this->setData(['fonts', 'files', $fontId, [
'name' => ucfirst($fontId),
'font-family'=> $fontId . ', sans-serif',
'resource' => $fontName
]]);
}
}
// Rafraichir les thèmes
if (file_exists(self::DATA_DIR . 'admin.css')) {
unlink (self::DATA_DIR . 'admin.css');