release 0.7

This commit is contained in:
Jean-Christian Denis 2023-10-13 21:06:43 +02:00
parent 6c8615cbb9
commit c954dc74f0
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951
7 changed files with 48 additions and 43 deletions

View file

@ -1,3 +1,9 @@
testMail 0.7 - 2023.10.13
===========================================================
* Require Dotclear 2.28
* Require PHP 8.1
* Code review
testMail 0.6 - 2023.10.07 testMail 0.6 - 2023.10.07
=========================================================== ===========================================================
* Require Dotclear 2.28 * Require Dotclear 2.28

View file

@ -1,7 +1,7 @@
# README # README
[![Release](https://img.shields.io/badge/release-0.6-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/testMail/releases) [![Release](https://img.shields.io/badge/release-0.7-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/testMail/releases)
![Date](https://img.shields.io/badge/date-2023.10.07-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/testMail) [![Dotaddict](https://img.shields.io/badge/dotaddict-official-9ac123.svg)](https://plugins.dotaddict.org/dc2/details/testMail)
[![License](https://img.shields.io/badge/license-GPL--2.0-ececec.svg)](https://git.dotclear.watch/JcDenis/testMail/src/branch/master/LICENSE) [![License](https://img.shields.io/badge/license-GPL--2.0-ececec.svg)](https://git.dotclear.watch/JcDenis/testMail/src/branch/master/LICENSE)
@ -14,9 +14,9 @@ _testmail_ is a plugin for the open-source web publishing software called [Dotcl
## REQUIREMENTS ## REQUIREMENTS
* super admin permission
* Dotclear 2.28 * Dotclear 2.28
* PHP 8.1+ * PHP 8.1+
* super admin permission
## USAGE ## USAGE
@ -35,6 +35,6 @@ Access mail form from admin sidebar system menu **Mail test**.
## CONTRIBUTORS ## CONTRIBUTORS
* Osku (author) * Osku (author)
* Jean-Christian Denis * Jean-Christian Denis (latest)
You are welcome to contribute to this code. You are welcome to contribute to this code.

View file

@ -1,29 +1,27 @@
<?php <?php
/** /**
* @brief testMail, a plugin for Dotclear 2 * @file
* @brief The plugin testMail definition
* @ingroup testMail
* *
* @package Dotclear * @defgroup testMail Plugin testMail.
* @subpackage Plugin
* *
* @author Osku and contributors * Send a simple mail from admin.
* *
* @copyright Jean-Christian Denis * @author Osku (author)
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html * @author Jean-Christian Denis (author)
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/ */
declare(strict_types=1); declare(strict_types=1);
if (!defined('DC_RC_PATH')) {
return null;
}
$this->registerModule( $this->registerModule(
'Mail test', 'Mail test',
'Send a simple mail from admin', 'Send a simple mail from admin',
'Osku and contributors', 'Osku and contributors',
'0.6', '0.7',
[ [
'requires' => [['core', '2.28']], 'requires' => [['core', '2.28']],
'permissions' => null, 'permissions' => 'My',
'type' => 'plugin', 'type' => 'plugin',
'support' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/issues', 'support' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/issues',
'details' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/src/branch/master/README.md', 'details' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/src/branch/master/README.md',

View file

@ -2,10 +2,10 @@
<modules xmlns:da="http://dotaddict.org/da/"> <modules xmlns:da="http://dotaddict.org/da/">
<module id="testMail"> <module id="testMail">
<name>Mail test</name> <name>Mail test</name>
<version>0.6</version> <version>0.7</version>
<author>Osku and contributors</author> <author>Osku and contributors</author>
<desc>Send a simple mail from admin</desc> <desc>Send a simple mail from admin</desc>
<file>https://git.dotclear.watch/JcDenis/testMail/releases/download/v0.6/plugin-testMail.zip</file> <file>https://git.dotclear.watch/JcDenis/testMail/releases/download/v0.7/plugin-testMail.zip</file>
<da:dcmin>2.28</da:dcmin> <da:dcmin>2.28</da:dcmin>
<da:details>https://git.dotclear.watch/JcDenis/testMail/src/branch/master/README.md</da:details> <da:details>https://git.dotclear.watch/JcDenis/testMail/src/branch/master/README.md</da:details>
<da:support>https://git.dotclear.watch/JcDenis/testMail/issues</da:support> <da:support>https://git.dotclear.watch/JcDenis/testMail/issues</da:support>

View file

@ -16,6 +16,14 @@ namespace Dotclear\Plugin\testMail;
use Dotclear\Core\Process; use Dotclear\Core\Process;
/**
* @brief testMail backend class.
* @ingroup testMail
*
* @author Osku (author)
* @author Jean-Christian Denis (author)
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
class Backend extends Process class Backend extends Process
{ {
public static function init(): bool public static function init(): bool

View file

@ -1,15 +1,5 @@
<?php <?php
/**
* @brief testMail, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Osku 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);
namespace Dotclear\Plugin\testMail; namespace Dotclear\Plugin\testMail;
@ -35,6 +25,14 @@ use Dotclear\Helper\Network\Mail\Mail;
use Dotclear\Helper\Text; use Dotclear\Helper\Text;
use Exception; use Exception;
/**
* @brief testMail manage class.
* @ingroup testMail
*
* @author Osku (author)
* @author Jean-Christian Denis (author)
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
class Manage extends Process class Manage extends Process
{ {
public static function init(): bool public static function init(): bool

View file

@ -1,15 +1,5 @@
<?php <?php
/**
* @brief testMail, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Osku 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);
namespace Dotclear\Plugin\testMail; namespace Dotclear\Plugin\testMail;
@ -18,15 +8,20 @@ use Dotclear\App;
use Dotclear\Module\MyPlugin; use Dotclear\Module\MyPlugin;
/** /**
* This module definitions. * @brief testMail My helper.
* @ingroup testMail
*
* @author Osku (author)
* @author Jean-Christian Denis (author)
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/ */
class My extends MyPlugin class My extends MyPlugin
{ {
/** @var string Mailer name */ /** @var string Mailer name */
public const X_MAILER = 'Dotclear'; public const X_MAILER = 'Dotclear';
public static function checkXustomContext(int $context): ?bool public static function checkCustomContext(int $context): ?bool
{ {
return defined('DC_CONTEXT_ADMIN') && App::auth()->isSuperAdmin(); return App::task()->checkContext('BACKEND') && App::auth()->isSuperAdmin();
} }
} }