From b397ea81fc171c09cce94da5dcb949f8a4e41f38 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Thu, 2 Sep 2021 23:54:55 +0200 Subject: [PATCH] clean up code --- CHANGELOG.md | 46 ++++++++++++++++++++++------------------ README.md | 12 +++++------ _define.php | 31 ++++++++++++++------------- _prepend.php | 22 +++++++++---------- dcstore.xml | 11 ++++++++++ inc/lib.whitelistcom.php | 30 +++++++++++++------------- locales/fr/main.lang.php | 4 +--- 7 files changed, 85 insertions(+), 71 deletions(-) create mode 100644 dcstore.xml diff --git a/CHANGELOG.md b/CHANGELOG.md index a4306e3..14c50e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,26 +1,30 @@ -whiteListCom 0.7 - 2021-08-19 - * fix PSR2 coding style - * update license +0.7.1 - dev +- [ ] ? +- [x] clean up code -whiteListCom 0.6 - 2013-11-13 - * Clean up code +0.7 - 2021-08-19 +- fix PSR2 coding style +- update license -whiteListCom 0.5 - 2011-01-19 - * Fixed calls to blog object - * Fixed (hope so) postgreSQL compatibility - * Added messages on admin - * New year copyright +0.6 - 2013-11-13 +- Clean up code -whiteListCom 0.4 - 2010-06-05 - * Switched to DC 2.2 +0.5 - 2011-01-19 +- Fixed calls to blog object +- Fixed (hope so) postgreSQL compatibility +- Added messages on admin +- New year copyright -whiteListCom 0.3 - 2009-11-08 - * Fixed whitout comment_trackback in admin comments list - * Fixed typo - * Added LICENSE - -whiteListCom 0.2 - 2009-09-27 - * Changed to antispam system +0.4 - 2010-06-05 +- Switched to DC 2.2 -whiteListCom 0.1 - 2009-09-16 - * First lab release \ No newline at end of file +0.3 - 2009-11-08 +- Fixed whitout comment_trackback in admin comments list +- Fixed typo +- Added LICENSE + +0.2 - 2009-09-27 +- Changed to antispam system + +0.1 - 2009-09-16 +- First lab release \ No newline at end of file diff --git a/README.md b/README.md index c6df0b5..a0a5d1c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## WHAT IS WHITELISTCOM ? -whiteListCom "White list for comments" is a plugin for the open-source +_whiteListCom_ "White list for comments" is a plugin for the open-source web publishing software called Dotclear. Set up a list of users which can publish comments without validation @@ -10,14 +10,14 @@ and a list of reserved names (pair of nickname / email ). ## REQUIREMENTS - whiteListCom requires: +_whiteListCom_ requires: - * permissions to manage antispam - * Dotclear 2.6 + * permissions to manage antispam + * Dotclear 2.6 ## USAGE -First install whiteListCom, manualy from a zip package or from +First install _whiteListCom_, manualy from a zip package or from Dotaddict repository. (See Dotclear's documentation to know how do this) Enable and configure "Unmoderated authors" of "Reserved names" @@ -28,4 +28,4 @@ Note: User must write a comment before able to be added to the list. * License : GNU GPL v2 * Source & contribution : [GitHub Page](https://github.com/JcDenis/whiteListCom) - * Packages & details: [Dotaddict Page](https://plugins.dotaddict.org/dc2/details/whiteListCom) + * Packages & details: [Dotaddict Page](https://plugins.dotaddict.org/dc2/details/whiteListCom) \ No newline at end of file diff --git a/_define.php b/_define.php index e1780df..134aeef 100644 --- a/_define.php +++ b/_define.php @@ -1,15 +1,15 @@ registerModule( 'Jean-Christian Denis and Contributors', '0.7.1', [ + 'requires' => [['core', '2.19']], 'permissions' => 'admin', 'priority' => 200, - 'type' => 'plugin', - 'dc_min' => '2.18', - 'support' => 'https://github.com/JcDenis/whiteListCom', - 'details' => 'https://plugins.dotaddict.org/dc2/details/whiteListCom' + 'type'=> 'plugin', + 'support'=> 'https://github.com/JcDenis/whiteListCom', + 'details'=> 'https://plugins.dotaddict.org/dc2/details/whiteListCom', + 'repository' => 'https://raw.githubusercontent.com/JcDenis/whiteListCom/master/dcstore.xml' ] ); \ No newline at end of file diff --git a/_prepend.php b/_prepend.php index 6e33310..efd235f 100644 --- a/_prepend.php +++ b/_prepend.php @@ -1,15 +1,15 @@ + +Liste blanche des commentaires +0.7.1 +Jean-Christian Denis and Contributors +Whitelists for comments moderation +https://github.com/JcDenis/whiteListCom/releases/download/v0.7.1/plugin-whiteListCom.zip +https://plugins.dotaddict.org/dc2/details/whiteListCom +https://github.com/JcDenis/whiteListCom + + \ No newline at end of file diff --git a/inc/lib.whitelistcom.php b/inc/lib.whitelistcom.php index 36b2824..43e9eae 100644 --- a/inc/lib.whitelistcom.php +++ b/inc/lib.whitelistcom.php @@ -1,15 +1,15 @@ core = $core; $this->con = $core->con; $this->blog = $core->con->escape($core->blog->id); - + $core->blog->settings->addNamespace('whiteListCom'); $this->settings = $core->blog->settings->whiteListCom; - + $unmoderated = $this->settings->whiteListCom_unmoderated; $this->unmoderated = self::decode($unmoderated); - + $reserved = $this->settings->whiteListCom_reserved; $this->reserved = self::decode($reserved); } @@ -283,7 +283,7 @@ class whiteListCom 'Whitelist of unmoderated users on comments', true,false ); - + $this->settings->put( 'whiteListCom_reserved', self::encode($this->reserved), diff --git a/locales/fr/main.lang.php b/locales/fr/main.lang.php index 471de87..1e7996c 100644 --- a/locales/fr/main.lang.php +++ b/locales/fr/main.lang.php @@ -36,6 +36,4 @@ $GLOBALS['__l10n']['This name is reserved to an other user.'] = 'Ce nom est rés $GLOBALS['__l10n']['Whitelists for comments moderation'] = 'Listes blanches pour la modération de commentaires'; -$GLOBALS['__l10n']['Whitelist comments'] = 'Liste blanche des commentaires'; - -?> \ No newline at end of file +$GLOBALS['__l10n']['Whitelist comments'] = 'Liste blanche des commentaires'; \ No newline at end of file