diff --git a/core/class/phpmailer/Exception.class.php b/core/class/phpmailer/Exception.class.php old mode 100644 new mode 100755 diff --git a/core/class/phpmailer/PHPMailer.class.php b/core/class/phpmailer/PHPMailer.class.php old mode 100644 new mode 100755 diff --git a/core/core.php b/core/core.php index 5a2cdb8b..03f0401c 100755 --- a/core/core.php +++ b/core/core.php @@ -36,7 +36,7 @@ class common { const THUMBS_WIDTH = 640; // Numéro de version - const ZWII_VERSION = '10.0.086'; + const ZWII_VERSION = '10.0.087'; const ZWII_UPDATE_CHANNEL = "v10"; public static $actions = []; diff --git a/core/module/config/config.php b/core/module/config/config.php index f4a7cacd..0bdd7ef8 100755 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -8,7 +8,7 @@ * * @author Rémi Jean * @copyright Copyright (C) 2008-2018, Rémi Jean - * @author Frédéric Tempez + * * @author Frédéric Tempez * @copyright Copyright (C) 2018-2020, Frédéric Tempez * @license GNU General Public License, version 3 * @link http://zwiicms.com/ @@ -18,15 +18,13 @@ class config extends common { public static $actions = [ 'backup' => self::GROUP_ADMIN, - 'restore' => self::GROUP_ADMIN, 'configMetaImage' => self::GROUP_ADMIN, 'generateFiles' => self::GROUP_ADMIN, 'updateRobots' => self::GROUP_ADMIN, 'index' => self::GROUP_ADMIN, - 'updateOnline' => self::GROUP_ADMIN + 'manage' => self::GROUP_ADMIN, + 'updateBaseUrl' => self::GROUP_ADMIN ]; - - public static $newVersion; public static $timezones = [ 'Pacific/Midway' => '(GMT-11:00) Midway Island', @@ -150,11 +148,11 @@ class config extends common { 15 => '15 articles', 20 => '20 articles' ]; - // Type de proxy - public static $proxyType = [ - 'tcp://' => 'TCP', - 'http://' => 'HTTP' - ]; + // Type de proxy + public static $proxyType = [ + 'tcp://' => 'TCP', + 'http://' => 'HTTP' + ]; public function generateFiles() { @@ -205,6 +203,7 @@ class config extends common { unlink('robots.bak'); return(fclose($filenew)); } + /** * Sauvegarde des données */ @@ -271,11 +270,11 @@ class config extends common { /** * Procédure d'importation */ - public function restore() { + public function manage() { // Soumission du formulaire if($this->isPost()) { - //if ($this->getInput('configrestoreImportFile')) - $fileZip = $this->getInput('configRestoreImportFile'); + //if ($this->getInput('configManageImportFile')) + $fileZip = $this->getInput('configManageImportFile'); $file_parts = pathinfo($fileZip); $folder = date('Y-m-d-h-i-s', time()); $zip = new ZipArchive(); @@ -283,7 +282,7 @@ class config extends common { // Valeurs en sortie erreur $this->addOutput([ 'notification' => 'Le fichier n\'est pas une archive valide', - 'redirect' => helper::baseUrl() . 'config/restore', + 'redirect' => helper::baseUrl() . 'config/manage', 'state' => false ]); } @@ -292,7 +291,7 @@ class config extends common { // Valeurs en sortie erreur $this->addOutput([ 'notification' => 'Impossible de lire l\'archive', - 'redirect' => helper::baseUrl() . 'config/restore', + 'redirect' => helper::baseUrl() . 'config/manage', 'state' => false ]); } @@ -314,42 +313,48 @@ class config extends common { in_array('core.json',$files) === true && in_array ('user.json', $files) === true && in_array ('config.json', $files) === true ) { - // V10 valide user et config + // V10 valide $version = '10'; // Option active, les users sont stockées - if ($this->getInput('configRestoreImportUser', helper::FILTER_BOOLEAN) === true ) { + if ($this->getInput('configManageImportUser', 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/restore', + 'redirect' => helper::baseUrl() . 'config/manage', 'state' => false ]); } - // Préserver les comptes des utilisateurs d'une version 9 si option cochée // Positionnement d'une variable de session lue au constructeur if ($version === '9') { $_SESSION['KEEP_USERS'] = $this->getInput('configRestoreImportUser', helper::FILTER_BOOLEAN); } - // Extraire le zip + // Extraire le zip ou 'site/' $success = $zip->extractTo( 'site/' ); // Fermer l'archive $zip->close(); - + // Restaurer les users originaux d'une v10 si option cochée if (!empty($users) && $version === '10' && - $this->getInput('configRestoreImportUser', helper::FILTER_BOOLEAN) === true) { - $this->setData(['user',$users]); - } - + $this->getInput('configManageImportUser', helper::FILTER_BOOLEAN) === true) { + $this->setData(['user',$users]); + } + /* + if ($version === '9' ) { + $this->importData($this->getInput('configManageImportUser', helper::FILTER_BOOLEAN)); + $this->setData(['core','dataVersion',0]); + }*/ + + // Met à jours les URL dans les contenus de page + // Message de notification $notification = $success === true ? 'Sauvegarde importée avec succès' : 'Erreur d\'extraction'; - $redirect = $this->getInput('configRestoreImportUser', helper::FILTER_BOOLEAN) === true ? helper::baseUrl() . 'config/restore' : helper::baseUrl() . 'user/login/'; + $redirect = $this->getInput('configManageImportUser', helper::FILTER_BOOLEAN) === true ? helper::baseUrl() . 'config/manage' : helper::baseUrl() . 'user/login/'; // Valeurs en sortie erreur $this->addOutput([ 'notification' => $notification, @@ -360,8 +365,8 @@ class config extends common { // Valeurs en sortie $this->addOutput([ - 'title' => 'Restaurer une sauvegarde', - 'view' => 'restore' + 'title' => 'Sauvegarder / Restaurer', + 'view' => 'manage' ]); } @@ -378,6 +383,12 @@ class config extends common { $this->getInput('configAutoUpdate', helper::FILTER_BOOLEAN) === true) { $this->setData(['core','lastAutoUpdate',0]); } + if ($this->getInput('configLegalCheck', helper::FILTER_BOOLEAN) === true ) { + $legalPageId = $this->getInput('configLegalPageId', helper::FILTER_ID); + } else { + $legalPageId = ''; + } + $this->setData([ 'config', [ @@ -404,13 +415,13 @@ class config extends common { 'metaDescription' => $this->getInput('configMetaDescription', helper::FILTER_STRING_LONG, true), 'title' => $this->getInput('configTitle', helper::FILTER_STRING_SHORT, true), 'autoUpdate' => helper::urlGetContents('http://zwiicms.com/update/' . common::ZWII_UPDATE_CHANNEL . '/version') === false - ? false - : $this->getInput('configAutoUpdate', helper::FILTER_BOOLEAN), + ? false + : $this->getInput('configAutoUpdate', helper::FILTER_BOOLEAN), 'proxyType' => $this->getInput('configProxyType'), 'proxyUrl' => $this->getInput('configProxyUrl'), 'proxyPort' => $this->getInput('configProxyPort',helper::FILTER_INT) ] - ]); + ]); if(self::$inputNotices === []) { // Ecrire les fichiers de script @@ -449,8 +460,8 @@ class config extends common { // Change le statut de la réécriture d'URL (pour le helper::baseUrl() de la redirection) helper::$rewriteStatus = false; } - // Met à jour la baseUrl - $this->setData(['core', 'baseUrl', helper::baseUrl(true,false) ]); + // Met à jour la baseUrl + $this->setData(['core', 'baseUrl', helper::baseUrl(true,false) ]); } // Générer robots.txt et sitemap $this->generateFiles(); @@ -472,43 +483,40 @@ class config extends common { ]); } -} - -class configHelper extends helper { - - /** - * Met à jour les données de site avec l'adresse trannsmise - */ - public function updateBaseUrl () { - // Supprimer l'information de redirection - $old = str_replace('?','',$this->getData(['core', 'baseUrl'])); - $new = helper::baseUrl(false,false); - $success = false ; - // Boucler sur les pages - foreach($this->getHierarchy(null,null,null) as $parentId => $childIds) { - $content = $this->getData(['page',$parentId,'content']); - $replace = str_replace( $old , $new , stripslashes($content),$count) ; - if ($count > 0) { - $success = true; - $this->setData(['page',$parentId,'content', $replace ]); - } - foreach($childIds as $childId) { - $content = $this->getData(['page',$childId,'content']); - $replace = str_replace( $old , $new, stripslashes($content),$count) ; + /** + * Met à jour les données de site avec l'adresse trannsmise + */ + public function updateBaseUrl () { + // Supprimer l'information de redirection + $old = str_replace('?','',$this->getData(['core', 'baseUrl'])); + $new = helper::baseUrl(false,false); + $success = false ; + // Boucler sur les pages + foreach($this->getHierarchy(null,null,null) as $parentId => $childIds) { + $content = $this->getData(['page',$parentId,'content']); + $replace = str_replace( $old , $new , stripslashes($content),$count) ; if ($count > 0) { $success = true; - $this->setData(['page',$childId,'content', $replace ]); + $this->setData(['page',$parentId,'content', $replace ]); + } + foreach($childIds as $childId) { + $content = $this->getData(['page',$childId,'content']); + $replace = str_replace( $old , $new, stripslashes($content),$count) ; + if ($count > 0) { + $success = true; + $this->setData(['page',$childId,'content', $replace ]); + } } - } } - if ($success === true) { - $this->setData(['core','baseUrl',helper::baseUrl(true,false)]); + if ($success === true) { + $this->setData(['core','baseUrl',helper::baseUrl(true,false)]); + } + // Valeurs en sortie + $this->addOutput([ + 'notification' => $success ? 'Conversion effectuée' : 'Aucune conversion', + 'redirect' => helper::baseUrl() . 'config/restore', + 'state' => $success ? true : false + ]); } - // Valeurs en sortie - $this->addOutput([ - 'notification' => $success ? 'Conversion effectuée' : 'Aucune conversion', - 'redirect' => helper::baseUrl() . 'config/restore', - 'state' => $success ? true : false - ]); - } -} + +} \ No newline at end of file diff --git a/core/module/config/view/index/index.js.php b/core/module/config/view/index/index.js.php index d6c43a6b..e4c85d3d 100755 --- a/core/module/config/view/index/index.js.php +++ b/core/module/config/view/index/index.js.php @@ -14,3 +14,12 @@ * Modification de l'affichage de l'icône de langues */ + +var configdisablei18nDOM = $("#configdisablei18n"); +configdisablei18nDOM.on("change", function() { + if ($("input[name=configdisablei18n]").is(':checked')) { + $(".zwiico-flag").css('display','none'); + } else { + $(".zwiico-flag").css('display','block'); + } +}); \ No newline at end of file diff --git a/core/module/config/view/index/index.php b/core/module/config/view/index/index.php index 12c4bc08..4685a5aa 100755 --- a/core/module/config/view/index/index.php +++ b/core/module/config/view/index/index.php @@ -1,23 +1,38 @@ -
-
- 'buttonGrey', - 'href' => helper::baseUrl(false), - 'ico' => 'home', - 'value' => 'Accueil' - ]); ?> -
-
- +
+
+
+ 'buttonGrey', + 'href' => helper::baseUrl(false), + 'ico' => 'home', + 'value' => 'Accueil' + ]); ?> +
+
+ helper::baseUrl() . 'config/backup', + 'value' => 'Sauvegarder', + 'ico' => 'download' + ]); ?> +
+
+ helper::baseUrl() . 'config/manage', + 'value' => 'Restaurer', + 'ico' => 'upload' + ]); ?> +
+
+ +
-
-
-
-
-

