From 566f678eca979e0abf3ef14235d7a77beca504a5 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 4 Jun 2021 13:00:35 +0200 Subject: [PATCH 1/9] Config avec l'aide --- core/module/config/config.php | 83 +++++++++--- core/module/config/view/advanced/advanced.php | 118 ++++++++++-------- core/module/config/view/backup/backup.php | 2 +- core/module/config/view/index/index.php | 18 ++- .../manage.css => restore/restore.css} | 0 .../manage.php => restore/restore.php} | 25 ++-- 6 files changed, 166 insertions(+), 80 deletions(-) rename core/module/config/view/{manage/manage.css => restore/restore.css} (100%) mode change 100755 => 100644 rename core/module/config/view/{manage/manage.php => restore/restore.php} (68%) diff --git a/core/module/config/config.php b/core/module/config/config.php index b17dde0e..a0299776 100644 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -18,17 +18,19 @@ class config extends common { public static $actions = [ 'backup' => self::GROUP_ADMIN, + 'copyBackups'=> self::GROUP_ADMIN, 'configMetaImage' => self::GROUP_ADMIN, 'generateFiles' => self::GROUP_ADMIN, 'index' => self::GROUP_ADMIN, 'advanced' => self::GROUP_ADMIN, - 'manage' => self::GROUP_ADMIN, + 'restore' => self::GROUP_ADMIN, 'updateBaseUrl' => self::GROUP_ADMIN, 'script' => self::GROUP_ADMIN, 'logReset' => self::GROUP_ADMIN, 'logDownload'=> self::GROUP_ADMIN, 'blacklistReset' => self::GROUP_ADMIN, - 'blacklistDownload' => self::GROUP_ADMIN + 'blacklistDownload' => self::GROUP_ADMIN, + ]; public static $timezones = [ @@ -191,7 +193,7 @@ class config extends common { $this->addOutput([ 'notification' => $successSitemap ? 'Le sitemap a été mis à jour' : 'Echec d\'écriture, le site map n\'a pas été mis à jour', 'redirect' => helper::baseUrl() . 'config/advanced', - 'state' => $successSitemap + 'state' => $successSitemap ]); } @@ -265,11 +267,11 @@ class config extends common { /** * Procédure d'importation */ - public function manage() { + public function restore() { // Soumission du formulaire if($this->isPost()) { - //if ($this->getInput('configManageImportFile')) - $fileZip = $this->getInput('configManageImportFile'); + //if ($this->getInput('configRestoreImportFile')) + $fileZip = $this->getInput('configRestoreImportFile'); $file_parts = pathinfo($fileZip); $folder = date('Y-m-d-h-i-s', time()); $zip = new ZipArchive(); @@ -277,7 +279,7 @@ class config extends common { // Valeurs en sortie erreur $this->addOutput([ 'notification' => 'Le fichier n\'est pas une archive valide', - 'redirect' => helper::baseUrl() . 'config/manage', + 'redirect' => helper::baseUrl() . 'config/restore', 'state' => false ]); } @@ -286,7 +288,7 @@ class config extends common { // Valeurs en sortie erreur $this->addOutput([ 'notification' => 'Impossible de lire l\'archive', - 'redirect' => helper::baseUrl() . 'config/manage', + 'redirect' => helper::baseUrl() . 'config/restore', 'state' => false ]); } @@ -311,21 +313,21 @@ class config extends common { // V10 valide $version = '10'; // Option active, les users sont stockées - if ($this->getInput('configManageImportUser', helper::FILTER_BOOLEAN) === true ) { + if ($this->getInput('configRestoreImportUser', helper::FILTER_BOOLEAN) === true ) { $users = $this->getData(['user']); } } else { // Version invalide // Valeurs en sortie erreur $this->addOutput([ 'notification' => 'Cette archive n\'est pas une sauvegarde valide', - 'redirect' => helper::baseUrl() . 'config/manage', + 'redirect' => helper::baseUrl() . 'config/restore', 'state' => false ]); } // Préserver les comptes des utilisateurs d'une version 9 si option cochée // Positionnement d'une variable de session lue au constructeurs if ($version === '9') { - $_SESSION['KEEP_USERS'] = $this->getInput('configManageImportUser', helper::FILTER_BOOLEAN); + $_SESSION['KEEP_USERS'] = $this->getInput('configRestoreImportUser', helper::FILTER_BOOLEAN); } // Extraire le zip ou 'site/' $success = $zip->extractTo( 'site/' ); @@ -335,13 +337,13 @@ class config extends common { // Restaurer les users originaux d'une v10 si option cochée if (!empty($users) && $version === '10' && - $this->getInput('configManageImportUser', helper::FILTER_BOOLEAN) === true) { + $this->getInput('configRestoreImportUser', helper::FILTER_BOOLEAN) === true) { $this->setData(['user',$users]); } // Message de notification $notification = $success === true ? 'Restauration réalisée avec succès' : 'Erreur inconnue'; - $redirect = $this->getInput('configManageImportUser', helper::FILTER_BOOLEAN) === true ? helper::baseUrl() . 'config/manage' : helper::baseUrl() . 'user/login/'; + $redirect = $this->getInput('configRestoreImportUser', helper::FILTER_BOOLEAN) === true ? helper::baseUrl() . 'config/restore' : helper::baseUrl() . 'user/login/'; // Valeurs en sortie erreur $this->addOutput([ 'notification' => $notification, @@ -353,7 +355,7 @@ class config extends common { // Valeurs en sortie $this->addOutput([ 'title' => 'Restaurer', - 'view' => 'manage' + 'view' => 'restore' ]); } @@ -399,6 +401,7 @@ class config extends common { 'title' => $this->getInput('configTitle', helper::FILTER_STRING_SHORT, true) ] ]); + $this->setData(['config', 'i18n', 'enabled', $this->getInput('configI18n',helper::FILTER_BOOLEAN) ]); // Générer robots.txt et sitemap $this->generateFiles(); // Valeurs en sortie @@ -428,6 +431,11 @@ class config extends common { $this->getInput('configAdvancedAutoUpdate', helper::FILTER_BOOLEAN) === true) { $this->setData(['core','lastAutoUpdate',0]); } + // Eviter déconnexion automatique après son activation + if ( $this->getData(['config','autoDisconnect']) === false + AND $this->getInput('configAdvancedAutoDisconnect',helper::FILTER_BOOLEAN) === true ) { + $this->setData(['user',$this->getuser('id'),'accessCsrf',$_SESSION['csrf']]); + } // Sauvegarder $this->setData([ 'config', @@ -455,6 +463,7 @@ class config extends common { 'proxyUrl' => $this->getInput('configAdvancedProxyUrl'), 'proxyPort' => $this->getInput('configAdvancedProxyPort',helper::FILTER_INT), 'captchaStrong' => $this->getInput('configAdvancedCaptchaStrong',helper::FILTER_BOOLEAN), + 'autoDisconnect' => $this->getInput('configAdvancedAutoDisconnect',helper::FILTER_BOOLEAN), 'smtp' => [ 'enable' => $this->getInput('configAdvancedSmtpEnable',helper::FILTER_BOOLEAN), 'host' => $this->getInput('configAdvancedSmtpHost',helper::FILTER_STRING_SHORT), @@ -612,7 +621,7 @@ class config extends common { // Valeurs en sortie $this->addOutput([ 'notification' => $success ? $c3. ' conversion' . ($c3 > 1 ? 's' : '') . ' effectuée' . ($c3 > 1 ? 's' : '') : 'Aucune conversion', - 'redirect' => helper::baseUrl() . 'config/manage', + 'redirect' => helper::baseUrl() . 'config/restore', 'state' => $success ? true : false ]); } @@ -729,6 +738,23 @@ class config extends common { } } + /** + * Récupération des backups auto dans le gestionnaire de fichiers + */ + public function copyBackups() { + // Créer le répertoire manquant + if (!is_dir(self::FILE_DIR.'source/backup')) { + mkdir(self::FILE_DIR.'source/backup'); + } + $this->custom_copy(self::BACKUP_DIR, self::FILE_DIR . 'source/backup' ); + // Valeurs en sortie + $this->addOutput([ + 'redirect' => helper::baseUrl() . 'config/advanced', + 'notification' => 'Copie terminée', + 'state' => true + ]); + } + /** * Fonction de parcours des données de module @@ -750,4 +776,31 @@ class config extends common { } return $newArray; } + + /* + * Copie récursive de dossiers + * + */ + private function custom_copy($src, $dst) { + // open the source directory + $dir = opendir($src); + // Make the destination directory if not exist + if (!is_dir($dst)) { + mkdir($dst); + } + // Loop through the files in source directory + while( $file = readdir($dir) ) { + if (( $file != '.' ) && ( $file != '..' )) { + if ( is_dir($src . '/' . $file) ){ + // Recursively calling custom copy function + // for sub directory + $this -> custom_copy($src . '/' . $file, $dst . '/' . $file); + } + else { + copy($src . '/' . $file, $dst . '/' . $file); + } + } + } + closedir($dir); + } } diff --git a/core/module/config/view/advanced/advanced.php b/core/module/config/view/advanced/advanced.php index fd6d03de..34beaf97 100644 --- a/core/module/config/view/advanced/advanced.php +++ b/core/module/config/view/advanced/advanced.php @@ -27,24 +27,34 @@

Maintenance

-
- $this->getData(['config', 'maintenance']) +
+
+ $this->getData(['config', 'maintenance']) + ]); ?> +
+
+
+
+ helper::baseUrl() . 'config/backup', + 'value' => 'Sauvegarder', + 'ico' => 'download-cloud' + ]); ?> +
+
+ helper::baseUrl() . 'config/restore', + 'value' => 'Restaurer', + 'ico' => 'upload-cloud' + ]); ?> +
+
+ helper::baseUrl() . 'config/copyBackups', + 'value' => 'Backups Auto ➜ FileManager' ]); ?>
-
- helper::baseUrl() . 'config/backup', - 'value' => 'Sauvegarder', - 'ico' => 'download' - ]); ?> -
-
- helper::baseUrl() . 'config/manage', - 'value' => 'Restaurer', - 'ico' => 'upload' - ]); ?>
@@ -53,7 +63,6 @@

