diff --git a/README.md b/README.md index 930b9c8d..fa82bbbf 100755 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Zwii est un CMS sans base de données (flat-file) qui permet de créer et gérer ZwiiCMS a été créé par un développeur de talent, [Rémi Jean](https://remijean.fr/). Il est désormais maintenu par Frédéric Tempez. -[Site](http://zwiicms.com/) - [Forum](http://forum.zwiicms.com/) - [Version initiale](https://github.com/remijean/ZwiiCMS/) - [GitHub](https://github.com/fredtempez/ZwiiCMS) +[Site](http://zwiicms.fr/) - [Forum](http://forum.zwiicms.com/) - [Version initiale](https://github.com/remijean/ZwiiCMS/) - [GitHub](https://github.com/fredtempez/ZwiiCMS) ## Configuration recommandée @@ -15,7 +15,7 @@ ZwiiCMS a été créé par un développeur de talent, [Rémi Jean](https://remij ## Téléchargement de ZwiICMS -Pour télécharger la dernière version publiée, il faut vous rendre sur la page de téléchargemet du [site](https://zwiicms.com/telechargements) +Pour télécharger la dernière version publiée, il faut vous rendre sur la page de téléchargemet du [site](https://zwiicms.fr/telechargements) La version github est une **version de développement** qui peut encore contenir des bugs mais elle vous permet de tester les dernières nouveautés. Cette version n'est pas recommandée en production. diff --git a/core/class/template.class.php b/core/class/template.class.php index f7384a10..d8f8f6d8 100644 --- a/core/class/template.class.php +++ b/core/class/template.class.php @@ -46,13 +46,15 @@ class template { 'help' => '', 'id' => $nameId, 'name' => $nameId, - 'value' => '' + 'value' => '', + 'limit' => false ], $attributes); // Génère deux nombres pour le captcha $numbers = array(0,1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20); $letters = array('u','t','s','r','q','p','o','n','m','l','k','j','i','h','g','f','e','d','c','b','a'); - $firstNumber = rand ( 0 , count($letters)-1 ); - $secondNumber = rand ( 0 , count($letters)-1 ); + $limit = $attributes['limit'] ? 9 : count($letters)-1 ; + $firstNumber = rand ( 0 , $limit ); + $secondNumber = rand ( 0 , $limit ); $result = $firstNumber + $secondNumber; $result = password_hash($result, PASSWORD_BCRYPT); $firstLetter = uniqid(); diff --git a/core/core.php b/core/core.php index 9318e597..6a731fa7 100644 --- a/core/core.php +++ b/core/core.php @@ -1270,7 +1270,7 @@ class common { } } // Contrôle des options php.ini pour la mise à jour auto - if (helper::urlGetContents('http://zwiicms.com/update/' . common::ZWII_UPDATE_CHANNEL . '/version') === false) { + if (helper::urlGetContents('http://zwiicms.fr/update/' . common::ZWII_UPDATE_CHANNEL . '/version') === false) { $this->setData(['config','autoUpdate',false]); } @@ -1470,6 +1470,12 @@ class common { } $this->setData(['core', 'dataVersion', 10400]); } + // Version 10.3.03 + if ($this->getData(['core', 'dataVersion']) < 10303) { + // Activation par défaut du captcha à la connexion + $this->setData(['config', 'connect','captcha10', false]); + $this->setData(['core', 'dataVersion', 10303]); + } } } diff --git a/core/module/config/config.php b/core/module/config/config.php index 835490eb..b97d1481 100644 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -275,7 +275,7 @@ class config extends common { public function configMetaImage() { // fonction désactivée pour un site local if ( strpos(helper::baseUrl(false),'localhost') > 0 OR strpos(helper::baseUrl(false),'127.0.0.1') > 0) { - $site = 'https://zwiicms.com/'; } else { + $site = 'https://zwiicms.fr/'; } else { $site = helper::baseUrl(false); } $success= false; @@ -484,7 +484,8 @@ class config extends common { 'attempt' => $this->getInput('configConnectAttempt',helper::FILTER_INT), 'timeout' => $this->getInput('configConnectTimeout',helper::FILTER_INT), 'log' => $this->getInput('configConnectLog',helper::FILTER_BOOLEAN), - 'captcha' => $this->getInput('configConnectCaptcha',helper::FILTER_BOOLEAN) + 'captcha' => $this->getInput('configConnectCaptcha',helper::FILTER_BOOLEAN), + 'captcha10' => $this->getInput('configConnectCaptcha10',helper::FILTER_BOOLEAN) ] ] ]); diff --git a/core/module/config/view/index/index.php b/core/module/config/view/index/index.php index 48a01632..c7185031 100644 --- a/core/module/config/view/index/index.php +++ b/core/module/config/view/index/index.php @@ -60,7 +60,7 @@

Paramètres généraux

- +
+
+
+
+

Sécurité de la connexion +
+ +
+

+
+
+
+ 'Connexions successives', + 'selected' => $this->getData(['config', 'connect', 'attempt']) + ]); ?> +
+
+ 'Blocage après échecs', + 'selected' => $this->getData(['config', 'connect', 'timeout']) + ]); ?> +
+
+ + helper::baseUrl() . 'config/blacklistDownload', + 'value' => 'Télécharger liste noire', + 'ico' => 'download' + ]); ?> +
+
+ 'buttonRed', + 'href' => helper::baseUrl() . 'config/blacklistReset', + 'value' => 'Réinitialiser liste', + 'ico' => 'cancel' + ]); ?> +
+
+
+
+ $this->getData(['config', 'connect','captcha']) + ]); ?> +
+
+ $this->getData(['config', 'connect','captcha10']) + ]); ?> +
+
+
+
+
+
+
+
+
+

Journalisation +
+ +
+

+
+
+
+ $this->getData(['config', 'connect', 'log']) + ]); ?> +
+
+ helper::baseUrl() . 'config/logDownload', + 'value' => 'Télécharger journal', + 'ico' => 'download' + ]); ?> +
+
+ 'buttonRed', + 'href' => helper::baseUrl() . 'config/logReset', + 'value' => 'Réinitialiser journal', + 'ico' => 'cancel' + ]); ?> +
+
+
+
+
+
@@ -452,102 +553,6 @@
-
-
-
-

Sécurité de la connexion -
- -
-

-
-
-
- 'Connexions successives', - 'selected' => $this->getData(['config', 'connect', 'attempt']) - ]); ?> -
-
- 'Blocage après échecs', - 'selected' => $this->getData(['config', 'connect', 'timeout']) - ]); ?> -
-
- - helper::baseUrl() . 'config/blacklistDownload', - 'value' => 'Télécharger liste noire', - 'ico' => 'download' - ]); ?> -
-
- 'buttonRed', - 'href' => helper::baseUrl() . 'config/blacklistReset', - 'value' => 'Réinitialiser liste', - 'ico' => 'cancel' - ]); ?> -
-
-
-
- $this->getData(['config', 'connect','captcha']) - ]); ?> -
-
-
-
-
-
-
-
-
-

Journalisation -
- -
-

-
-
-
- $this->getData(['config', 'connect', 'log']) - ]); ?> -
-
- helper::baseUrl() . 'config/logDownload', - 'value' => 'Télécharger journal', - 'ico' => 'download' - ]); ?> -
-
- 'buttonRed', - 'href' => helper::baseUrl() . 'config/logReset', - 'value' => 'Réinitialiser journal', - 'ico' => 'cancel' - ]); ?> -
-
-
-
-
-
diff --git a/core/module/install/install.php b/core/module/install/install.php index 2028877b..e3479ee8 100644 --- a/core/module/install/install.php +++ b/core/module/install/install.php @@ -158,7 +158,7 @@ class install extends common { // Téléchargement case 2: // Téléchargement depuis le serveur de Zwii - $success = (file_put_contents(self::TEMP_DIR.'update.tar.gz', helper::urlGetContents('https://zwiicms.com/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); // Valeurs en sortie $this->addOutput([ 'display' => self::DISPLAY_JSON, diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php index e0e42f5b..dabad596 100644 --- a/core/module/install/ressource/defaultdata.php +++ b/core/module/install/ressource/defaultdata.php @@ -488,7 +488,7 @@ class init extends common {

Article 1 : Les mentions légales

L’édition et la direction de la publication du site www.site.com est assurée par John Doe, domicilié 1 rue de Paris - 75016 PARIS.

Numéro de téléphone est 0102030405

-

Adresse e-mail john.doe@zwiicms.com.

+

Adresse e-mail john.doe@zwiicms.fr.

L\'hébergeur du site www.site.com est la société Nom de l\'hébergeur, dont le siège social est situé au 12 rue de Lyon - 69001 Lyon, avec le numéro de téléphone : 0401020305.

ARTICLE 2 : Accès au site

Le site www.site.com permet à l\'Utilisateur un accès gratuit aux services suivants :

@@ -743,7 +743,7 @@ class init extends common { ] ], 'site-de-zwii' => [ - 'url' => 'https://zwiicms.com/', + 'url' => 'https://zwiicms.fr/', 'count' => 0 ], 'contact' => [ diff --git a/core/module/user/view/login/login.php b/core/module/user/view/login/login.php index c68ad1ab..a7219ce6 100644 --- a/core/module/user/view/login/login.php +++ b/core/module/user/view/login/login.php @@ -15,7 +15,9 @@ getData(['config', 'connect','captcha'])): ?>
- + $this->getData(['config','connect','captcha10']) + ]); ?>
diff --git a/module/blog/view/article/article.php b/module/blog/view/article/article.php index b8217051..2d95f295 100644 --- a/module/blog/view/article/article.php +++ b/module/blog/view/article/article.php @@ -78,8 +78,10 @@
getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')): ?>
-
- +
+ $this->getData(['config','connect','captcha10']) + ]); ?>
diff --git a/module/form/view/index/index.php b/module/form/view/index/index.php index ebf58f15..02b082e2 100644 --- a/module/form/view/index/index.php +++ b/module/form/view/index/index.php @@ -46,7 +46,9 @@ getData(['module', $this->getUrl(0), 'config', 'captcha'])): ?>
- + $this->getData(['config','connect','captcha10']) + ]); ?>