Informations générales

-
-
+
+
+
+

Informations générales

+
+
getData(['page']); foreach($pages as $page => $pageId) { @@ -29,379 +44,334 @@ echo template::select('configHomePageId', helper::arrayCollumn($pages, 'title', 'SORT_ASC'), [ 'label' => 'Page d\'accueil', 'selected' =>$this->getData(['config', 'homePageId']) - ]); ?> -
-
- 'Titre du site', - 'value' => $this->getData(['config', 'title']), - 'help' => 'Le titre apparaît dans la barre de titre et les partages sur les réseaux sociaux.' - ]); ?> -
-
- 'Description du site', - 'value' => $this->getData(['config', 'metaDescription']), - 'help' => 'La description apparaît dans les partages sur les réseaux sociaux.' - ]); ?> + ]); ?> +
+
+ 'Titre du site', + 'value' => $this->getData(['config', 'title']), + 'help' => 'Il apparaît dans la barre de titre et les partages sur les réseaux sociaux.' + ]); ?> +
+ 'Description du site', + 'value' => $this->getData(['config', 'metaDescription']), + 'help' => 'Elle apparaît dans les partages sur les réseaux sociaux.' + ]); ?>
-
-
-
-
-
-
-

Réglages

-
-
- 1, - 'help' => 'Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.', - 'label' => 'Favicon thème clair', - 'value' => $this->getData(['config', 'favicon']) - ]); ?> -
-
+
+
+
+
+
+

