087 config backup de la v10 WIP
This commit is contained in:
parent
1312de02d8
commit
5e748eb3f2
0
core/class/phpmailer/Exception.class.php
Normal file → Executable file
0
core/class/phpmailer/Exception.class.php
Normal file → Executable file
0
core/class/phpmailer/PHPMailer.class.php
Normal file → Executable file
0
core/class/phpmailer/PHPMailer.class.php
Normal file → Executable file
@ -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 = [];
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
* @author Rémi Jean <remi.jean@outlook.com>
|
||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||
* * @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||
* @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
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -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');
|
||||
}
|
||||
});
|
@ -1,23 +1,38 @@
|
||||
<?php echo template::formOpen('configForm'); ?>
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('configBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl(false),
|
||||
'ico' => 'home',
|
||||
'value' => 'Accueil'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset8">
|
||||
<?php echo template::submit('configSubmit'); ?>
|
||||
<div class="notranslate">
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('configBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl(false),
|
||||
'ico' => 'home',
|
||||
'value' => 'Accueil'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset4">
|
||||
<?php echo template::button('configManageButton', [
|
||||
'href' => helper::baseUrl() . 'config/backup',
|
||||
'value' => 'Sauvegarder',
|
||||
'ico' => 'download'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::button('configManageButton', [
|
||||
'href' => helper::baseUrl() . 'config/manage',
|
||||
'value' => 'Restaurer',
|
||||
'ico' => 'upload'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::submit('configSubmit'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Informations générales</h4>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Informations générales</h4>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<?php
|
||||
$pages = $this->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'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col8">
|
||||
<?php echo template::text('configTitle', [
|
||||
'label' => '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.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col12">
|
||||
<?php echo template::textarea('configMetaDescription', [
|
||||
'label' => 'Description du site',
|
||||
'value' => $this->getData(['config', 'metaDescription']),
|
||||
'help' => 'La description apparaît dans les partages sur les réseaux sociaux.'
|
||||
]); ?>
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col8">
|
||||
<?php echo template::text('configTitle', [
|
||||
'label' => '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.'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo template::textarea('configMetaDescription', [
|
||||
'label' => 'Description du site',
|
||||
'value' => $this->getData(['config', 'metaDescription']),
|
||||
'help' => 'Elle apparaît dans les partages sur les réseaux sociaux.'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Réglages</h4>
|
||||
<div class="row">
|
||||
<div class="col3">
|
||||
<?php echo template::file('configFavicon', [
|
||||
'type' => 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'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Paramètres</h4>
|
||||
<?php $error = helper::urlGetContents('http://zwiicms.com/update/' . common::ZWII_UPDATE_CHANNEL . '/version');?>
|
||||
<?php if ($error !== false) : ?>
|
||||
<?php $error = true; ?>
|
||||
<?php endif;?>
|
||||
<div class="row">
|
||||
<div class="col3">
|
||||
<?php echo template::file('configFavicon', [
|
||||
'type' => 1,
|
||||
'help' => 'Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.',
|
||||
'label' => 'Favicon',
|
||||
'value' => $this->getData(['config', 'favicon'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::file('configFaviconDark', [
|
||||
'type' => 1,
|
||||
'help' => 'Sélectionnez une icône adaptée à un thème sombre.<br>Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.',
|
||||
'label' => 'Favicon thème sombre',
|
||||
'value' => $this->getData(['config', 'faviconDark'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::select('configItemsperPage', $module::$ItemsList, [
|
||||
'label' => 'Articles par page',
|
||||
'selected' => $this->getData(['config', 'itemsperPage']),
|
||||
'help' => 'Modules Blog et News'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::select('configTimezone', $module::$timezones, [
|
||||
'label' => 'Fuseau horaire',
|
||||
'selected' => $this->getData(['config', 'timezone']),
|
||||
'help' => 'Le fuseau horaire est utile au bon référencement'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php $listePageId = array_merge(['' => 'Sélectionner'] , helper::arrayCollumn($this->getData(['page']), 'title', 'SORT_ASC') );
|
||||
?>
|
||||
<?php echo template::select('configLegalPageId', $listePageId , [
|
||||
'label' => 'Mentions légales',
|
||||
'selected' => $this->getData(['config', 'legalPageId']),
|
||||
'help' => 'Les mentions légales sont obligatoires en France'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('configCookieConsent', true, 'Message de consentement aux cookies', [
|
||||
'checked' => $this->getData(['config', 'cookieConsent'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('rewrite', true, 'Réécriture d\'URL', [
|
||||
'checked' => helper::checkRewrite(),
|
||||
'help' => 'Vérifiez d\'abord que votre serveur l\'autorise : ce n\'est pas le cas chez Free.'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Réseaux sociaux</h4>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<?php echo template::text('configSocialFacebookId', [
|
||||
'help' => 'Saisissez votre ID : https://www.facebook.com/[ID].',
|
||||
'label' => 'Facebook',
|
||||
'value' => $this->getData(['config', 'social', 'facebookId'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::text('configSocialInstagramId', [
|
||||
'help' => 'Saisissez votre ID : https://www.instagram.com/[ID].',
|
||||
'label' => 'Instagram',
|
||||
'value' => $this->getData(['config', 'social', 'instagramId'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::text('configSocialTwitterId', [
|
||||
'help' => 'Saisissez votre ID : https://twitter.com/[ID].',
|
||||
'label' => 'Twitter',
|
||||
'value' => $this->getData(['config', 'social', 'twitterId'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<?php echo template::text('configSocialYoutubeId', [
|
||||
'help' => 'ID de la chaîne : https://www.youtube.com/channel/[ID].',
|
||||
'label' => 'Chaîne Youtube',
|
||||
'value' => $this->getData(['config', 'social', 'youtubeId'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::text('configSocialYoutubeUserId', [
|
||||
'help' => 'Saisissez votre ID Utilisateur : https://www.youtube.com/user/[ID].',
|
||||
'label' => 'Youtube',
|
||||
'value' => $this->getData(['config', 'social', 'youtubeUserId'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::text('configSocialPinterestId', [
|
||||
'help' => 'Saisissez votre ID : https://pinterest.com/[ID].',
|
||||
'label' => 'Pinterest',
|
||||
'value' => $this->getData(['config', 'social', 'pinterestId'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col4 offset2">
|
||||
<?php echo template::text('configSocialGithubId', [
|
||||
'help' => 'Saisissez votre ID Github : https://github.com/[ID].',
|
||||
'label' => 'Github',
|
||||
'value' => $this->getData(['config', 'social', 'githubId'])
|
||||
<div class="col6">
|
||||
<?php echo template::select('configItemsperPage', $module::$ItemsList, [
|
||||
'label' => 'Articles par page',
|
||||
'selected' => $this->getData(['config', 'itemsperPage']),
|
||||
'help' => 'Modules Blog et News'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::text('configSocialLinkedinId', [
|
||||
'help' => 'Saisissez votre ID Linkedin : https://fr.linkedin.com/in/[ID].',
|
||||
'label' => 'Linkedin',
|
||||
'value' => $this->getData(['config', 'social', 'linkedinId'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Sauvegardes</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('configAutoBackup', true, 'Sauvegarde automatisée quotidienne partielle', [
|
||||
'checked' => $this->getData(['config', 'autoBackup']),
|
||||
'help' => '<p>Une archive contenant le dossier /site/data est copiée dans le dossier \'site/backup\'. La sauvegarde est conservée pendant 30 jours.</p><p>Le contenu du gestionnaire de fichiers n\'est pas sauvegardé.</p>'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::button('configManageButtonBackup', [
|
||||
'href' => helper::baseUrl() . 'config/backup',
|
||||
'value' => 'Sauvegarde'
|
||||
]); ?>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::select('configTimezone', $module::$timezones, [
|
||||
'label' => 'Fuseau horaire',
|
||||
'selected' => $this->getData(['config', 'timezone']),
|
||||
'help' => 'Le fuseau horaire est utile au bon référencement'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php $listePageId = array_merge(['' => 'Sélectionner'] , helper::arrayCollumn($this->getData(['page']), 'title', 'SORT_ASC') );
|
||||
?>
|
||||
<?php echo template::select('configLegalPageId', $listePageId , [
|
||||
'label' => 'Mentions légales',
|
||||
'selected' => $this->getData(['config', 'legalPageId']),
|
||||
'help' => 'Les mentions légales sont obligatoires en France'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::button('configManageButtonRestore', [
|
||||
'href' => helper::baseUrl() . 'config/restore',
|
||||
'value' => 'Restauration'
|
||||
]); ?>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('configCookieConsent', true, 'Message de consentement aux cookies', [
|
||||
'checked' => $this->getData(['config', 'cookieConsent'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('rewrite', true, 'Réécriture d\'URL', [
|
||||
'checked' => helper::checkRewrite(),
|
||||
'help' => 'Vérifiez d\'abord que votre serveur l\'autorise : ce n\'est pas le cas chez Free.'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::checkbox('configMaintenance', true, 'Site en maintenance', [
|
||||
'checked' => $this->getData(['config', 'maintenance'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Mise à jour</h4>
|
||||
<?php $error = helper::urlGetContents('http://zwiicms.com/update/' . common::ZWII_UPDATE_CHANNEL . '/version');?>
|
||||
<?php if ($error !== false) : ?>
|
||||
<?php $error = true; ?>
|
||||
<?php endif;?>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo 'Vous disposez de ZwiiCMS version <strong>' . common::ZWII_VERSION . '</strong>' . '.'; ?>
|
||||
|
||||
<?php if ($error): ?>
|
||||
<?php echo 'La version de la mise à jour en ligne est <strong>' . helper::urlGetContents('http://zwiicms.com/update/' . common::ZWII_UPDATE_CHANNEL . '/version') . '</strong>' . '.';?>
|
||||
<?php else: ?>
|
||||
<p>Votre configuration interdit les mises à jour automatiques. <a href="https://zwiicms.com" target="_blank">Cliquez sur ce lien</a> pour connaître la version disponible en ligne.</p>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('configAutoUpdate', true, 'Recherche de mise à jour automatisée ', [
|
||||
'checked' => $error ? $this->getData(['config', 'autoUpdate']) : false,
|
||||
'help' => 'Vérification de l\'existence d\'une mise à jour en ligne une fois par jour.',
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('configExportAutoBackup', true, 'Sauvegarde automatique quotidienne', [
|
||||
'checked' => $this->getData(['config', 'autoBackup']),
|
||||
'help' => '<p>Une archive contenant le dossier /site/data est copiée dans le dossier \'site/backup\'. La sauvegarde est conservée pendant 30 jours.</p><p>Les fichiers du site ne sont pas sauvegardés automatiquement.</p>'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('configMaintenance', true, 'Site en maintenance', [
|
||||
'checked' => $this->getData(['config', 'maintenance'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('configAutoUpdate', true, 'Mise à jour automatique', [
|
||||
'checked' => $this->getData(['config', 'autoUpdate']),
|
||||
'help' => 'Vérifie une fois par jour l\'existence d\'une mise à jour.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::button('configUpdateForced', [
|
||||
'href' => helper::baseUrl() . 'install/update',
|
||||
'value' => 'Mise à jour manuelle',
|
||||
'disabled' => !$error
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::button('configUpdateForced', [
|
||||
'href' => helper::baseUrl() . 'install/update',
|
||||
'value' => 'Mise à jour forcée',
|
||||
'disabled' => !$error
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Référencement</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<div class="row">
|
||||
<div class="col10 offset1">
|
||||
<?php echo template::button('configMetaImage', [
|
||||
'href' => helper::baseUrl() . 'config/configMetaImage',
|
||||
'value' => 'Rafraîchir la capture d\'écran Open Graph'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<div class="block">
|
||||
<h4>Réseaux sociaux</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::text('configSocialFacebookId', [
|
||||
'help' => 'Saisissez votre ID : https://www.facebook.com/[ID].',
|
||||
'label' => 'Facebook',
|
||||
'value' => $this->getData(['config', 'social', 'facebookId'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col10 offset1">
|
||||
<?php echo template::button('configSiteMap', [
|
||||
'href' => helper::baseUrl() . 'config/generateFiles',
|
||||
'value' => 'Rafraîchir sitemap.xml et robots.txt'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::text('configSocialInstagramId', [
|
||||
'help' => 'Saisissez votre ID : https://www.instagram.com/[ID].',
|
||||
'label' => 'Instagram',
|
||||
'value' => $this->getData(['config', 'social', 'instagramId'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::text('configSocialYoutubeId', [
|
||||
'help' => 'ID de la chaîne : https://www.youtube.com/channel/[ID].',
|
||||
'label' => 'Chaîne Youtube',
|
||||
'value' => $this->getData(['config', 'social', 'youtubeId'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::text('configSocialYoutubeUserId', [
|
||||
'help' => 'Saisissez votre ID Utilisateur : https://www.youtube.com/user/[ID].',
|
||||
'label' => 'Youtube',
|
||||
'value' => $this->getData(['config', 'social', 'youtubeUserId'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col6 textAlignCenter">
|
||||
<img id="metaImage" src="<?php echo helper::baseUrl(false) . self::FILE_DIR.'source/screenshot.png';?>" data-tippy-content="Cette capture d'écran est nécessaire aux partages sur les réseaux sociaux. Elle est régénérée lorsque le fichier 'screenshot.png' est effacé du gestionnaire de fichiers." />
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::text('configSocialTwitterId', [
|
||||
'help' => 'Saisissez votre ID : https://twitter.com/[ID].',
|
||||
'label' => 'Twitter',
|
||||
'value' => $this->getData(['config', 'social', 'twitterId'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::text('configSocialPinterestId', [
|
||||
'help' => 'Saisissez votre ID : https://pinterest.com/[ID].',
|
||||
'label' => 'Pinterest',
|
||||
'value' => $this->getData(['config', 'social', 'pinterestId'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::text('configSocialLinkedinId', [
|
||||
'help' => 'Saisissez votre ID Linkedin : https://fr.linkedin.com/in/[ID].',
|
||||
'label' => 'Linkedin',
|
||||
'value' => $this->getData(['config', 'social', 'linkedinId'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::text('configSocialGithubId', [
|
||||
'help' => 'Saisissez votre ID Github : https://github.com/[ID].',
|
||||
'label' => 'Github',
|
||||
'value' => $this->getData(['config', 'social', 'githubId'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php
|
||||
// Lire le contenu des fichiers de script
|
||||
$headerFile = "";
|
||||
if (file_exists( self::DATA_DIR . 'head.inc.html')) {
|
||||
$headerFile = file_get_contents (self::DATA_DIR . 'head.inc.html');
|
||||
}
|
||||
$bodyFile = "";
|
||||
if (file_exists( self::DATA_DIR . 'body.inc.html')) {
|
||||
$bodyFile = file_get_contents (self::DATA_DIR . 'body.inc.html');
|
||||
}
|
||||
?>
|
||||
<div class="block">
|
||||
<h4>Options avancées</h4>
|
||||
<div class="row">
|
||||
<div class="col3">
|
||||
<?php echo template::text('configAnalyticsId', [
|
||||
'help' => 'Saisissez l\'ID de suivi.',
|
||||
'label' => 'Google Analytics',
|
||||
'placeholder' => 'UA-XXXXXXXX-X',
|
||||
'value' => $this->getData(['config', 'analyticsId'])
|
||||
]); ?>
|
||||
</div>
|
||||
<!--</div>
|
||||
<div class="row">-->
|
||||
<div class="col6">
|
||||
<div class="block">
|
||||
<h4>Référencement</h4>
|
||||
<div class="row">
|
||||
<div class="col5">
|
||||
<?php echo template::button('configMetaImage', [
|
||||
'href' => helper::baseUrl() . 'config/configMetaImage',
|
||||
'value' => 'Rafraîchir la capture d\'écran Open Graph'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col5 offset2">
|
||||
<?php echo template::button('configSiteMap', [
|
||||
'href' => helper::baseUrl() . 'config/generateFiles',
|
||||
'value' => 'Générer sitemap.xml et robots.txt'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12 textAlignCenter">
|
||||
<img src="<?php echo helper::baseUrl(false) . self::FILE_DIR.'source/screenshot.png';?>" data-tippy-content="Cette capture d'écran est nécessaire aux partages sur les réseaux sociaux. Elle est régénérée lorsque le fichier 'screenshot.png' est effacé du gestionnaire de fichiers." />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::textarea('configScriptHead', [
|
||||
'label' => 'Insérer un script dans "Head"',
|
||||
'value' => $headerFile
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::textarea('configScriptBody', [
|
||||
'label' => 'Insérer un script dans "Body"',
|
||||
'value' => $bodyFile
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Paramètres réseaux</h4>
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::select('configProxyType', $module::$proxyType, [
|
||||
'label' => 'Type de proxy',
|
||||
'selected' => $this->getData(['config', 'proxyType'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php
|
||||
// Lire le contenu des fichiers de script
|
||||
$headerFile = "";
|
||||
if (file_exists( self::DATA_DIR . 'head.inc.html')) {
|
||||
$headerFile = file_get_contents (self::DATA_DIR . 'head.inc.html');
|
||||
}
|
||||
$bodyFile = "";
|
||||
if (file_exists( self::DATA_DIR . 'body.inc.html')) {
|
||||
$bodyFile = file_get_contents (self::DATA_DIR . 'body.inc.html');
|
||||
}
|
||||
?>
|
||||
<div class="block">
|
||||
<h4>Options avancées</h4>
|
||||
<div class="row">
|
||||
<div class="col3">
|
||||
<?php echo template::text('configAnalyticsId', [
|
||||
'help' => 'Saisissez l\'ID de suivi.',
|
||||
'label' => 'Google Analytics',
|
||||
'placeholder' => 'UA-XXXXXXXX-X',
|
||||
'value' => $this->getData(['config', 'analyticsId'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::text('configProxyUrl', [
|
||||
'label' => 'Adresse du proxy',
|
||||
'placeholder' => 'cache.proxy.fr',
|
||||
'value' => $this->getData(['config', 'proxyUrl'])
|
||||
]); ?>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::textarea('configScriptHead', [
|
||||
'label' => 'Insérer un script dans "Head"',
|
||||
'value' => $headerFile
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::textarea('configScriptBody', [
|
||||
'label' => 'Insérer un script dans "Body"',
|
||||
'value' => $bodyFile
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::text('configProxyPort', [
|
||||
'label' => 'Port du proxy',
|
||||
'placeholder' => '6060',
|
||||
'value' => $this->getData(['config', 'proxyPort'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Versions système</h4>
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::text('configVersion', [
|
||||
'label' => 'ZwiiCMS',
|
||||
'readonly' => true,
|
||||
'value' => common::ZWII_VERSION
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::text('moduleBlogVersion', [
|
||||
'label' => 'Blog',
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Paramètres réseaux</h4>
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::select('configProxyType', $module::$proxyType, [
|
||||
'label' => 'Type de proxy',
|
||||
'selected' => $this->getData(['config', 'proxyType'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col8">
|
||||
<?php echo template::text('configProxyUrl', [
|
||||
'label' => 'Adresse du proxy',
|
||||
'placeholder' => 'cache.proxy.fr',
|
||||
'value' => $this->getData(['config', 'proxyUrl'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::text('configProxyPort', [
|
||||
'label' => 'Port du proxy',
|
||||
'placeholder' => '6060',
|
||||
'value' => $this->getData(['config', 'proxyPort'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Versions système</h4>
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::text('configVersion', [
|
||||
'label' => 'ZwiiCMS',
|
||||
'readonly' => true,
|
||||
'value' => blog::BLOG_VERSION
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::text('moduleFormVersion', [
|
||||
'label' => 'Form',
|
||||
'readonly' => true,
|
||||
'value' => form::FORM_VERSION
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::text('moduleGalleryVersion', [
|
||||
'label' => 'Gallery',
|
||||
'readonly' => true,
|
||||
'value' => gallery::GALLERY_VERSION
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::text('moduleNewsVersion', [
|
||||
'label' => 'News',
|
||||
'readonly' => true,
|
||||
'value' => news::NEWS_VERSION
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::text('moduleRedirectionVersion', [
|
||||
'label' => 'Redirection',
|
||||
'readonly' => true,
|
||||
'value' => redirection::REDIRECTION_VERSION
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
'value' => common::ZWII_VERSION
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::text('moduleBlogVersion', [
|
||||
'label' => 'Blog',
|
||||
'readonly' => true,
|
||||
'value' => blog::BLOG_VERSION
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::text('moduleFormVersion', [
|
||||
'label' => 'Form',
|
||||
'readonly' => true,
|
||||
'value' => form::FORM_VERSION
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::text('moduleGalleryVersion', [
|
||||
'label' => 'Gallery',
|
||||
'readonly' => true,
|
||||
'value' => gallery::GALLERY_VERSION
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::text('moduleNewsVersion', [
|
||||
'label' => 'News',
|
||||
'readonly' => true,
|
||||
'value' => news::NEWS_VERSION
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::text('moduleRedirectionVersion', [
|
||||
'label' => 'Redirection',
|
||||
'readonly' => true,
|
||||
'value' => redirection::REDIRECTION_VERSION
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
15
core/module/config/view/manage/manage.css
Executable file
15
core/module/config/view/manage/manage.css
Executable file
@ -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 <remi.jean@outlook.com>
|
||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||
* @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");
|
79
core/module/config/view/manage/manage.php
Executable file
79
core/module/config/view/manage/manage.php
Executable file
@ -0,0 +1,79 @@
|
||||
<?php echo template::formOpen('configManageForm'); ?>
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('configManageBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . 'config',
|
||||
'ico' => 'left',
|
||||
'value' => 'Retour'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Restauration ou transfert d'un site</h4>
|
||||
<div class="row">
|
||||
<?php echo template::file('configManageImportFile', [
|
||||
'label' => '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.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="row">
|
||||
<?php echo template::checkbox('configManageImportUser', true, 'Préserver les comptes des utilisateurs déjà installés', [
|
||||
'checked' => true
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4 offset4">
|
||||
<?php echo template::submit('configManageSubmit',[
|
||||
'value' => 'Restaurer'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Conversion des URL après transfert de site</h4>
|
||||
<div class="row">
|
||||
<div class="col5">
|
||||
<?php
|
||||
if (is_null($this->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.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col5">
|
||||
<?php echo template::text('configManageCurrentURL', [
|
||||
'label' => 'Dossier du site actuel',
|
||||
'value' => helper::baseUrl(false,false),
|
||||
'readonly' => true,
|
||||
'help' => 'Dossier du site installé.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 verticalAlignBottom">
|
||||
<?php echo template::button('configManageUpdateBaseURLButton', [
|
||||
'href' => helper::baseUrl() . 'config/updateBaseUrl',
|
||||
'class' => $buttonClass,
|
||||
'value' => 'convertir'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
Loading…
Reference in New Issue
Block a user