Merge branch '10603'

This commit is contained in:
Fred Tempez 2021-06-19 08:29:02 +02:00
commit cc925bcc2f
245 changed files with 119 additions and 86 deletions

28
.gitignore vendored
View File

@ -1,23 +1,5 @@
# Fichiers temporaires # Fichiers du site
site/tmp/*.zip site/*
site/tmp/*.gz
site/tmp/*.png
# Sauvegardes
site/backup/*
# Fichiers de données
site/data/*
site/data/*.json
site/data/*.css
site/data/fr/*.json
site/data/fr/*.back
site/data/*.back
# Fichiers uploadés
site/file/source/
site/file/thumb/
# Dossiers vides dans GitHub # Dossiers vides dans GitHub
!.gitkeep !.gitkeep
@ -37,9 +19,3 @@ sitemap.xml
robots.txt robots.txt
site/data/journal.log site/data/journal.log
.DS_Store .DS_Store
site/.DS_Store
site/file/.DS_Store
site/data/es/
site/data/en/
site/data/de/
site/data/modules/*

0
.htaccess Executable file → Normal file
View File

View File

@ -1,5 +1,12 @@
# Changelog # 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.
- Modifications :
- Installation : livraison des fichiers de thème du site de test dans une archive afin de ne plus différencier les archives d'installation et de mise à jour.
- Mises à jour : les mises à jour s'effectue à partir de la forge plutôt que sur le site zwiicms.fr
## version 10.6.02 ## version 10.6.02
- Correction : - Correction :
- Débordement lors du téléchargement des fichiers journaux. - Débordement lors du téléchargement des fichiers journaux.

View File

@ -1,5 +1,5 @@
# ZwiiCMS 10.6.02 # ZwiiCMS 10.6.03
Zwii est un CMS sans base de données (flat-file) qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation. Zwii est un CMS sans base de données (flat-file) qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation.

0
core/class/.htaccess Executable file → Normal file
View File

0
core/class/autoload.php Executable file → Normal file
View File

2
core/class/helper.class.php Executable file → Normal file
View File

@ -261,7 +261,7 @@ class helper {
* @return string * @return string
*/ */
public static function getOnlineVersion() { public static function getOnlineVersion() {
return (helper::urlGetContents('http://zwiicms.fr/update/'. common::ZWII_UPDATE_CHANNEL . '/version')); return (helper::urlGetContents(common::ZWII_UPDATE_URL . common::ZWII_UPDATE_CHANNEL . '/version'));
} }

0
core/class/jsondb/Dot.class.php Executable file → Normal file
View File

0
core/class/jsondb/JsonDb.class.php Executable file → Normal file
View File

0
core/class/phpmailer/.htaccess Executable file → Normal file
View File

0
core/class/phpmailer/Exception.class.php Executable file → Normal file
View File

0
core/class/phpmailer/PHPMailer.class.php Executable file → Normal file
View File

0
core/class/phpmailer/SMTP.class.php Executable file → Normal file
View File

0
core/class/sitemap/FileSystem.class.php Executable file → Normal file
View File

0
core/class/sitemap/Runtime.class.php Executable file → Normal file
View File

0
core/class/sitemap/SitemapGenerator.class.php Executable file → Normal file
View File

0
core/class/template.class.php Executable file → Normal file
View File

0
core/core.js.php Executable file → Normal file
View File

5
core/core.php Executable file → Normal file
View File