Paramètres

+ + + + +
+
+ 1, + 'help' => 'Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.', + 'label' => 'Favicon', + 'value' => $this->getData(['config', 'favicon']) + ]); ?> +
+
1, 'help' => 'Sélectionnez une icône adaptée à un thème sombre.
Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.', 'label' => 'Favicon thème sombre', 'value' => $this->getData(['config', 'faviconDark']) ]); ?> -
-
- 'Articles par page', - 'selected' => $this->getData(['config', 'itemsperPage']), - 'help' => 'Modules Blog et News' - ]); ?>
-
-
-
- 'Fuseau horaire', - 'selected' => $this->getData(['config', 'timezone']), - 'help' => 'Le fuseau horaire est utile au bon référencement' - ]); ?> -
-
- 'Sélectionner'] , helper::arrayCollumn($this->getData(['page']), 'title', 'SORT_ASC') ); - ?> - 'Mentions légales', - 'selected' => $this->getData(['config', 'legalPageId']), - 'help' => 'Les mentions légales sont obligatoires en France' - ]); ?> -
-
-
-
- $this->getData(['config', 'cookieConsent']) - ]); ?> -
-
- helper::checkRewrite(), - 'help' => 'Vérifiez d\'abord que votre serveur l\'autorise : ce n\'est pas le cas chez Free.' - ]); ?> -
-
-
-
-
-
-
-
-

