Do not required plugin antispam from define (easier safe_mode update)

This commit is contained in:
Jean-Christian Denis 2023-10-14 20:37:52 +02:00
parent cfca8c7a10
commit 74651f6fef
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951
5 changed files with 17 additions and 11 deletions

View file

@ -1,6 +1,12 @@
whiteListCom 1.4.1 - 2023.10.14
===========================================================
* Require Dotclear 2.28
* Require PHP 8.1
* Do not required plugin antispam from define (easier safe_mode update)
whiteListCom 1.4 - 2023.10.11 whiteListCom 1.4 - 2023.10.11
=========================================================== ===========================================================
* Require Dotclear 2.27 * Require Dotclear 2.28
* Require PHP 8.1 * Require PHP 8.1
* Upgrade to Dotclear 2.28 * Upgrade to Dotclear 2.28

View file

@ -1,7 +1,7 @@
# README # README
[![Release](https://img.shields.io/badge/release-1.4-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/whiteListCom/releases) [![Release](https://img.shields.io/badge/release-1.4.1-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/whiteListCom/releases)
![Date](https://img.shields.io/badge/date-2023.10.11-c44d58.svg) ![Date](https://img.shields.io/badge/date-2023.10.13-c44d58.svg)
[![Dotclear](https://img.shields.io/badge/dotclear-v2.28-137bbb.svg)](https://fr.dotclear.org/download) [![Dotclear](https://img.shields.io/badge/dotclear-v2.28-137bbb.svg)](https://fr.dotclear.org/download)
[![Dotaddict](https://img.shields.io/badge/dotaddict-official-9ac123.svg)](https://plugins.dotaddict.org/dc2/details/whiteListCom) [![Dotaddict](https://img.shields.io/badge/dotaddict-official-9ac123.svg)](https://plugins.dotaddict.org/dc2/details/whiteListCom)
[![License](https://img.shields.io/github/license/JcDenis/whiteListCom)](https://git.dotclear.watch/JcDenis/whiteListCom/blob/master/LICENSE) [![License](https://img.shields.io/github/license/JcDenis/whiteListCom)](https://git.dotclear.watch/JcDenis/whiteListCom/blob/master/LICENSE)

View file

@ -17,12 +17,9 @@ $this->registerModule(
'Whitelist comments', 'Whitelist comments',
'Whitelists for comments moderation', 'Whitelists for comments moderation',
'Jean-Christian Denis and Contributors', 'Jean-Christian Denis and Contributors',
'1.4', '1.4.1',
[ [
'requires' => [ 'requires' => [['core', '2.28']],
['core', '2.28'],
['antispam', '2.0'],
],
'permissions' => 'My', 'permissions' => 'My',
'priority' => 200, 'priority' => 200,
'type' => 'plugin', 'type' => 'plugin',

View file

@ -2,10 +2,10 @@
<modules xmlns:da="http://dotaddict.org/da/"> <modules xmlns:da="http://dotaddict.org/da/">
<module id="whiteListCom"> <module id="whiteListCom">
<name>Whitelist comments</name> <name>Whitelist comments</name>
<version>1.4</version> <version>1.4.1</version>
<author>Jean-Christian Denis and Contributors</author> <author>Jean-Christian Denis and Contributors</author>
<desc>Whitelists for comments moderation</desc> <desc>Whitelists for comments moderation</desc>
<file>https://git.dotclear.watch/JcDenis/whiteListCom/releases/download/v1.4/plugin-whiteListCom.zip</file> <file>https://git.dotclear.watch/JcDenis/whiteListCom/releases/download/v1.4.1/plugin-whiteListCom.zip</file>
<da:dcmin>2.28</da:dcmin> <da:dcmin>2.28</da:dcmin>
<da:details>https://git.dotclear.watch/JcDenis/whiteListCom/src/branch/master/README.md</da:details> <da:details>https://git.dotclear.watch/JcDenis/whiteListCom/src/branch/master/README.md</da:details>
<da:support>https://git.dotclear.watch/JcDenis/whiteListCom/issues</da:support> <da:support>https://git.dotclear.watch/JcDenis/whiteListCom/issues</da:support>

View file

@ -35,7 +35,10 @@ class Prepend extends Process
$spamfilters[] = ReservedWhiteList::class; $spamfilters[] = ReservedWhiteList::class;
}, },
'publicAfterCommentCreate' => function (Cursor $cur, int $id): void { 'publicAfterCommentCreate' => function (Cursor $cur, int $id): void {
if (!App::blog()->isDefined() || App::blog()->settings()->get('system')->get('comments_pub')) { if (!App::blog()->isDefined()
|| !App::plugins()->moduleExists('antispam')
|| App::blog()->settings()->get('system')->get('comments_pub')
) {
return; return;
} }