From 5433a34f731322751ad41947e0f23c100e4b3fc9 Mon Sep 17 00:00:00 2001 From: Deltacms Date: Mon, 10 Jul 2023 08:01:10 +0200 Subject: [PATCH] =?UTF-8?q?=20Manage=20am=C3=A9lioration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/module/theme/lang/en/lex_theme.php | 2 +- core/module/theme/lang/es/lex_theme.php | 2 +- core/module/theme/lang/fr/lex_theme.php | 2 +- core/module/theme/theme.php | 9 ++++++--- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/core/module/theme/lang/en/lex_theme.php b/core/module/theme/lang/en/lex_theme.php index d60aafc..6d20bc8 100644 --- a/core/module/theme/lang/en/lex_theme.php +++ b/core/module/theme/lang/en/lex_theme.php @@ -333,7 +333,7 @@ $text['core_theme']['reset'][1] = 'Incorrect token'; $text['core_theme']['site'][0] = 'Changes saved'; $text['core_theme']['site'][1] = 'Site customisation'; $text['core_theme']['manage'][0] = 'Theme management'; -$text['core_theme']['import'][0] = 'The theme has been imported'; +$text['core_theme']['import'][0] = 'The theme has been imported. Reload the uncached page using Ctrl+F5 or equivalent.'; $text['core_theme']['import'][1] = 'Error while extracting, check permissions'; $text['core_theme']['import'][2] = 'This is not a theme archive!'; $text['core_theme']['import'][3] = 'Unable to open the archive'; diff --git a/core/module/theme/lang/es/lex_theme.php b/core/module/theme/lang/es/lex_theme.php index 22e7f77..b672584 100644 --- a/core/module/theme/lang/es/lex_theme.php +++ b/core/module/theme/lang/es/lex_theme.php @@ -333,7 +333,7 @@ $text['core_theme']['reset'][1] = 'Token incorrecto'; $text['core_theme']['site'][0] = 'Cambios guardados'; $text['core_theme']['site'][1] = 'Personalización del sitio'; $text['core_theme']['manage'][0] = 'Administración de temas'; -$text['core_theme']['import'][0] = 'El tema ha sido importado'; +$text['core_theme']['import'][0] = 'El tema ha sido importado. Recarga la página sin caché utilizando Ctrl+F5 o equivalente.'; $text['core_theme']['import'][1] = 'Error al extraer, verificar permisos.'; $text['core_theme']['import'][2] = '¡Este no es un archivo de temas!'; $text['core_theme']['import'][3] = 'No se puede abrir el archivo'; diff --git a/core/module/theme/lang/fr/lex_theme.php b/core/module/theme/lang/fr/lex_theme.php index 0ab5791..0ad2ead 100644 --- a/core/module/theme/lang/fr/lex_theme.php +++ b/core/module/theme/lang/fr/lex_theme.php @@ -333,7 +333,7 @@ $text['core_theme']['reset'][1] = 'Jeton incorrect'; $text['core_theme']['site'][0] = 'Modifications enregistrées'; $text['core_theme']['site'][1] = 'Personnalisation du site'; $text['core_theme']['manage'][0] = 'Gestion des thèmes'; -$text['core_theme']['import'][0] = 'Le thème a été importé'; +$text['core_theme']['import'][0] = 'Le thème a été importé. Rechargez la page sans cache par Ctrl+F5 ou équivalent.'; $text['core_theme']['import'][1] = 'Erreur lors de l\'extraction, vérifiez les permissions.'; $text['core_theme']['import'][2] = 'Ce n\'est pas l\'archive d\'un thème !'; $text['core_theme']['import'][3] = 'Impossible d\'ouvrir l\'archive'; diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index e79b69d..4d22a53 100644 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -760,10 +760,13 @@ class theme extends common { $zipFilename = $this->getInput('themeManageImport', helper::FILTER_STRING_SHORT, true); $data = $this->import(self::FILE_DIR.'source/' . $zipFilename); if ($data['success']) { - // Régénérer theme.css et admin.css - //if (file_exists(self::DATA_DIR . 'theme.css')) unlink(self::DATA_DIR . 'theme.css'); - //$this->setData(['admin', 'maj', true]); + // Refresh: 0 bien contenu dans la réponse envoyée au navigateur mais sans l'effet attendu header("Refresh: 0"); + $this->addOutput([ + 'notification' => $data['notification'], + 'redirect' => helper::baseUrl() . 'theme', + 'state' => $data['success'] + ]); } else { // Valeurs en sortie $this->addOutput([