Réseaux sociaux

-
-
- 'Saisissez votre ID : https://www.facebook.com/[ID].', - 'label' => 'Facebook', - 'value' => $this->getData(['config', 'social', 'facebookId']) - ]); ?> -
-
- 'Saisissez votre ID : https://www.instagram.com/[ID].', - 'label' => 'Instagram', - 'value' => $this->getData(['config', 'social', 'instagramId']) - ]); ?> -
-
- 'Saisissez votre ID : https://twitter.com/[ID].', - 'label' => 'Twitter', - 'value' => $this->getData(['config', 'social', 'twitterId']) - ]); ?> -
-
-
-
- 'ID de la chaîne : https://www.youtube.com/channel/[ID].', - 'label' => 'Chaîne Youtube', - 'value' => $this->getData(['config', 'social', 'youtubeId']) - ]); ?> -
-
- 'Saisissez votre ID Utilisateur : https://www.youtube.com/user/[ID].', - 'label' => 'Youtube', - 'value' => $this->getData(['config', 'social', 'youtubeUserId']) - ]); ?> -
-
- 'Saisissez votre ID : https://pinterest.com/[ID].', - 'label' => 'Pinterest', - 'value' => $this->getData(['config', 'social', 'pinterestId']) - ]); ?> -
-
-
-
- 'Saisissez votre ID Github : https://github.com/[ID].', - 'label' => 'Github', - 'value' => $this->getData(['config', 'social', 'githubId']) +
+ 'Articles par page', + 'selected' => $this->getData(['config', 'itemsperPage']), + 'help' => 'Modules Blog et News' ]); ?> -
-
- 'Saisissez votre ID Linkedin : https://fr.linkedin.com/in/[ID].', - 'label' => 'Linkedin', - 'value' => $this->getData(['config', 'social', 'linkedinId']) - ]); ?> -
-
-
-
-
-
-
-
-