Réglages

-
-
- $this->getData(['config', 'cookieConsent']) +
+ $this->getData(['config', 'cookieConsent']), + 'help' => 'Activation obligatoire selon les lois françaises sauf si vous utilisez votre propre système de consentement.' ]); ?>
-
- $this->getData(['config','captchaStrong']), - 'help' => 'Option recommandée pour sécuriser la connexion. S\'applique à tous les captchas du site. Le captcha simple se limite à une addition de nombres de 0 à 10. Le captcha renforcé utilise quatre opérations de nombres de 0 à 20.' - ]); ?> -
- -
- + helper::checkRewrite(), - 'help' => 'Vérifiez d\'abord que votre serveur l\'autorise : ce n\'est pas le cas chez Free.' + 'help' => 'Vérifiez d\'abord que votre serveur autorise l\'URL rewriting (ce qui n\'est pas le cas chez Free).' ]); ?>
+ +
+
+
+ $this->getData(['config', 'autoBackup']), + 'help' => 'Une archive contenant le dossier /site/data est copiée dans le dossier \'site/backup\'. La sauvegarde est conservée pendant 30 jours.

Les fichiers du site ne sont pas sauvegardés automatiquement. Activation recommandée.' + ]); ?> +

+
+ file_exists('site/data/.backup'), + 'help' => 'Un fichier .backup.json est généré à chaque édition ou effacement d\'une donnée. La désactivation entraîne la suppression de ces fichiers.' + ]); ?> +
-
- $this->getData(['config', 'autoBackup']), - 'help' => '

Une archive contenant le dossier /site/data est copiée dans le dossier \'site/backup\'. La sauvegarde est conservée pendant 30 jours.

Les fichiers du site ne sont pas sauvegardés automatiquement.

' - ]); ?> +
+ $this->getData(['config','captchaStrong']), + 'help' => 'Option recommandée pour sécuriser la connexion. S\'applique à tous les captchas du site. Le captcha simple se limite à une addition de nombres de 0 à 10. Le captcha complexe utilise quatre opérations de nombres de 0 à 20. Activation recommandée.' + ]); ?>
-
- file_exists('site/data/.backup'), - 'help' => '

Un fichier .backup.json est généré à chaque édition ou effacement d\'une donnée. La désactivation entraîne la suppression de ces fichiers.