@ -44,7 +44,8 @@ class common {
const ACCESS_TIMER = 1800; const ACCESS_TIMER = 1800;
// Numéro de version // Numéro de version
const ZWII_VERSION = '10.6.02'; const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/';
const ZWII_VERSION = '10.6.03';
const ZWII_UPDATE_CHANNEL = "v10"; const ZWII_UPDATE_CHANNEL = "v10";
public static $actions = []; public static $actions = [];
@ -3053,7 +3054,7 @@ class layout extends common {
foreach($vendorFiles as $vendorFile) { foreach($vendorFiles as $vendorFile) {
switch(pathinfo($vendorFile, PATHINFO_EXTENSION)) { switch(pathinfo($vendorFile, PATHINFO_EXTENSION)) {
case 'css': case 'css':
// Force le rechargement lors d'une mise à jour² du jeu d'icônes // Force le rechargement lors d'une mise à jour du jeu d'icônes
$reload = $vendorPath === 'core/vendor/zwiico/' $reload = $vendorPath === 'core/vendor/zwiico/'
? '?' . md5_file('core/vendor/zwiico/css/zwiico-codes.css') ? '?' . md5_file('core/vendor/zwiico/css/zwiico-codes.css')
: ''; : '';

0
core/layout/blank.php Executable file → Normal file
View File

View File

@ -691,36 +691,64 @@ li .menuSideChild {
/* Container des drapeaux */ /* Container des drapeaux */
#i18nContainer {
z-index: 100; #i18nContainerNav, #i18nContainerSite {
position: relative ; position: relative ;
float: right; float: right;
width: auto; /*width: auto;
height: auto; height: auto;
margin-top: -25px; margin-top: -25px;*/
} }
#i18nContainer ul { #i18nContainerNav ul, #i18nContainerSite ul {
list-style: none; list-style: none;
} }
#i18nContainer li { #i18nContainerNav li, #i18nContainerSite li {
display: inline-block; display: inline-block;
position: relative; position: relative;
} }
#i18nContainer img { #i18nFlag {
width: 80%; width: 70%;
}
#i18nFlagSelected {
width: 100%;
} }
/*
* Position du bloc dans le site sur les petits écrans
*/
#i18nContainerNav {
#i18nContainer img { display: block;
margin: 2px; }
#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;
}
}
@ -1031,6 +1059,7 @@ footer #footerSocials .zwiico-github:hover {
user-select: none; user-select: none;
} }
/* Lightbox */ /* Lightbox */
.lightbox { .lightbox {
background: #FFF; background: #FFF;
@ -1710,3 +1739,7 @@ th.col12 {
border-radius: 5px; border-radius: 5px;
z-index: 30; z-index: 30;
} }
.helpDisplayButton {
cursor: pointer;
}

0
core/layout/light.php Executable file → Normal file
View File

0
core/layout/mail.php Executable file → Normal file
View File

0
core/layout/main.php Executable file → Normal file
View File

View File

@ -1,5 +1,5 @@
<h3>IMPORTER OU METTRE A JOUR</h3> <h3>IMPORTER OU METTRE A JOUR</h3>
<p>Vous avez au préalable charger le fichier zip du module sur votre serveur par 'Gérer les fichiers'.</p> <p>Vous avez au préalable chargé le fichier zip du module sur votre serveur par 'Gérer les fichiers'.</p>
<p>Lors d'une mise à jour Zwii contrôle la version du module à installer, pour réinstaller un module de même numéro de version vous devez cocher 'Mise à jour forcée'. <p>Lors d'une mise à jour Zwii contrôle la version du module à installer, pour réinstaller un module de même numéro de version vous devez cocher 'Mise à jour forcée'.
Il est déconseillé d'installer un module plus ancien.</p> Il est déconseillé d'installer un module plus ancien.</p>
<h3>EXPORTER IMPORTER</h3> <h3>EXPORTER IMPORTER</h3>

0
core/module/config/config.php Executable file → Normal file
View File

View File

@ -42,7 +42,7 @@
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4>Réglages</h4> <h4>Réglages</h4>
<?php $error = helper::urlGetContents('http://zwiicms.fr/update/' . common::ZWII_UPDATE_CHANNEL . '/version');?> <?php $error = helper::urlGetContents(common::ZWII_UPDATE_URL . common::ZWII_UPDATE_CHANNEL . '/version');?>
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::file('configAdvancedFavicon', [ <?php echo template::file('configAdvancedFavicon', [

0
core/module/config/view/backup/backup.js.php Executable file → Normal file
View File

2
core/module/config/view/backup/backup.php Executable file → Normal file
View File

@ -18,7 +18,7 @@
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4>Paramètre</h4> <h4>Paramètres de la sauvegarde</h4>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php echo template::checkbox('configBackupOption', true, 'Inclure le contenu du gestionnaire de fichiers', [ <?php echo template::checkbox('configBackupOption', true, 'Inclure le contenu du gestionnaire de fichiers', [

0
core/module/config/view/index/index.php Executable file → Normal file
View File

0
core/module/config/view/manage/manage.php Executable file → Normal file
View File

0
core/module/config/view/script/script.php Executable file → Normal file
View File

46
core/module/install/install.php Executable file → Normal file
View File

@ -81,19 +81,7 @@ class install extends common {
'<strong>Identifiant du compte :</strong> ' . $this->getInput('installId') . '<br>', '<strong>Identifiant du compte :</strong> ' . $this->getInput('installId') . '<br>',
null null
); );
// Créer les dossiers // Installation du site de test
if (!is_dir(self::FILE_DIR.'source/banniere/')) {
mkdir(self::FILE_DIR.'source/banniere/');}
if (!is_dir(self::FILE_DIR.'thumb/banniere/')) {
mkdir(self::FILE_DIR.'thumb/banniere/');
}
// Copier les fichiers
copy('core/module/install/ressource/file/source/banniere960.jpg',self::FILE_DIR.'source/banniere/banniere960.jpg');
copy('core/module/install/ressource/file/thumb/banniere960.jpg',self::FILE_DIR.'thumb/banniere/banniere960.jpg');
// Copie des icônes
copy('core/module/install/ressource/file/source/favicon.ico',self::FILE_DIR.'source/favicon.ico');
copy('core/module/install/ressource/file/source/faviconDark.ico',self::FILE_DIR.'source/faviconDark.ico');
// Configure certaines données par défaut
if ($this->getInput('installDefaultData',helper::FILTER_BOOLEAN) === FALSE) { if ($this->getInput('installDefaultData',helper::FILTER_BOOLEAN) === FALSE) {
$this->initData('page','fr',true); $this->initData('page','fr',true);
$this->initData('module','fr',true); $this->initData('module','fr',true);
@ -101,6 +89,25 @@ class install extends common {
$this->setData(['module', 'blog', 'posts', 'mon-deuxieme-article', 'userId', $userId]); $this->setData(['module', 'blog', 'posts', 'mon-deuxieme-article', 'userId', $userId]);
$this->setData(['module', 'blog', 'posts', 'mon-troisieme-article', 'userId', $userId]); $this->setData(['module', 'blog', 'posts', 'mon-troisieme-article', 'userId', $userId]);
} }
// Images exemples livrées dans tous les cas
try {
// Décompression dans le dossier de fichier temporaires
if (file_exists(self::TEMP_DIR . 'files.tar.gz')) {
unlink(self::TEMP_DIR . 'files.tar.gz');
}
if (file_exists(self::TEMP_DIR . 'files.tar')) {
unlink(self::TEMP_DIR . 'files.tar');
}
copy('core/module/install/ressource/files.tar.gz', self::TEMP_DIR . 'files.tar.gz');
$pharData = new PharData(self::TEMP_DIR . 'files.tar.gz');
$pharData->decompress();
// Installation
$pharData->extractTo(__DIR__ . '/../../../', null, true);
} catch (Exception $e) {
$success = $e->getMessage();
}
unlink(self::TEMP_DIR . 'files.tar.gz');
unlink(self::TEMP_DIR . 'files.tar');
// Stocker le dossier d'installation // Stocker le dossier d'installation
$this->setData(['core', 'baseUrl', helper::baseUrl(false,false) ]); $this->setData(['core', 'baseUrl', helper::baseUrl(false,false) ]);
// Créer sitemap // Créer sitemap
@ -108,8 +115,8 @@ class install extends common {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl(false), 'redirect' => helper::baseUrl(false),
'notification' => ($sent === true ? 'Installation terminée' : $sent), 'notification' => $sent === true ? 'Installation terminée' : $sent,
'state' => ($sent === true ? true : null) 'state' => ($sent === true && $success === true) ? true : null
]); ]);
} }
} }
@ -158,7 +165,10 @@ class install extends common {
// Téléchargement // Téléchargement
case 2: case 2:
// Téléchargement depuis le serveur de Zwii // Téléchargement depuis le serveur de Zwii
$success = (file_put_contents(self::TEMP_DIR.'update.tar.gz', helper::urlGetContents('https://zwiicms.fr/update/' . common::ZWII_UPDATE_CHANNEL . '/update.tar.gz')) !== false); //$success = (file_put_contents(self::TEMP_DIR.'update.tar.gz', helper::urlGetContents('https://zwiicms.fr/update/' . common::ZWII_UPDATE_CHANNEL . '/update.tar.gz')) !== false);
// URL sur le git
//$newVersion = helper::urlGetContents('https://zwiicms.fr/update/' . common::ZWII_UPDATE_CHANNEL . '/version');
$success = (file_put_contents(self::TEMP_DIR.'update.tar.gz', helper::urlGetContents(common::ZWII_UPDATE_URL . common::ZWII_UPDATE_CHANNEL . '/update.tar.gz')) !== false);
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'display' => self::DISPLAY_JSON, 'display' => self::DISPLAY_JSON,
@ -244,7 +254,7 @@ class install extends common {
*/ */
public function update() { public function update() {
// Nouvelle version // Nouvelle version
self::$newVersion = helper::urlGetContents('http://zwiicms.com/update/' . common::ZWII_UPDATE_CHANNEL . '/version'); self::$newVersion = helper::urlGetContents(common::ZWII_UPDATE_URL . common::ZWII_UPDATE_CHANNEL . '/version');
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'display' => self::DISPLAY_LAYOUT_LIGHT, 'display' => self::DISPLAY_LAYOUT_LIGHT,
@ -254,4 +264,4 @@ class install extends common {
} }
} }

0
core/module/install/ressource/.htaccess Executable file → Normal file
View File

2
core/module/install/ressource/defaultdata.php Executable file → Normal file
View File

@ -139,7 +139,7 @@ class init extends common {
'fontSize' => '2em', 'fontSize' => '2em',
'fontWeight' => 'normal', 'fontWeight' => 'normal',
'height' => '150px', 'height' => '150px',
'image' => 'banniere/zwii_banniere_norvege-960px.jpg', 'image' => 'banniere960.jpg',
'imagePosition' => 'center center', 'imagePosition' => 'center center',
'imageRepeat' => 'no-repeat', 'imageRepeat' => 'no-repeat',
'margin' => false, 'margin' => false,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

0
core/module/install/view/index/index.js.php Executable file → Normal file
View File

0
core/module/install/view/index/index.php Executable file → Normal file
View File

0
core/module/install/view/update/update.js.php Executable file → Normal file
View File

0
core/module/install/view/update/update.php Executable file → Normal file
View File

0
core/module/maintenance/maintenance.php Executable file → Normal file
View File

0
core/module/maintenance/view/index/index.php Executable file → Normal file
View File

4
core/module/page/page.php Executable file → Normal file
View File

@ -88,6 +88,8 @@ class page extends common {
// Duplication de la page // Duplication de la page
$pageTitle = $this->getData(['page',$url[0],'title']); $pageTitle = $this->getData(['page',$url[0],'title']);
$pageId = helper::increment(helper::filter($pageTitle, helper::FILTER_ID), $this->getData(['page'])); $pageId = helper::increment(helper::filter($pageTitle, helper::FILTER_ID), $this->getData(['page']));
$pageId = helper::increment($pageId, self::$coreModuleIds);
$pageId = helper::increment($pageId, self::$moduleIds);
$data = $this->getData([ $data = $this->getData([
'page', 'page',
$url[0] $url[0]
@ -399,7 +401,7 @@ class page extends common {
'typeMenu' => $this->getinput('pageTypeMenu'), 'typeMenu' => $this->getinput('pageTypeMenu'),
'iconUrl' => $this->getinput('pageIconUrl'), 'iconUrl' => $this->getinput('pageIconUrl'),
'disable'=> $this->getinput('pageEditDisable', helper::FILTER_BOOLEAN), 'disable'=> $this->getinput('pageEditDisable', helper::FILTER_BOOLEAN),
'content' => (empty($this->getInput('pageEditContent', null)) ? '<p>&nbsp;</p>' : $this->getInput('pageEditContent', null)), 'content' => (empty($this->getInput('pageEditContent', null)) ? '<p></p>' : str_replace('<p></p>', '<p>&nbsp;</p>', $this->getInput('pageEditContent', null))),
'hideTitle' => $hideTitle, 'hideTitle' => $hideTitle,
'breadCrumb' => $this->getInput('pageEditbreadCrumb', helper::FILTER_BOOLEAN), 'breadCrumb' => $this->getInput('pageEditbreadCrumb', helper::FILTER_BOOLEAN),
'metaDescription' => $this->getInput('pageEditMetaDescription', helper::FILTER_STRING_LONG), 'metaDescription' => $this->getInput('pageEditMetaDescription', helper::FILTER_STRING_LONG),

0
core/module/page/view/edit/edit.js.php Executable file → Normal file
View File

0
core/module/page/view/edit/edit.php Executable file → Normal file
View File

0
core/module/sitemap/sitemap.php Executable file → Normal file
View File

0
core/module/sitemap/view/index/index.php Executable file → Normal file
View File

0
core/module/theme/theme.php Executable file → Normal file
View File

0
core/module/theme/view/admin/admin.js.php Executable file → Normal file
View File

0
core/module/theme/view/admin/admin.php Executable file → Normal file
View File

0
core/module/theme/view/advanced/advanced.js.php Executable file → Normal file
View File

0
core/module/theme/view/advanced/advanced.php Executable file → Normal file
View File

0
core/module/theme/view/body/body.js.php Executable file → Normal file
View File

0
core/module/theme/view/body/body.php Executable file → Normal file
View File

0
core/module/theme/view/footer/footer.js.php Executable file → Normal file
View File

0
core/module/theme/view/footer/footer.php Executable file → Normal file
View File

0
core/module/theme/view/header/header.js.php Executable file → Normal file
View File

0
core/module/theme/view/header/header.php Executable file → Normal file
View File

0
core/module/theme/view/index/index.js.php Executable file → Normal file
View File

0
core/module/theme/view/index/index.php Executable file → Normal file
View File

0
core/module/theme/view/manage/manage.js.php Executable file → Normal file
View File

0
core/module/theme/view/manage/manage.php Executable file → Normal file
View File

0
core/module/theme/view/menu/menu.js.php Executable file → Normal file
View File

0
core/module/theme/view/menu/menu.php Executable file → Normal file
View File

0
core/module/theme/view/site/site.js.php Executable file → Normal file
View File

0
core/module/theme/view/site/site.php Executable file → Normal file
View File

0
core/module/user/ressource/.htaccess Executable file → Normal file
View File

0
core/module/user/user.php Executable file → Normal file
View File

0
core/module/user/view/add/add.js.php Executable file → Normal file
View File

0
core/module/user/view/add/add.php Executable file → Normal file
View File

0
core/module/user/view/edit/edit.js.php Executable file → Normal file
View File

0
core/module/user/view/edit/edit.php Executable file → Normal file
View File

0
core/module/user/view/forgot/forgot.php Executable file → Normal file
View File

0
core/module/user/view/import/import.php Executable file → Normal file
View File

0
core/module/user/view/index/index.js.php Executable file → Normal file
View File

0
core/module/user/view/index/index.php Executable file → Normal file
View File

0
core/module/user/view/login/login.php Executable file → Normal file
View File

0
core/module/user/view/reset/reset.php Executable file → Normal file
View File

0
core/vendor/filemanager/UploadHandler.php vendored Executable file → Normal file
View File

0
core/vendor/filemanager/ajax_calls.php vendored Executable file → Normal file
View File

0
core/vendor/filemanager/config/.htaccess vendored Executable file → Normal file
View File

0
core/vendor/filemanager/config/config.php vendored Executable file → Normal file
View File

0
core/vendor/filemanager/dialog.php vendored Executable file → Normal file
View File

0
core/vendor/filemanager/execute.php vendored Executable file → Normal file
View File

0
core/vendor/filemanager/force_download.php vendored Executable file → Normal file
View File

0
core/vendor/filemanager/include/FtpClient.php vendored Executable file → Normal file
View File

0
core/vendor/filemanager/include/FtpException.php vendored Executable file → Normal file
View File

0
core/vendor/filemanager/include/FtpWrapper.php vendored Executable file → Normal file
View File

0
core/vendor/filemanager/include/Response.php vendored Executable file → Normal file
View File

0
core/vendor/filemanager/include/ftp_class.php vendored Executable file → Normal file
View File

0
core/vendor/filemanager/include/mime_type_lib.php vendored Executable file → Normal file
View File

0
core/vendor/filemanager/include/php_image_magician.php vendored Executable file → Normal file
View File

0
core/vendor/filemanager/include/utils.php vendored Executable file → Normal file
View File

0
core/vendor/filemanager/index.php vendored Executable file → Normal file
View File

0
core/vendor/filemanager/lang/az_AZ.php vendored Executable file → Normal file
View File

0
core/vendor/filemanager/lang/bg_BG.php vendored Executable file → Normal file
View File

Some files were not shown because too many files have changed in this diff Show More