Sauvegardes

-
-
- $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.

Le contenu du gestionnaire de fichiers n\'est pas sauvegardé.

' - ]); ?> +
-
- helper::baseUrl() . 'config/backup', - 'value' => 'Sauvegarde' - ]); ?> +
+
+ 'Fuseau horaire', + 'selected' => $this->getData(['config', 'timezone']), + 'help' => 'Le fuseau horaire est utile au bon référencement' + ]); ?> +
+
+ 'Sélectionner'] , helper::arrayCollumn($this->getData(['page']), 'title', 'SORT_ASC') ); + ?> + 'Mentions légales', + 'selected' => $this->getData(['config', 'legalPageId']), + 'help' => 'Les mentions légales sont obligatoires en France' + ]); ?> +
-
- helper::baseUrl() . 'config/restore', - 'value' => 'Restauration' - ]); ?> +
+
+ $this->getData(['config', 'cookieConsent']) + ]); ?> +
+
+ helper::checkRewrite(), + 'help' => 'Vérifiez d\'abord que votre serveur l\'autorise : ce n\'est pas le cas chez Free.' + ]); ?> +
-
-
-
- $this->getData(['config', 'maintenance']) - ]); ?> -
-
-
-
-
-
-
-
-

Mise à jour

- - - - -
-
- ' . common::ZWII_VERSION . '' . '.'; ?> - - - ' . helper::urlGetContents('http://zwiicms.com/update/' . common::ZWII_UPDATE_CHANNEL . '/version') . '' . '.';?> - -

Votre configuration interdit les mises à jour automatiques. Cliquez sur ce lien pour connaître la version disponible en ligne.

- -
-
-
-
- $error ? $this->getData(['config', 'autoUpdate']) : false, - 'help' => 'Vérification de l\'existence d\'une mise à jour en ligne une fois par jour.', +
+
+ $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', 'maintenance']) + ]); ?> +
+
+
+
+ $this->getData(['config', 'autoUpdate']), + 'help' => 'Vérifie une fois par jour l\'existence d\'une mise à jour.' + ]); ?> +
+
+ helper::baseUrl() . 'install/update', + 'value' => 'Mise à jour manuelle', 'disabled' => !$error ]); ?> -
-
- helper::baseUrl() . 'install/update', - 'value' => 'Mise à jour forcée', - 'disabled' => !$error - ]); ?> -
-
+
+
+
-
-
-
-
-

Référencement

-
-
-
-
- helper::baseUrl() . 'config/configMetaImage', - 'value' => 'Rafraîchir la capture d\'écran Open Graph' - ]); ?> -
+
+
+
+

Réseaux sociaux