' +
+ $this->getData(['config','autoDisconnect']), + 'help' => 'Déconnecte les sessions ouvertes précédemment sur d\'autres navigateurs ou terminaux. Activation recommandée.' ]); ?>
@@ -119,30 +137,30 @@
-

Mise à jour automatisée

- +

Mises à jour automatisée

+
- $this->getData(['config', 'autoUpdate']), - 'help' => 'Vérifie une fois par jour l\'existence d\'une mise à jour.', - 'disabled' => !$error + 'help' => 'La vérification est quotidienne. Option désactivée si la configuration du serveur ne le permet pas.', + 'disabled' => !$updateError ]); ?>
-
- + $this->getData(['config', 'autoUpdateHtaccess']), 'help' => 'Lors d\'une mise à jour automatique, conserve le fichier htaccess de la racine du site.', - 'disabled' => !$error + 'disabled' => !$updateError ]); ?>
-
+
'download-cloud', 'href' => helper::baseUrl() . 'install/update', 'value' => 'Mise à jour manuelle', 'class' => 'buttonRed', - 'disabled' => !$error + 'disabled' => !$updateError ]); ?>
@@ -320,7 +338,7 @@
-
+
$this->getData(['config', 'connect','captcha']) ]); ?> diff --git a/core/module/config/view/backup/backup.php b/core/module/config/view/backup/backup.php index a284ef9f..0ba3a31c 100644 --- a/core/module/config/view/backup/backup.php +++ b/core/module/config/view/backup/backup.php @@ -18,7 +18,7 @@
-

Paramètre

+

Paramètres de la sauvegarde

+
+
+
+

Langues étrangères

+
+
+ $this->getData(['config', 'i18n', 'enabled']), + 'help'=> 'Une nouvelle icône apparaîtra dans la barre d\'administration. Consultez l\'aide de la page concernée pour en apprendre plus.' + ]); ?> +
+
+
+
+
@@ -101,7 +116,7 @@ 'Aucune'] , helper::arrayCollumn($pages, 'title', 'SORT_ASC') ) , [ 'label' => 'Recherche dans le site', 'selected' => $this->getData(['locale', 'searchPageId']), - 'help' => 'Sélectionner la page "Recherche" ou une page contenant le module "Recherche". Une option du pied de page ajoute un lien discret vers cette page.' + 'help' => 'Sélectionnez une page contenant le module \'Recherche\'. Une option du pied de page ajoute un lien discret vers cette page.' ]); ?>
@@ -131,6 +146,7 @@ ]); ?>
+

Lorsque les langues étrangères sont activées, il convient d'adapter les pages spéciales.

diff --git a/core/module/config/view/manage/manage.css b/core/module/config/view/restore/restore.css old mode 100755 new mode 100644 similarity index 100% rename from core/module/config/view/manage/manage.css rename to core/module/config/view/restore/restore.css diff --git a/core/module/config/view/manage/manage.php b/core/module/config/view/restore/restore.php similarity index 68% rename from core/module/config/view/manage/manage.php rename to core/module/config/view/restore/restore.php index d0b02b15..e642722d 100644 --- a/core/module/config/view/manage/manage.php +++ b/core/module/config/view/restore/restore.php @@ -1,7 +1,7 @@ - +
- 'buttonGrey', 'href' => helper::baseUrl() . 'config/advanced', 'ico' => 'left', @@ -9,7 +9,7 @@ ]); ?>
- 'Restaurer' ]); ?>
@@ -17,18 +17,18 @@
-

Paramètres

+

Archive à restaurer

- 'Sélectionnez une archive au format ZIP', 'type' => 2, 'help' => 'L\'archive a été déposée dans le gestionnaire de fichiers. Les archives inférieures à la version 9 ne sont pas acceptées.' ]); ?>
- true ]); ?>
@@ -40,7 +40,7 @@
-

Conversion des URL

+

Conversion après la restauration

getData(['core', 'baseUrl'])); $buttonClass = helper::baseUrl(false,false) !== $baseUrlValue ? '' : 'disabled'; } - echo template::text('configManageBaseURLToConvert', [ + echo template::text('configRestoreBaseURLToConvert', [ 'label' => 'Dossier de l\'archive' , 'value' => $baseUrlValue, 'readonly' => true, - 'help' => 'Dossier de base du site stockée dans la sauvegarde.' + 'help' => 'Le dossier de base du site est stockée dans la sauvegarde.' ]); ?>
- 'Dossier du site actuel', 'value' => helper::baseUrl(false,false), - 'readonly' => true, - 'help' => 'Dossier du base site actuel.' + 'readonly' => true ]); ?>
- helper::baseUrl() . 'config/updateBaseUrl', 'class' => $buttonClass, 'value' => 'convertir' From 579a3655df6f3c287de3e96bd44e59c429653527 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 4 Jun 2021 13:05:01 +0200 Subject: [PATCH 2/9] constante update url --- core/module/config/view/advanced/advanced.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/module/config/view/advanced/advanced.php b/core/module/config/view/advanced/advanced.php index 34beaf97..83bb1fc3 100644 --- a/core/module/config/view/advanced/advanced.php +++ b/core/module/config/view/advanced/advanced.php @@ -138,7 +138,7 @@

Mises à jour automatisée

