release 0.6

This commit is contained in:
Jean-Christian Paul Denis 2023-10-07 23:25:54 +02:00
parent 3b3fff7142
commit 9258788db5
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
4 changed files with 29 additions and 28 deletions

View File

@ -1,3 +1,9 @@
mail2log 0.6 - 2023.10.07
===========================================================
* Require Dotclear 2.28
* Require PHP 8.1
* Upgrade to Dotclear 2.28
mail2log 0.5 - 2023.08.13 mail2log 0.5 - 2023.08.13
=========================================================== ===========================================================
* Require Dotclear 2.24 * Require Dotclear 2.24

View File

@ -1,25 +1,21 @@
# README # README
[![Release](https://img.shields.io/badge/release-0.5-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/mail2log/releases) [![Release](https://img.shields.io/badge/release-0.6-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/mail2log/releases)
[![Date](https://img.shields.io/badge/date-2023.08.13-c44d58.svg)](https://git.dotclear.watch/JcDenis/mail2log/releases) ![Date](https://img.shields.io/badge/date-2023.10.07-c44d58.svg)
[![Dotclear](https://img.shields.io/badge/dotclear-v2.27-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/mail2log) [![Dotaddict](https://img.shields.io/badge/dotaddict-official-9ac123.svg)](https://plugins.dotaddict.org/dc2/details/mail2log)
[![License](https://img.shields.io/github/license/JcDenis/mail2log)](https://git.dotclear.watch/JcDenis/mail2log/blob/master/LICENSE) [![License](https://img.shields.io/badge/license-GPL--2.0-ececec.svg)](https://git.dotclear.watch/JcDenis/mail2log/src/branch/master/LICENSE)
## WHAT IS MAIL2LOG ? ## ABOUT
_mail2log_ is a plugin for the open-source _mail2log_ is a plugin for the open-source web publishing software called [Dotclear](https://www.dotclear.org).
web publishing software called Dotclear.
It replaces mail function > It replaces mail function and send them to Dotclear's log database table.
and send them to Dotclear's log database table.
## REQUIREMENTS ## REQUIREMENTS
_mail2log_ requires: * Dotclear 2.28
* PHP 8.1+
* Dotclear 2.24
* PHP 7.4
* A plugin to read log. (dcLog) * A plugin to read log. (dcLog)
## USAGE ## USAGE
@ -32,9 +28,10 @@ Use it for dev only.
## LINKS ## LINKS
* License : [GNU GPL v2](https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html) * [License](https://git.dotclear.watch/JcDenis/mail2log/src/branch/master/LICENSE)
* Source & contribution : [Gitea Page](https://git.dotclear.watch/JcDenis/mail2log) or [GitHub Page](https://github.com/JcDenis/mail2log) * [Packages & details](https://git.dotclear.watch/JcDenis/mail2log/releases) (or on [Dotaddict](https://plugins.dotaddict.org/dc2/details/mail2log))
* Packages & details: [Gitea Page](https://git.dotclear.watch/JcDenis/mail2log/releases) or [Dotaddict Page](https://plugins.dotaddict.org/dc2/details/mail2log) * [Sources & contributions](https://git.dotclear.watch/JcDenis/mail2log) (or on [GitHub](https://github.com/JcDenis/mail2log))
* [Issues & security](https://git.dotclear.watch/JcDenis/mail2log/issues) (or on [GitHub](https://github.com/JcDenis/mail2log/issues))
## CONTRIBUTORS ## CONTRIBUTORS

View File

@ -10,19 +10,17 @@
* @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
*/ */
if (!defined('DC_RC_PATH')) { use Dotclear\App;
return null;
}
$this->registerModule( $this->registerModule(
'Mail to log', 'Mail to log',
'Do not send mails but log them', 'Do not send mails but log them',
'Jean-Christian Denis and contributors', 'Jean-Christian Denis and contributors',
'0.5', '0.6',
[ [
'requires' => [['core', '2.24']], 'requires' => [['core', '2.28']],
'permissions' => dcCore::app()->auth->makePermissions([ 'permissions' => App::auth()->makePermissions([
dcCore::app()->auth::PERMISSION_USAGE, App::auth()::PERMISSION_USAGE,
]), ]),
'type' => 'plugin', 'type' => 'plugin',
'support' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/issues', 'support' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/issues',
@ -36,10 +34,10 @@ if (!function_exists('\_mail')) {
{ {
$headers = is_array($headers) ? implode("\n\t", $headers) : (is_string($headers) ? $headers : ''); $headers = is_array($headers) ? implode("\n\t", $headers) : (is_string($headers) ? $headers : '');
$cur = dcCore::app()->con->openCursor(dcCore::app()->prefix . dcLog::LOG_TABLE_NAME); $cur = App::log()->openLogCursor();
$cur->setField('log_table', basename(__DIR__)); $cur->setField('log_table', basename(__DIR__));
$cur->setField('log_msg', sprintf("%s\n-----\n To: %s\n Subject: %s\n-----\n Message:\n%s\n", $headers, $to, $subject, $message)); $cur->setField('log_msg', sprintf("%s\n-----\n To: %s\n Subject: %s\n-----\n Message:\n%s\n", $headers, $to, $subject, $message));
dcCore::app()->log->addLog($cur); App::log()->addLog($cur);
return true; return true;
} }

View File

@ -2,11 +2,11 @@
<modules xmlns:da="http://dotaddict.org/da/"> <modules xmlns:da="http://dotaddict.org/da/">
<module id="mail2log"> <module id="mail2log">
<name>Mail to log</name> <name>Mail to log</name>
<version>0.5</version> <version>0.6</version>
<author>Jean-Christian Denis and contributors</author> <author>Jean-Christian Denis and contributors</author>
<desc>Do not send mails but log them</desc> <desc>Do not send mails but log them</desc>
<file>https://git.dotclear.watch/JcDenis/mail2log/releases/download/v0.5/plugin-mail2log.zip</file> <file>https://git.dotclear.watch/JcDenis/mail2log/releases/download/v0.6/plugin-mail2log.zip</file>
<da:dcmin>2.24</da:dcmin> <da:dcmin>2.28</da:dcmin>
<da:details>https://git.dotclear.watch/JcDenis/mail2log/src/branch/master/README.md</da:details> <da:details>https://git.dotclear.watch/JcDenis/mail2log/src/branch/master/README.md</da:details>
<da:support>https://git.dotclear.watch/JcDenis/mail2log/issues</da:support> <da:support>https://git.dotclear.watch/JcDenis/mail2log/issues</da:support>
</module> </module>