release 1.0

This commit is contained in:
Jean-Christian Denis 2023-01-08 00:42:34 +01:00
parent 151c092dbb
commit 2ddca1edcf
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951
11 changed files with 63 additions and 58 deletions

View file

@ -18,7 +18,7 @@ $this->registerModule(
'Whitelist comments', 'Whitelist comments',
'Whitelists for comments moderation', 'Whitelists for comments moderation',
'Jean-Christian Denis and Contributors', 'Jean-Christian Denis and Contributors',
'0.9', '1.0',
[ [
'requires' => [['core', '2.24']], 'requires' => [['core', '2.24']],
'permissions' => dcCore::app()->auth->makePermissions([ 'permissions' => dcCore::app()->auth->makePermissions([
@ -27,8 +27,8 @@ $this->registerModule(
]), ]),
'priority' => 200, 'priority' => 200,
'type' => 'plugin', 'type' => 'plugin',
'support' => 'https://github.com/JcDenis/whiteListCom', 'support' => 'https://github.com/JcDenis/' . basename(__DIR__),
'details' => 'https://plugins.dotaddict.org/dc2/details/whiteListCom', 'details' => 'https://plugins.dotaddict.org/dc2/details/' . basename(__DIR__),
'repository' => 'https://raw.githubusercontent.com/JcDenis/whiteListCom/master/dcstore.xml', 'repository' => 'https://raw.githubusercontent.com/JcDenis/' . basename(__DIR__) . '/master/dcstore.xml',
] ]
); );

View file

@ -5,7 +5,7 @@
* @package Dotclear * @package Dotclear
* @subpackage Plugin * @subpackage Plugin
* *
* @author Jean-Christian Denis * @author Jean-Christian Denis and Contributors
* *
* @copyright Jean-Christian Denis * @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html

View file

@ -1,4 +1,15 @@
<?php <?php
/**
* @brief whiteListCom, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Jean-Christian Denis and Contributors
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
declare(strict_types=1); declare(strict_types=1);
$prepend = implode('\\', ['Dotclear', 'Plugin', basename(__DIR__), 'Prepend']); $prepend = implode('\\', ['Dotclear', 'Plugin', basename(__DIR__), 'Prepend']);
@ -8,4 +19,4 @@ if (!class_exists($prepend)) {
if ($prepend::init()) { if ($prepend::init()) {
$prepend::process(); $prepend::process();
} }
} }

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>0.9</version> <version>1.0</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://github.com/JcDenis/whiteListCom/releases/download/v0.9/plugin-whiteListCom.zip</file> <file>https://github.com/JcDenis/whiteListCom/releases/download/v1.0/plugin-whiteListCom.zip</file>
<da:dcmin>2.24</da:dcmin> <da:dcmin>2.24</da:dcmin>
<da:details>https://plugins.dotaddict.org/dc2/details/whiteListCom</da:details> <da:details>https://plugins.dotaddict.org/dc2/details/whiteListCom</da:details>
<da:support>https://github.com/JcDenis/whiteListCom</da:support> <da:support>https://github.com/JcDenis/whiteListCom</da:support>

View file

@ -19,7 +19,6 @@ use dcBlog;
use dcCore; use dcCore;
use dcUtils; use dcUtils;
/** /**
* @ingroup DC_PLUGIN_WHITELISTCOM * @ingroup DC_PLUGIN_WHITELISTCOM
* @brief White list filters methods * @brief White list filters methods

View file

@ -1,11 +1,11 @@
<?php <?php
/** /**
* @brief pacKman, a plugin for Dotclear 2 * @brief whiteListCom, a plugin for Dotclear 2
* *
* @package Dotclear * @package Dotclear
* @subpackage Plugin * @subpackage Plugin
* *
* @author Jean-Christian Denis * @author Jean-Christian Denis and Contributors
* *
* @copyright Jean-Christian Denis * @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
@ -94,7 +94,7 @@ class Install
while ($record->fetch()) { while ($record->fetch()) {
if (preg_match('/^whiteListCom(.*?)$/', $record->setting_id, $match)) { if (preg_match('/^whiteListCom(.*?)$/', $record->setting_id, $match)) {
$value = @unserialize(@base64_decode($x)); $value = @unserialize(@base64_decode($record->setting_value));
$cur = dcCore::app()->con->openCursor(dcCore::app()->prefix . dcNamespace::NS_TABLE_NAME); $cur = dcCore::app()->con->openCursor(dcCore::app()->prefix . dcNamespace::NS_TABLE_NAME);
$cur->setting_id = $match[1]; $cur->setting_id = $match[1];
$cur->setting_ns = self::$pid; $cur->setting_ns = self::$pid;

View file

@ -15,6 +15,7 @@ declare(strict_types=1);
namespace Dotclear\Plugin\whiteListCom; namespace Dotclear\Plugin\whiteListCom;
/* dotclear ns */ /* dotclear ns */
use dcBlog;
use dcCore; use dcCore;
/* clearbricks ns */ /* clearbricks ns */
@ -78,4 +79,3 @@ class Prepend
return true; return true;
} }
} }

View file