- +
Date: Fri, 4 Jun 2021 13:41:21 +0200 Subject: [PATCH 3/9] translate devient i18n --- core/module/install/ressource/defaultdata.php | 2 +- core/module/translate/translate.php | 2 +- core/module/translate/view/index/index.php | 32 +++++++++---------- module/search/search.php | 8 ++--- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php index d399bb2c..6d8ebf58 100644 --- a/core/module/install/ressource/defaultdata.php +++ b/core/module/install/ressource/defaultdata.php @@ -83,7 +83,7 @@ class init extends common { ], 'module' => [], 'user' => [], - 'translate' => [ + 'i18n' => [ 'scriptGoogle' => false, 'showCredits' => false, 'autoDetect' => false, diff --git a/core/module/translate/translate.php b/core/module/translate/translate.php index 65aa7dd8..35c75b2a 100644 --- a/core/module/translate/translate.php +++ b/core/module/translate/translate.php @@ -61,7 +61,7 @@ class translate extends common { } // Enregistrement des données - $this->setData(['config','translate', [ + $this->setData(['config','i18n', [ 'scriptGoogle' => $this->getInput('translateScriptGoogle', helper::FILTER_BOOLEAN), 'showCredits' => $this->getInput('translateCredits', helper::FILTER_BOOLEAN) ? $this->getInput('translateCredits', helper::FILTER_BOOLEAN) : false, 'autoDetect' => $this->getInput('translateAutoDetect', helper::FILTER_BOOLEAN), diff --git a/core/module/translate/view/index/index.php b/core/module/translate/view/index/index.php index 1dd188b6..0982bad0 100644 --- a/core/module/translate/view/index/index.php +++ b/core/module/translate/view/index/index.php @@ -21,37 +21,37 @@ Traduction automatique :
$this->getData(['config','translate', 'scriptDE']) + 'checked' => $this->getData(['config','i18n', 'scriptDE']) ]); ?>
$this->getData(['config','translate', 'scriptEN']) + 'checked' => $this->getData(['config','i18n', 'scriptEN']) ]); ?>
$this->getData(['config','translate', 'scriptES']) + 'checked' => $this->getData(['config','i18n', 'scriptES']) ]); ?>
$this->getData(['config','translate', 'scriptIT']) + 'checked' => $this->getData(['config','i18n', 'scriptIT']) ]); ?>
$this->getData(['config','translate', 'scriptNL']) + 'checked' => $this->getData(['config','i18n', 'scriptNL']) ]); ?>
$this->getData(['config','translate', 'scriptPT']) + 'checked' => $this->getData(['config','i18n', 'scriptPT']) ]); ?>
$this->getData(['config','translate', 'autoDetect']), + 'checked' => $this->getData(['config','i18n', 'autoDetect']), 'help' => 'Détecte la langue du navigateur.' ]); ?> @@ -61,32 +61,32 @@ Traduction rédigée :
$this->getData(['config', 'translate', 'siteEN']) + 'checked' => $this->getData(['config', 'i18n', 'siteEN']) ]); ?>
$this->getData(['config', 'translate', 'siteDE']) + 'checked' => $this->getData(['config', 'i18n', 'siteDE']) ]); ?>
$this->getData(['config', 'translate', 'siteES']) + 'checked' => $this->getData(['config', 'i18n', 'siteES']) ]); ?>
$this->getData(['config', 'translate', 'siteIT']) + 'checked' => $this->getData(['config', 'i18n', 'siteIT']) ]); ?>
$this->getData(['config', 'translate', 'siteNL']) + 'checked' => $this->getData(['config', 'i18n', 'siteNL']) ]); ?>
$this->getData(['config', 'translate', 'sitePT']) + 'checked' => $this->getData(['config', 'i18n', 'sitePT']) ]); ?>
@@ -101,18 +101,18 @@
$this->getData(['config','translate', 'scriptGoogle']) + 'checked' => $this->getData(['config','i18n', 'scriptGoogle']) ]); ?>
$this->getData(['config','translate', 'admin']), + 'checked' => $this->getData(['config','i18n', 'admin']), 'help' => 'Traduction automatique du site et de l\'interface du CMS' ]); ?>
$this->getData(['config','translate', 'showCredits']), + 'checked' => $this->getData(['config','i18n', 'showCredits']), 'help' => 'Option vivement recommandée pour le respect du droit d\'auteur' ]); ?>
diff --git a/module/search/search.php b/module/search/search.php index e336de2a..3b6c6665 100644 --- a/module/search/search.php +++ b/module/search/search.php @@ -199,20 +199,20 @@ class search extends common { // Traduction du mot clé si le script Google Trad est actif // Le multi langue est sélectionné - if ( $this->getData(['config','translate','scriptGoogle']) === true + if ( $this->getData(['config','i18n','scriptGoogle']) === true AND // et la traduction de la langue courante est automatique ( isset($_COOKIE['googtrans']) - AND ( $this->getData(['config','translate', substr($_COOKIE['googtrans'],4,2)]) === 'script' + AND ( $this->getData(['config','i18n', substr($_COOKIE['googtrans'],4,2)]) === 'script' // Ou traduction automatique - OR $this->getData(['config','translate','autoDetect']) === true ) + OR $this->getData(['config','i18n','autoDetect']) === true ) ) // Cas des pages d'administration // Pas connecté AND ( $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') // Ou connecté avec option active OR ($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD') - AND $this->getData(['config','translate','admin']) === true + AND $this->getData(['config','i18n','admin']) === true ) ) AND !isset($_COOKIE['ZWII_I18N_SITE']) From 01b9f8c1035d348d8a3f49623f430251c6023967 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 4 Jun 2021 13:57:44 +0200 Subject: [PATCH 4/9] Gestion des langues --- core/module/translate/translate.php | 172 +++++++++++++++---- core/module/translate/view/copy/copy.css | 1 + core/module/translate/view/copy/copy.php | 34 ++++ core/module/translate/view/index/index.php | 186 +++++++++++---------- 4 files changed, 273 insertions(+), 120 deletions(-) create mode 100644 core/module/translate/view/copy/copy.css create mode 100644 core/module/translate/view/copy/copy.php diff --git a/core/module/translate/translate.php b/core/module/translate/translate.php index 35c75b2a..10026850 100644 --- a/core/module/translate/translate.php +++ b/core/module/translate/translate.php @@ -17,10 +17,77 @@ class translate extends common { public static $actions = [ /*'config' => self::GROUP_MODERATOR,*/ - 'index' => self::GROUP_MODERATOR, + 'index' => self::GROUP_ADMIN, + 'copy' => self::GROUP_ADMIN, 'language' => self::GROUP_VISITOR ]; + public static $translateOptions = []; + + // Liste des langues installées + public static $languagesInstalled = []; + // Liste des langues cibles + public static $languagesTarget = []; + // Activation du bouton de copie + public static $siteTranslate = true; + + /** + * Configuration avancée des langues + */ + public function copy() { + + // Soumission du formulaire + if ($this->isPost()) { + // Initialisation + $success = false; + $copyFrom = $this->getInput('translateFormCopySource'); + $toCreate = $this->getInput('translateFormCopyTarget'); + if ($copyFrom !== $toCreate) { + // Création du dossier + if (is_dir(self::DATA_DIR . $toCreate) === false ) { // Si le dossier est déjà créé + $success = mkdir (self::DATA_DIR . $toCreate); + } else { + $success = true; + } + // Copier les données par défaut avec gestion des erreurs + $success = (copy (self::DATA_DIR . $copyFrom . '/locale.json', self::DATA_DIR . $toCreate . '/locale.json') === true && $success === true) ? true : false; + $success = (copy (self::DATA_DIR . $copyFrom . '/module.json', self::DATA_DIR . $toCreate . '/module.json') === true && $success === true) ? true : false; + $success = (copy (self::DATA_DIR . $copyFrom . '/page.json', self::DATA_DIR . $toCreate . '/page.json') === true && $success === true) ? true : false; + // Enregistrer la langue + if ($success) { + $this->setData(['config', 'i18n', $toCreate, 'site' ]); + $notification = 'Données ' . self::$i18nList[$copyFrom] . ' copiées vers ' . self::$i18nList[$toCreate]; + } else { + $notification = "Quelque chose n\'a pas fonctionné, vérifiez les permissions."; + } + } else { + $success = false; + $notification = 'Les langues doivent être différentes.'; + } + // Valeurs en sortie + $this->addOutput([ + 'notification' => $notification, + 'title' => 'Utilitaire de copie', + 'view' => 'index', + 'state' => $success + ]); + } + // Tableau des langues installées + foreach (self::$i18nList as $key => $value) { + if ($this->getData(['config','i18n', $key]) === 'site') { + self::$languagesTarget[$key] = $value; + } + } + // Langues cibles fr en plus + self::$languagesInstalled = array_merge(['fr' => 'Français (fr)'],self::$languagesTarget); + + // Valeurs en sortie + $this->addOutput([ + 'title' => 'Utilitaire de copie', + 'view' => 'copy' + ]); + } + /** * Configuration */ @@ -28,19 +95,26 @@ class translate extends common { // Soumission du formulaire if($this->isPost()) { - // Edtion des langues + // Désactivation du script Google + if ($this->getInput('translateScriptGoogle', helper::FILTER_BOOLEAN) === false) { + setrawcookie('googtrans', '/fr/fr', time() + 3600, helper::baseUrl(false,false)); + $_SESSION['googtrans'] = '/fr/fr'; + } + $script = $this->getInput('translateScriptGoogle', helper::FILTER_BOOLEAN); + // Edition des langues foreach (self::$i18nList as $keyi18n => $value) { if ($keyi18n === 'fr') {continue;} - // Effacement d'une langue installée (dossier plus option désactivée précédemment) + // Effacement d'une langue installée if ( is_dir( self::DATA_DIR . $keyi18n ) === true - AND $this->getInput('translateSiteFlag' . strtoupper($keyi18n) , helper::FILTER_BOOLEAN) === false ) + AND $this->getInput('translate' . strtoupper($keyi18n)) === 'delete') { $this->removeDir( self::DATA_DIR . $keyi18n); } // Installation d'une langue - if ( $this->getInput('translateSiteFlag' . strtoupper($keyi18n) , helper::FILTER_BOOLEAN) === true ) + if ( $this->getInput('translate' . strtoupper($keyi18n)) === 'site' + AND is_dir(self::DATA_DIR . $keyi18n) === false ) { - // Créer le dossier + // Créer les données absentes if (is_dir( self::DATA_DIR . $keyi18n ) === false ) { mkdir( self::DATA_DIR . $keyi18n); } @@ -58,29 +132,27 @@ class translate extends common { $e->save(); } } + // Active le script si une langue est en trad auto + if ($script === false + AND $this->getInput('translate'. strtoupper($keyi18n)) === 'script') { + $script = true; + } } - // Enregistrement des données $this->setData(['config','i18n', [ - 'scriptGoogle' => $this->getInput('translateScriptGoogle', helper::FILTER_BOOLEAN), - 'showCredits' => $this->getInput('translateCredits', helper::FILTER_BOOLEAN) ? $this->getInput('translateCredits', helper::FILTER_BOOLEAN) : false, - 'autoDetect' => $this->getInput('translateAutoDetect', helper::FILTER_BOOLEAN), - 'admin' => $this->getInput('translateAdmin', helper::FILTER_BOOLEAN), - 'scriptFR' => $this->getInput('translateScriptFlagFR', helper::FILTER_BOOLEAN), - 'scriptDE' => $this->getInput('translateScriptFlagDE', helper::FILTER_BOOLEAN), - 'scriptEN' => $this->getInput('translateScriptFlagEN', helper::FILTER_BOOLEAN), - 'scriptES' => $this->getInput('translateScriptFlagES', helper::FILTER_BOOLEAN), - 'scriptIT' => $this->getInput('translateScriptFlagIT', helper::FILTER_BOOLEAN), - 'scriptNL' => $this->getInput('translateScriptFlagNL', helper::FILTER_BOOLEAN), - 'scriptPT' => $this->getInput('translateScriptFlagPT', helper::FILTER_BOOLEAN), - 'site' => $this->getInput('translateSite', helper::FILTER_BOOLEAN), - 'siteFR' => $this->getInput('translateSiteFlagFR', helper::FILTER_BOOLEAN), - 'siteDE' => $this->getInput('translateSiteFlagDE', helper::FILTER_BOOLEAN), - 'siteEN' => $this->getInput('translateSiteFlagEN', helper::FILTER_BOOLEAN), - 'siteES' => $this->getInput('translateSiteFlagES', helper::FILTER_BOOLEAN), - 'siteIT' => $this->getInput('translateSiteFlagIT', helper::FILTER_BOOLEAN), - 'siteNL' => $this->getInput('translateSiteFlagNL', helper::FILTER_BOOLEAN), - 'sitePT' => $this->getInput('translateSiteFlagPT', helper::FILTER_BOOLEAN) + 'enabled' => $this->getData(['config', 'i18n', 'enabled']), + 'scriptGoogle' => $script, + 'showCredits' => $this->getInput('translateScriptGoogle', helper::FILTER_BOOLEAN) ? $this->getInput('translateCredits', helper::FILTER_BOOLEAN) : false, + 'autoDetect' => $this->getInput('translateScriptGoogle', helper::FILTER_BOOLEAN) ? $this->getInput('translateAutoDetect', helper::FILTER_BOOLEAN) : false, + 'admin' => $this->getInput('translateScriptGoogle', helper::FILTER_BOOLEAN) ? $this->getInput('translateAdmin', helper::FILTER_BOOLEAN) : false, + 'fr' => $this->getInput('translateFR'), + 'de' => $this->getInput('translateDE'), + 'en' => $this->getInput('translateEN'), + 'es' => $this->getInput('translateES'), + 'it' => $this->getInput('translateIT'), + 'nl' => $this->getInput('translateNL'), + 'pt' => $this->getInput('translatePT') + ]]); // Valeurs en sortie $this->addOutput([ @@ -89,22 +161,54 @@ class translate extends common { 'state' => true ]); } + // Modification des options de suppression de la langue installée. + foreach (self::$i18nList as $key => $value) { + if ($this->getData(['config','i18n',$key]) === 'site') { + self::$translateOptions [$key] = [ + 'none' => 'Drapeau masqué', + 'script' => 'Traduction automatique', + 'site' => 'Traduction rédigée', + 'delete' => 'Supprimer la traduction' + ]; + self::$siteTranslate = $key !== 'fr' ? false : true; + } else { + self::$translateOptions [$key] = [ + 'none' => 'Drapeau masqué', + 'script' => 'Traduction automatique', + 'site' => 'Traduction rédigée' + ]; + } + } // Valeurs en sortie $this->addOutput([ - 'title' => 'Paramètres', + 'title' => 'Gestion des langues', 'view' => 'index' ]); } - /* - * Traitement du changement de langues - */ + + /* + * Traitement du changement de langue + * Fonction utilisée par le noyau + */ public function language() { - // Transmettre le choix au noyau - setcookie('ZWII_USER_I18N', $this->getUrl(2), time() + 3600, helper::baseUrl(false, false) , '', helper::isHttps(), true); - // Valeurs en sortie sans post + + // Activation du drapeau + if ( $this->getInput('ZWII_I18N_' . strtoupper($this->getUrl(3))) !== $this->getUrl(2) ) { + // Nettoyer et stocker le choix de l'utilisateur + helper::deleteCookie('ZWII_I18N_SITE'); + helper::deleteCookie('ZWII_I18N_SCRIPT'); + // Sélectionner + setcookie('ZWII_I18N_' . strtoupper($this->getUrl(3)) , $this->getUrl(2), time() + 3600, helper::baseUrl(false, false) , '', helper::isHttps(), true); + // Désactivation du drapeau, langue FR par défaut + } else { + setcookie('ZWII_I18N_SITE' , 'fr', time() + 3600, helper::baseUrl(false, false) , '', helper::isHttps(), true); + helper::deleteCookie('ZWII_I18N_SCRIPT'); + } + + // Valeurs en sortie $this->addOutput([ - 'redirect' => helper::baseUrl() . $this->getUrl(3) + 'redirect' => helper::baseUrl() ]); } } \ No newline at end of file diff --git a/core/module/translate/view/copy/copy.css b/core/module/translate/view/copy/copy.css new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/core/module/translate/view/copy/copy.css @@ -0,0 +1 @@ + diff --git a/core/module/translate/view/copy/copy.php b/core/module/translate/view/copy/copy.php new file mode 100644 index 00000000..4cb9e1fd --- /dev/null +++ b/core/module/translate/view/copy/copy.php @@ -0,0 +1,34 @@ + +
+
+ 'buttonGrey', + 'href' => helper::baseUrl() . 'translate', + 'ico' => 'left', + 'value' => 'Retour' + ]); ?> +
+
+ +
+
+
+
+
+