+
+
+ 'Saisissez votre ID : https://www.facebook.com/[ID].', + 'label' => 'Facebook', + 'value' => $this->getData(['config', 'social', 'facebookId']) + ]); ?>
-
-
- helper::baseUrl() . 'config/generateFiles', - 'value' => 'Rafraîchir sitemap.xml et robots.txt' - ]); ?> -
+
+ 'Saisissez votre ID : https://www.instagram.com/[ID].', + 'label' => 'Instagram', + 'value' => $this->getData(['config', 'social', 'instagramId']) + ]); ?>
+
+
+
+ 'ID de la chaîne : https://www.youtube.com/channel/[ID].', + 'label' => 'Chaîne Youtube', + 'value' => $this->getData(['config', 'social', 'youtubeId']) + ]); ?> +
+
+ 'Saisissez votre ID Utilisateur : https://www.youtube.com/user/[ID].', + 'label' => 'Youtube', + 'value' => $this->getData(['config', 'social', 'youtubeUserId']) + ]); ?> +
-
- +
+
+ 'Saisissez votre ID : https://twitter.com/[ID].', + 'label' => 'Twitter', + 'value' => $this->getData(['config', 'social', 'twitterId']) + ]); ?> +
+
+ 'Saisissez votre ID : https://pinterest.com/[ID].', + 'label' => 'Pinterest', + 'value' => $this->getData(['config', 'social', 'pinterestId']) + ]); ?> +
+
+ 'Saisissez votre ID Linkedin : https://fr.linkedin.com/in/[ID].', + 'label' => 'Linkedin', + 'value' => $this->getData(['config', 'social', 'linkedinId']) + ]); ?> +
+
+ 'Saisissez votre ID Github : https://github.com/[ID].', + 'label' => 'Github', + 'value' => $this->getData(['config', 'social', 'githubId']) + ]); ?> +
-
-
-
-
-
- -
-

Options avancées

-
-
- 'Saisissez l\'ID de suivi.', - 'label' => 'Google Analytics', - 'placeholder' => 'UA-XXXXXXXX-X', - 'value' => $this->getData(['config', 'analyticsId']) - ]); ?> +
+ +
+
+

Référencement

+
+
+ helper::baseUrl() . 'config/configMetaImage', + 'value' => 'Rafraîchir la capture d\'écran Open Graph' + ]); ?> +
+
+ helper::baseUrl() . 'config/generateFiles', + 'value' => 'Générer sitemap.xml et robots.txt' + ]); ?> +
+
+
+
+ +
-
-
- 'Insérer un script dans "Head"', - 'value' => $headerFile - ]); ?> -
-
- 'Insérer un script dans "Body"', - 'value' => $bodyFile - ]); ?> -
-
-
-
-
-
-
-

Paramètres réseaux

-
-
- 'Type de proxy', - 'selected' => $this->getData(['config', 'proxyType']) - ]); ?> +
+
+
+ +
+

Options avancées

+
+
+ 'Saisissez l\'ID de suivi.', + 'label' => 'Google Analytics', + 'placeholder' => 'UA-XXXXXXXX-X', + 'value' => $this->getData(['config', 'analyticsId']) + ]); ?> +
-
- 'Adresse du proxy', - 'placeholder' => 'cache.proxy.fr', - 'value' => $this->getData(['config', 'proxyUrl']) - ]); ?> +
+
+ 'Insérer un script dans "Head"', + 'value' => $headerFile + ]); ?> +
+
+ 'Insérer un script dans "Body"', + 'value' => $bodyFile + ]); ?> +
-
- 'Port du proxy', - 'placeholder' => '6060', - 'value' => $this->getData(['config', 'proxyPort']) - ]); ?> -
-
-
+
+
-
-
-
-
-

Versions système

-
-
- 'ZwiiCMS', - 'readonly' => true, - 'value' => common::ZWII_VERSION - ]); ?> -
-
- 'Blog', +
+
+
+

Paramètres réseaux

+
+
+ 'Type de proxy', + 'selected' => $this->getData(['config', 'proxyType']) + ]); ?> +
+
+ 'Adresse du proxy', + 'placeholder' => 'cache.proxy.fr', + 'value' => $this->getData(['config', 'proxyUrl']) + ]); ?> +
+
+ 'Port du proxy', + 'placeholder' => '6060', + 'value' => $this->getData(['config', 'proxyPort']) + ]); ?> +
+
+
+
+
+
+
+
+