@ -27,7 +27,6 @@ use http;
/* php ns */ /* php ns */
use Exception; use Exception;
/** /**
* @ingroup DC_PLUGIN_WHITELISTCOM * @ingroup DC_PLUGIN_WHITELISTCOM
* @brief Filter for reserved names. * @brief Filter for reserved names.
@ -88,7 +87,7 @@ class ReservedWhiteList extends dcSpamFilter
$wlc->addReserved($name, $_POST['reserved_email'][$i]); $wlc->addReserved($name, $_POST['reserved_email'][$i]);
} }
$wlc->commit(); $wlc->commit();
dcPage::addSuccessNotice(__('Reserved name have been successfully updated.')); dcPage::addSuccessNotice(__('Reserved names have been successfully updated.'));
http::redirect($url); http::redirect($url);
} }

View file

@ -16,11 +16,13 @@ namespace Dotclear\Plugin\whiteListCom;
/* dotclear ns */ /* dotclear ns */
use dcCore; use dcCore;
use dcPage;
use dcSpamFilter; use dcSpamFilter;
/* clearbricks ns */ /* clearbricks ns */
use form; use form;
use html; use html;
use http;
/* php ns */ /* php ns */
use Exception; use Exception;
@ -77,6 +79,8 @@ class UnmoderatedWhiteList extends dcSpamFilter
$wlc->addUnmoderated($email); $wlc->addUnmoderated($email);
} }
$wlc->commit(); $wlc->commit();
dcPage::addSuccessNotice(__('Unmoderated names have been successfully updated.'));
http::redirect($url);
} }
$posts = $wlc->getPostsUsers(); $posts = $wlc->getPostsUsers();
$comments = $wlc->getCommentsUsers(); $comments = $wlc->getCommentsUsers();

View file

@ -9,14 +9,16 @@
# DOT NOT MODIFY THIS FILE ! # DOT NOT MODIFY THIS FILE !
# #
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['This filter is used only if comments are moderates'] = 'Ce filtre est utilisé seulement si les commentaires sont modérés.';
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['Posts authors list'] = 'Liste des auteurs de billets';
l10n::$locales['Comments authors list'] = 'Liste des auteurs de commentaires';
l10n::$locales['Reserved names'] = 'Noms réservés'; 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['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['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['Whitelists for comments moderation'] = 'Listes blanches pour la modération de commentaires';
l10n::$locales['Whitelist comments'] = 'Liste blanche des commentaires'; l10n::$locales['Whitelist comments'] = 'Liste blanche des commentaires';

View file

@ -1,58 +1,48 @@
# Language: Français
# Module: whiteListCom - 0.6
# Date: 2013-11-13 08:01:14
# Translated with translater 2013.05.11
msgid "" msgid ""
msgstr "" msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: whiteListCom 0.6\n" "Project-Id-Version: whiteListCom 1.0\n"
"POT-Creation-Date: \n" "POT-Creation-Date: \n"
"PO-Revision-Date: 2013-11-13T08:01:14+00:00\n" "PO-Revision-Date: 2023-01-07T23:39:35+00:00\n"
"Last-Translator: Jean-Christian Denis\n" "Last-Translator: Jean-Christian Denis\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: inc/lib.whitelistcom.php:34
msgid "Unmoderated authors"
msgstr "Auteurs non modérés"
#: inc/lib.whitelistcom.php:35
msgid "Whitelist of unmoderated authors"
msgstr "Liste blanche des auteurs non modérés"
#: inc/lib.whitelistcom.php:87
msgid "This filter is used only if comments are moderates"
msgstr "Ce filtre est utilisé seulement si les commentaires sont modérés."
#: inc/lib.whitelistcom.php:93
#: inc/lib.whitelistcom.php:216
msgid "Check the users who can make comments without being moderated."
msgstr "Cocher les utilisateurs qui peuvent faire des commentaires sans être modérés."
#: inc/lib.whitelistcom.php:96
msgid "Posts authors list"
msgstr "Liste des auteurs de billets"
#: inc/lib.whitelistcom.php:117
#: inc/lib.whitelistcom.php:217
msgid "Comments authors list"
msgstr "Liste des auteurs de commentaires"
#: inc/lib.whitelistcom.php:158
msgid "Reserved names" msgid "Reserved names"
msgstr "Noms réservés" msgstr "Noms réservés"
#: inc/lib.whitelistcom.php:159
msgid "Whitelist of reserved names of users" msgid "Whitelist of reserved names of users"
msgstr "Liste blanche des noms d'utilisateurs réservés" msgstr "Liste blanche des noms d'utilisateurs réservés"
#: inc/lib.whitelistcom.php:187
#: inc/lib.whitelistcom.php:193
msgid "This name is reserved to an other user." msgid "This name is reserved to an other user."
msgstr "Ce nom est réservé à un autre utilisateur." msgstr "Ce nom est réservé à un autre utilisateur."
msgid "Reserved names have been successfully updated."
msgstr "Le noms réservés ont été mis à jour."
msgid "Check the users who can make comments without being moderated."
msgstr "Cocher les utilisateurs qui peuvent faire des commentaires sans être modérés."
msgid "Comments authors list"
msgstr "Liste des auteurs de commentaires"
msgid "Unmoderated authors"
msgstr "Auteurs non modérés"
msgid "Whitelist of unmoderated authors"
msgstr "Liste blanche des auteurs non modérés"
msgid "Unmoderated names have been successfully updated."
msgstr "Les noms non modérés ont été mis à jour."
msgid "This filter is used only if comments are moderates"
msgstr "Ce filtre est utilisé seulement si les commentaires sont modérés."
msgid "Posts authors list"
msgstr "Liste des auteurs de billets"
msgid "Whitelists for comments moderation" msgid "Whitelists for comments moderation"
msgstr "Listes blanches pour la modération de commentaires" msgstr "Listes blanches pour la modération de commentaires"