Copie de site (traductions rédigées)

+
+
+ 'Pages et les modules de' + ]); ?> +
+
+ 'Vers' + ]); ?> +
+
+
+
+
+ \ No newline at end of file diff --git a/core/module/translate/view/index/index.php b/core/module/translate/view/index/index.php index 0982bad0..8ba18662 100644 --- a/core/module/translate/view/index/index.php +++ b/core/module/translate/view/index/index.php @@ -8,112 +8,116 @@ 'value' => 'Retour' ]); ?>
-
+
+ helper::baseUrl() . 'translate/copy', + 'value' => 'Utilitaire de copie', + 'ico' => 'cog-alt', + 'disabled' => $module::$siteTranslate + ]); ?> +
+
-

Langues supportées

+

Traduction automatique + + + +

- Traduction automatique : -
- $this->getData(['config','i18n', 'scriptDE']) - ]); ?> -
-
- $this->getData(['config','i18n', 'scriptEN']) + $this->getData(['config','i18n', 'scriptGoogle']), + 'help' => 'Le script Google Translate assure la traduction automatique du site.' ]); ?> -
-
- $this->getData(['config','i18n', 'scriptES']) - ]); ?> -
-
- $this->getData(['config','i18n', 'scriptIT']) - ]); ?> -
-
- $this->getData(['config','i18n', 'scriptNL']) - ]); ?> -
-
- $this->getData(['config','i18n', 'scriptPT']) - ]); ?> -
-
- $this->getData(['config','i18n', 'autoDetect']), - 'help' => 'Détecte la langue du navigateur.' - ]); ?> - -
- Traduction rédigée : -
- $this->getData(['config', 'i18n', 'siteEN']) + $this->getData(['config','i18n', 'autoDetect']), + 'class' => 'translateGoogleScriptOption', + 'help' => 'Détecte la langue du navigateur, dans ce mode il n\'est pas nécessaire d\'afficher les drapeaux.' + ]); ?> +
+
+
+
+ $this->getData(['config','i18n', 'showCredits']), + 'class' => 'translateGoogleScriptOption', + 'help' => 'Option recommandée pour le respect du droit d\'auteur' + ]); ?> +
+
+ $this->getData(['config','i18n', 'admin']), + 'class' => 'translateGoogleScriptOption', + 'help' => 'Traduit le site et l\'interface de ZwiiCMS quand un utilisateur est connecté' ]); ?> -
-
- $this->getData(['config', 'i18n', 'siteDE']) - ]); ?> -
-
- $this->getData(['config', 'i18n', 'siteES']) - ]); ?> -
-
- $this->getData(['config', 'i18n', 'siteIT']) - ]); ?> -
-
- $this->getData(['config', 'i18n', 'siteNL']) - ]); ?> -
-
- $this->getData(['config', 'i18n', 'sitePT']) - ]); ?> -
-
-
-

