code review
This commit is contained in:
parent
36b4b65367
commit
b6bc0022a6
6 changed files with 19 additions and 10 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
testMail 0.7.1 - 2023.11.04
|
||||||
|
===========================================================
|
||||||
|
* Require Dotclear 2.28
|
||||||
|
* Require PHP 8.1
|
||||||
|
* Code review
|
||||||
|
|
||||||
testMail 0.7 - 2023.10.13
|
testMail 0.7 - 2023.10.13
|
||||||
===========================================================
|
===========================================================
|
||||||
* Require Dotclear 2.28
|
* Require Dotclear 2.28
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# README
|
# README
|
||||||
|
|
||||||
[![Release](https://img.shields.io/badge/release-0.7-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/testMail/releases)
|
[![Release](https://img.shields.io/badge/release-0.7.1-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/testMail/releases)
|
||||||
![Date](https://img.shields.io/badge/date-2023.10.13-c44d58.svg)
|
![Date](https://img.shields.io/badge/date-2023.11.04-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)
|
||||||
|
@ -10,13 +10,13 @@
|
||||||
|
|
||||||
_testmail_ is a plugin for the open-source web publishing software called [Dotclear](https://www.dotclear.org).
|
_testmail_ is a plugin for the open-source web publishing software called [Dotclear](https://www.dotclear.org).
|
||||||
|
|
||||||
> It helps dev to test dotclear mail system.
|
> Help dev to test dotclear mail system.
|
||||||
|
|
||||||
## REQUIREMENTS
|
## REQUIREMENTS
|
||||||
|
|
||||||
* Dotclear 2.28
|
* Dotclear 2.28
|
||||||
* PHP 8.1+
|
* PHP 8.1+
|
||||||
* super admin permission
|
* Dotclear super admin permission
|
||||||
|
|
||||||
## USAGE
|
## USAGE
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ $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.7',
|
'0.7.1',
|
||||||
[
|
[
|
||||||
'requires' => [['core', '2.28']],
|
'requires' => [['core', '2.28']],
|
||||||
'permissions' => 'My',
|
'permissions' => 'My',
|
||||||
|
|
|
@ -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.7</version>
|
<version>0.7.1</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.7/plugin-testMail.zip</file>
|
<file>https://git.dotclear.watch/JcDenis/testMail/releases/download/v0.7.1/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>
|
||||||
|
|
|
@ -108,7 +108,7 @@ class Manage extends Process
|
||||||
(new Input('mail_to'))
|
(new Input('mail_to'))
|
||||||
->__call('class', ['maximal'])
|
->__call('class', ['maximal'])
|
||||||
->__call('size', [30])
|
->__call('size', [30])
|
||||||
->__call('maxlenght', [255])
|
->__call('maxlength', [255])
|
||||||
->__call('value', ['']),
|
->__call('value', ['']),
|
||||||
]]),
|
]]),
|
||||||
(new Para())
|
(new Para())
|
||||||
|
@ -118,7 +118,7 @@ class Manage extends Process
|
||||||
(new Input('mail_subject'))
|
(new Input('mail_subject'))
|
||||||
->__call('class', ['maximal'])
|
->__call('class', ['maximal'])
|
||||||
->__call('size', [30])
|
->__call('size', [30])
|
||||||
->__call('maxlenght', [255])
|
->__call('maxlength', [255])
|
||||||
->__call('value', ['']),
|
->__call('value', ['']),
|
||||||
]]),
|
]]),
|
||||||
(new Para())
|
(new Para())
|
||||||
|
@ -152,6 +152,9 @@ class Manage extends Process
|
||||||
Page::closeModule();
|
Page::closeModule();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array<int, string>
|
||||||
|
*/
|
||||||
private static function getHeaders(): array
|
private static function getHeaders(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
|
|
@ -26,8 +26,8 @@ class My extends MyPlugin
|
||||||
|
|
||||||
public static function checkCustomContext(int $context): ?bool
|
public static function checkCustomContext(int $context): ?bool
|
||||||
{
|
{
|
||||||
// Limit to super admin
|
|
||||||
return match ($context) {
|
return match ($context) {
|
||||||
|
// Limit to super admin
|
||||||
self::MODULE => App::auth()->isSuperAdmin(),
|
self::MODULE => App::auth()->isSuperAdmin(),
|
||||||
default => null,
|
default => null,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue