From d002399028dc268c16c61d28a60f083f3fbc6c30 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Mon, 24 Apr 2023 01:42:23 +0200 Subject: [PATCH] release 1.2 --- CHANGELOG.md | 11 +++++++++++ README.md | 4 ++-- _define.php | 13 ++++++++----- dcstore.xml | 6 +++--- locales/fr/main.lang.php | 28 +++++++++++++++------------- 5 files changed, 39 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9200047..502e0a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +1.2 - 2023.04.24 +- require dotclear 2.26 +- use latest dotclear namespace +- use sql statement +- use static methods for filters +- fix comments without email +- fix list display +- fix nullsafe warnings +- add dependencies to plugin antispam +- add plugin Uninstaller features + 1.1 - 2023.03.11 - code review for Dotclear 2.25 diff --git a/README.md b/README.md index 60e1dde..371c45a 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Release](https://img.shields.io/github/v/release/JcDenis/whiteListCom)](https://github.com/JcDenis/whiteListCom/releases) [![Date](https://img.shields.io/github/release-date/JcDenis/whiteListCom)](https://github.com/JcDenis/whiteListCom/releases) [![Issues](https://img.shields.io/github/issues/JcDenis/whiteListCom)](https://github.com/JcDenis/whiteListCom/issues) -[![Dotclear](https://img.shields.io/badge/dotclear-v2.25-blue.svg)](https://fr.dotclear.org/download) +[![Dotclear](https://img.shields.io/badge/dotclear-v2.26-blue.svg)](https://fr.dotclear.org/download) [![Dotaddict](https://img.shields.io/badge/dotaddict-official-green.svg)](https://plugins.dotaddict.org/dc2/details/whiteListCom) [![License](https://img.shields.io/github/license/JcDenis/whiteListCom)](https://github.com/JcDenis/whiteListCom/blob/master/LICENSE) @@ -20,7 +20,7 @@ and a list of reserved names (pair of nickname / email ). _whiteListCom_ requires: * permissions to manage antispam - * Dotclear 2.25 + * Dotclear 2.26 ## USAGE diff --git a/_define.php b/_define.php index a068599..2f7ec88 100644 --- a/_define.php +++ b/_define.php @@ -10,7 +10,7 @@ * @copyright Jean-Christian Denis * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html */ -if (!defined('DC_RC_PATH')) { +if (!defined('DC_RC_PATH') || is_null(dcCore::app()->auth)) { return null; } @@ -18,12 +18,15 @@ $this->registerModule( 'Whitelist comments', 'Whitelists for comments moderation', 'Jean-Christian Denis and Contributors', - '1.1', + '1.2', [ - 'requires' => [['core', '2.25']], + 'requires' => [ + ['core', '2.26'], + ['antispam', '2.0'], + ], 'permissions' => dcCore::app()->auth->makePermissions([ - dcAuth::PERMISSION_USAGE, - dcAuth::PERMISSION_CONTENT_ADMIN, + dcCore::app()->auth::PERMISSION_USAGE, + dcCore::app()->auth::PERMISSION_CONTENT_ADMIN, ]), 'priority' => 200, 'type' => 'plugin', diff --git a/dcstore.xml b/dcstore.xml index 1a6b538..66a8cfb 100644 --- a/dcstore.xml +++ b/dcstore.xml @@ -2,11 +2,11 @@ Whitelist comments - 1.1 + 1.2 Jean-Christian Denis and Contributors Whitelists for comments moderation - https://github.com/JcDenis/whiteListCom/releases/download/v1.1/plugin-whiteListCom.zip - 2.25 + https://github.com/JcDenis/whiteListCom/releases/download/v1.2/plugin-whiteListCom.zip + 2.26 https://plugins.dotaddict.org/dc2/details/whiteListCom https://github.com/JcDenis/whiteListCom diff --git a/locales/fr/main.lang.php b/locales/fr/main.lang.php index ea86299..e34e1de 100644 --- a/locales/fr/main.lang.php +++ b/locales/fr/main.lang.php @@ -9,16 +9,18 @@ # DOT NOT MODIFY THIS FILE ! # -l10n::$locales['Reserved names'] = 'Noms réservés'; -l10n::$locales['Whitelist of reserved names of users'] = 'Liste blanche des noms d\'utilisateurs réservés'; -l10n::$locales['This name is reserved to an other user.'] = 'Ce nom est réservé à un autre utilisateur.'; -l10n::$locales['Reserved names have been successfully updated.'] = 'Le noms réservés ont été mis à jour.'; -l10n::$locales['Check the users who can make comments without being moderated.'] = 'Cocher les utilisateurs qui peuvent faire des commentaires sans être modérés.'; -l10n::$locales['Comments authors list'] = 'Liste des auteurs de commentaires'; -l10n::$locales['Unmoderated authors'] = 'Auteurs non modérés'; -l10n::$locales['Whitelist of unmoderated authors'] = 'Liste blanche des auteurs non modérés'; -l10n::$locales['Unmoderated names have been successfully updated.'] = 'Les noms non modérés ont été mis à jour.'; -l10n::$locales['This filter is used only if comments are moderates'] = 'Ce filtre est utilisé seulement si les commentaires sont modérés.'; -l10n::$locales['Posts authors list'] = 'Liste des auteurs de billets'; -l10n::$locales['Whitelists for comments moderation'] = 'Listes blanches pour la modération de commentaires'; -l10n::$locales['Whitelist comments'] = 'Liste blanche des commentaires'; +use Dotclear\Helper\L10n; + +L10n::$locales['Reserved names'] = 'Noms réservés'; +L10n::$locales['Whitelist of reserved names of users'] = 'Liste blanche des noms d\'utilisateurs réservés'; +L10n::$locales['This name is reserved to an other user.'] = 'Ce nom est réservé à un autre utilisateur.'; +L10n::$locales['Reserved names have been successfully updated.'] = 'Le noms réservés ont été mis à jour.'; +L10n::$locales['Check the users who can make comments without being moderated.'] = 'Cocher les utilisateurs qui peuvent faire des commentaires sans être modérés.'; +L10n::$locales['Comments authors list'] = 'Liste des auteurs de commentaires'; +L10n::$locales['Unmoderated authors'] = 'Auteurs non modérés'; +L10n::$locales['Whitelist of unmoderated authors'] = 'Liste blanche des auteurs non modérés'; +L10n::$locales['Unmoderated names have been successfully updated.'] = 'Les noms non modérés ont été mis à jour.'; +L10n::$locales['This filter is used only if comments are moderates'] = 'Ce filtre est utilisé seulement si les commentaires sont modérés.'; +L10n::$locales['Posts authors list'] = 'Liste des auteurs de billets'; +L10n::$locales['Whitelists for comments moderation'] = 'Listes blanches pour la modération de commentaires'; +L10n::$locales['Whitelist comments'] = 'Liste blanche des commentaires';