Paramètres de traduction automatique

-
-
- $this->getData(['config','i18n', 'scriptGoogle']) - ]); ?> +
+
+

Mode de traduction et affichage des drapeaux

+
+
+ 'Drapeau masqué','site'=>'Drapeau affiché'], [ + 'label' => 'Français', + 'selected' => $this->getData(['config', 'i18n' , 'fr']) + ]); ?> +
+
+
+
+
+ 'Allemand', + 'class' => 'translateFlagSelect', + 'selected' => $this->getData(['config', 'i18n' , 'de']) + ]); ?>
-
- $this->getData(['config','i18n', 'admin']), - 'help' => 'Traduction automatique du site et de l\'interface du CMS' - ]); ?> +
+ 'Anglais', + 'class' => 'translateFlagSelect', + 'selected' => $this->getData(['config', 'i18n' , 'en']) + ]); ?>
-
- $this->getData(['config','i18n', 'showCredits']), - 'help' => 'Option vivement recommandée pour le respect du droit d\'auteur' +
+ 'Espagnol', + 'class' => 'translateFlagSelect', + 'selected' => $this->getData(['config', 'i18n' , 'es']) + ]); ?> +
+
+
+
+ 'Italien', + 'class' => 'translateFlagSelect', + 'selected' => $this->getData(['config', 'i18n' , 'it']) + ]); ?> +
+
+ 'Néerlandais', + 'class' => 'translateFlagSelect', + 'selected' => $this->getData(['config', 'i18n' , 'nl']) + ]); ?> +
+
+ 'Portugais', + 'class' => 'translateFlagSelect', + 'selected' => $this->getData(['config', 'i18n' , 'pt']) ]); ?>
@@ -121,4 +125,14 @@
+ +
+