Versions système

+
+
+ 'ZwiiCMS', 'readonly' => true, - 'value' => blog::BLOG_VERSION - ]); ?> -
-
- 'Form', - 'readonly' => true, - 'value' => form::FORM_VERSION - ]); ?> -
-
- 'Gallery', - 'readonly' => true, - 'value' => gallery::GALLERY_VERSION - ]); ?> -
-
- 'News', - 'readonly' => true, - 'value' => news::NEWS_VERSION - ]); ?> -
-
- 'Redirection', - 'readonly' => true, - 'value' => redirection::REDIRECTION_VERSION - ]); ?> -
-
+ 'value' => common::ZWII_VERSION + ]); ?> +
+
+ 'Blog', + 'readonly' => true, + 'value' => blog::BLOG_VERSION + ]); ?> +
+
+ 'Form', + 'readonly' => true, + 'value' => form::FORM_VERSION + ]); ?> +
+
+ 'Gallery', + 'readonly' => true, + 'value' => gallery::GALLERY_VERSION + ]); ?> +
+
+ 'News', + 'readonly' => true, + 'value' => news::NEWS_VERSION + ]); ?> +
+
+ 'Redirection', + 'readonly' => true, + 'value' => redirection::REDIRECTION_VERSION + ]); ?> +
+
+
diff --git a/core/module/config/view/manage/manage.css b/core/module/config/view/manage/manage.css new file mode 100755 index 00000000..9774521b --- /dev/null +++ b/core/module/config/view/manage/manage.css @@ -0,0 +1,15 @@ +/** + * This file is part of Zwii. + * + * For full copyright and license information, please see the LICENSE + * file that was distributed with this source code. + * + * @author Rémi Jean + * @copyright Copyright (C) 2008-2018, Rémi Jean + * @author Frédéric Tempez + * @copyright Copyright (C) 2018-2020, Frédéric Tempez + * @license GNU General Public License, version 3 + * @link http://zwiicms.com/ + */ + +@import url("core/layout/admin.css"); \ No newline at end of file diff --git a/core/module/config/view/manage/manage.php b/core/module/config/view/manage/manage.php new file mode 100755 index 00000000..679dccc2 --- /dev/null +++ b/core/module/config/view/manage/manage.php @@ -0,0 +1,79 @@ + +
+
+ 'buttonGrey', + 'href' => helper::baseUrl() . 'config', + 'ico' => 'left', + 'value' => 'Retour' + ]); ?> +
+
+
+
+
+

Restauration ou transfert d'un site

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

Conversion des URL après transfert de site

+
+
+ getData(['core', 'baseUrl'])) ) { + $baseUrlValue = 'Pas de donnée dans la sauvegarde'; + $buttonClass = 'disabled'; + } elseif ($this->getData(['core', 'baseUrl']) === '') { + $baseUrlValue = '/'; + $buttonClass = (helper::baseUrl(false,false) !== $this->getData(['core', 'baseUrl']) ) ? '' : 'disabled'; + } else { + $baseUrlValue = $this->getData(['core', 'baseUrl']); + $buttonClass = (helper::baseUrl(false,false) !== $this->getData(['core', 'baseUrl']) ) ? '' : 'disabled'; + } + echo template::text('configManageBaseURLToConvert', [ + 'label' => 'Dossier d\'installation de l\'archive' , + 'value' => $baseUrlValue, + 'readonly' => true, + 'help' => 'Lors de la restauration d\'un backup d\'une version 9.2.10 ou supérieure, l\'URL de base est stockée dans la configuration sinon cette donnée est vide.' + ]); ?> +
+
+ 'Dossier du site actuel', + 'value' => helper::baseUrl(false,false), + 'readonly' => true, + 'help' => 'Dossier du site installé.' + ]); ?> +
+
+ helper::baseUrl() . 'config/updateBaseUrl', + 'class' => $buttonClass, + 'value' => 'convertir' + ]); ?> +
+
+
+
+
+