Vous avez le choix entre une traduction automatique réalisée avec le script Google Traduction ou une traduction rédigée. La traduction automatique offre deux possibilités, la détection automatique de la langue du navigateur même celle-ci n'est pas + matérialisée par un drapeau. Le clic sur un drapeau forcera la traduction dans cette langue, pour cela sélectionnez le drapeau puis l'option de "Traduction automatique". + La traduction automatique est réalisée à partir du site en version française.

+

Avec l'option "Traduction rédigée", une nouveau sité est généré, seule la page d'accueil est crée, il faut alors rédiger les pages dans la langue sélectionnée. + Il est possible de copier les pages et les modules d'une langue vers une autre à l'aide de l'utilitaire de copie. + Quand un drapeau est masqué, la traduction est effacée, pensez à sauvegarder. + Afficher le drapeau français pour revenir à la traduction dans la langue originale.

+
\ No newline at end of file From 76f9da92bdf6676f18bb42afcfb2735b2291f1ac Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 4 Jun 2021 14:16:24 +0200 Subject: [PATCH 5/9] merge common.css --- core/layout/common.css | 86 ++++++++++++++++++++++++++++-------------- 1 file changed, 58 insertions(+), 28 deletions(-) diff --git a/core/layout/common.css b/core/layout/common.css index ced1cd47..fd799fed 100755 --- a/core/layout/common.css +++ b/core/layout/common.css @@ -29,7 +29,7 @@ body { } -@media (min-width: 769px) { +@media screen and (min-width: 769px) { body { /*margin:0px 10px;*/ margin: 0; @@ -41,7 +41,7 @@ body { /** * Petits écrans inférieurs à 768px de largeur, on supprime les marges */ -@media (max-width: 768px) { +@media screen and (max-width: 768px) { body { margin: 0px; } @@ -65,7 +65,7 @@ body { -@media (max-width: 768px) { +@media screen and (max-width: 768px) { .siteContainer { display: flex; flex-direction: column; @@ -237,12 +237,12 @@ td>.col12 { } /* Tableau sur les écrans de petites tailles */ -@media (max-width: 768px) { +@media screen and (max-width: 768px) { .table thead { font-size: 0.8em; } } -@media (max-width: 668px) { +@media screen and (max-width: 668px) { .table thead { display:none; } @@ -408,7 +408,7 @@ td>.col12 { background-color: rgba(255, 255, 255, 1); } -@media (min-width: 769px) { +@media screen and (min-width: 769px) { #bar #barLeft { float: left; } @@ -419,7 +419,7 @@ td>.col12 { } } -@media (max-width: 768px) { +@media screen and (max-width: 768px) { #bar { text-align: center; padding: 0 1; @@ -455,7 +455,7 @@ td>.col12 { overflow: hidden; } /* Dans theme.css -@media (min-width:768px) { +@media screen and (min-width:768px) { #site { margin: 20px auto; } @@ -464,7 +464,7 @@ td>.col12 { /* Bannière */ -@media (min-width:768px) { +@media screen and (min-width:768px) { body>header { margin: 0; /*-10px;*/ @@ -598,13 +598,13 @@ nav::before { display: flex; } -@media (min-width: 769px) { +@media screen and (min-width: 769px) { nav #menu { display: block; } } -@media (max-width: 768px) { +@media screen and (max-width: 768px) { body>nav { margin: 0; } @@ -691,41 +691,66 @@ li .menuSideChild { /* Container des drapeaux */ -#i18nContainer { - z-index: 100; + +#i18nContainerNav, #i18nContainerSite { position: relative ; float: right; - width: auto; - height: auto; - margin-top: -25px; } -#i18nContainer ul { +#i18nContainerNav ul, #i18nContainerSite ul { list-style: none; } -#i18nContainer li { +#i18nContainerNav li, #i18nContainerSite li { display: inline-block; position: relative; } -#i18nContainer img { - width: 80%; +#i18nFlag { + width: 70%; +} + +#i18nFlagSelected { + width: 100%; } +/* +* Position du bloc dans le site sur les petits écrans +*/ - -#i18nContainer img { - margin: 2px; +#i18nContainerNav { + display: block; +} +#i18nContainerSite { + display: none; } +@media screen and (max-width:1024px){ + #i18nContainerNav { + display: none; + } + #i18nContainerSite { + display: block; + margin-top: -10px; + } + #i18nFlag { + width: 100%; + padding: 5px; + } + + #i18nFlagSelected { + width: 130%; + padding: 5px; + } + + } /* Corps */ -@media (min-width:768px) { +@media screen and (min-width:768px) { section { padding: 20px; } @@ -822,7 +847,7 @@ footer #footerbody>div { } /* Conserve le pied de page sur une ligne */ -@media (max-width: 768px) { +@media screen and (max-width: 768px) { body>footer { margin: 0; } @@ -1031,6 +1056,7 @@ footer #footerSocials .zwiico-github:hover { user-select: none; } + /* Lightbox */ .lightbox { background: #FFF; @@ -1209,7 +1235,7 @@ label { } /* Empêche le débordement et les sauts de ligne */ -.inputFileManagerWrapper, .inputDateManagerWrapper { +.inputFileManagerWrapper, .inputDateManagerWrapper { display: inline; } @@ -1367,7 +1393,7 @@ input[type='checkbox']:disabled+label:before { display: inline-block; } -@media (min-width: 769px) { +@media screen and (min-width: 769px) { .col1 { width: 8.33333333%; } @@ -1556,7 +1582,7 @@ th.col12 { } /* Tableau sur les écrans de très petites tailles */ -@media (max-width: 480px){ +@media screen and (max-width: 480px){ .table tr{ display: block; margin-bottom: 10px; @@ -1710,3 +1736,7 @@ th.col12 { border-radius: 5px; z-index: 30; } + +.helpDisplayButton { + cursor: pointer; +} From c79e348a763ebe8976ff866599c9e4517a39786b Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 4 Jun 2021 14:21:23 +0200 Subject: [PATCH 6/9] aide dans translate --- core/module/translate/view/index/index.help.html | 1 + core/module/translate/view/index/index.php | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 core/module/translate/view/index/index.help.html diff --git a/core/module/translate/view/index/index.help.html b/core/module/translate/view/index/index.help.html new file mode 100644 index 00000000..61db8ecf --- /dev/null +++ b/core/module/translate/view/index/index.help.html @@ -0,0 +1 @@ +

A VENIR

diff --git a/core/module/translate/view/index/index.php b/core/module/translate/view/index/index.php index 8ba18662..ab266baa 100644 --- a/core/module/translate/view/index/index.php +++ b/core/module/translate/view/index/index.php @@ -8,7 +8,14 @@ 'value' => 'Retour' ]); ?>
-
+
+ 'buttonHelp', + 'ico' => 'help', + 'value' => 'Aide' + ]); ?> +
+
helper::baseUrl() . 'translate/copy', 'value' => 'Utilitaire de copie', @@ -20,6 +27,10 @@
+ +
+ +
From 743fee450d3301f278efdc232a7458fd8da6b159 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 4 Jun 2021 17:53:30 +0200 Subject: [PATCH 7/9] =?UTF-8?q?V=C3=A9rification=20v10=20-=20v11?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/layout/common.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/layout/common.css b/core/layout/common.css index fd799fed..5ec54e7a 100755 --- a/core/layout/common.css +++ b/core/layout/common.css @@ -1235,7 +1235,7 @@ label { } /* Empêche le débordement et les sauts de ligne */ -.inputFileManagerWrapper, .inputDateManagerWrapper { +.inputFileManagerWrapper, .inputDateManagerWrapper { display: inline; } From cb6d2b87ec275481577040e2b73e27decdbc50f7 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 4 Jun 2021 18:21:03 +0200 Subject: [PATCH 8/9] changes --- CHANGES.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 5cc03d49..22f3272f 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,11 +1,17 @@ # Changelog -## version 10.6.03 -- Correction : - - Module actualités (news), version 3.3, le flux RSS affiche l'ensemble des articles plutôt que ceux de la page courante. + +## Version 11.0.00 - Modifications : - - Installation : livraison des fichiers de thème du site de test dans une archive. Désormais, le dossier site ne contiendra que les fichiers de sécurité htaccess. Cette procédure permettra de ne plus différencier les archives d'installation et de mise à jour. - - Mises à jour : les mises à jour s'effectueront à partir de la forge plutôt que sur le site. + - Gestion multi-langues + - Traduction rédigée dans une langue européenne + - Traduction automatique dans une langue européenne + - Traduction selon la langue navigateur + - Configuration du site : + - Activation et désactivation de la déconnexion automatique empêchant plusieurs sessions avec le même compte. + - Suppression de l'option articles par pages. + - Suppression de l'option de backup individuel des fichiers de données, pour l'activer manuellement, créez un fichier vide .backup dans site/data + - Nouvelle option permettant de transférer les fichiers de sauvegarde automatiques dans le gestionnaire de fichiers. ## version 10.6.03 - Correction : From a7e9ef3cdb7630820d84f93fc21b8372c628428b Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 4 Jun 2021 18:28:02 +0200 Subject: [PATCH 9/9] arrangements interface --- core/module/config/view/advanced/advanced.php | 43 ++++++++----------- 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/core/module/config/view/advanced/advanced.php b/core/module/config/view/advanced/advanced.php index 83bb1fc3..a4c307fe 100644 --- a/core/module/config/view/advanced/advanced.php +++ b/core/module/config/view/advanced/advanced.php @@ -28,33 +28,25 @@

Maintenance

-
+
$this->getData(['config', 'maintenance']) ]); ?>
-
-
-
+
helper::baseUrl() . 'config/backup', 'value' => 'Sauvegarder', 'ico' => 'download-cloud' ]); ?>
-
+
helper::baseUrl() . 'config/restore', 'value' => 'Restaurer', 'ico' => 'upload-cloud' ]); ?>
-
- helper::baseUrl() . 'config/copyBackups', - 'value' => 'Backups Auto ➜ FileManager' - ]); ?> -
@@ -103,20 +95,6 @@
-
-
- $this->getData(['config', 'autoBackup']), - 'help' => 'Une archive contenant le dossier /site/data est copiée dans le dossier \'site/backup\'. La sauvegarde est conservée pendant 30 jours.

Les fichiers du site ne sont pas sauvegardés automatiquement. Activation recommandée.' - ]); ?> -

-
- file_exists('site/data/.backup'), - 'help' => 'Un fichier .backup.json est généré à chaque édition ou effacement d\'une donnée. La désactivation entraîne la suppression de ces fichiers.' - ]); ?> -
-
'Déconnecte les sessions ouvertes précédemment sur d\'autres navigateurs ou terminaux. Activation recommandée.' ]); ?>
+ +
+
+
+ $this->getData(['config', 'autoBackup']), + 'help' => 'Une archive contenant le dossier /site/data est copiée dans le dossier \'site/backup\'. La sauvegarde est conservée pendant 30 jours.

Les fichiers du site ne sont pas sauvegardés automatiquement. Activation recommandée.' + ]); ?> +

+
+ helper::baseUrl() . 'config/copyBackups', + 'value' => 'Backups Auto ➜ FileManager' + ]); ?> +