From 9258788db519b3e1bbba0f538adb394a02bad087 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 7 Oct 2023 23:25:54 +0200 Subject: [PATCH] release 0.6 --- CHANGELOG.md | 6 ++++++ README.md | 29 +++++++++++++---------------- _define.php | 16 +++++++--------- dcstore.xml | 6 +++--- 4 files changed, 29 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 045bcc4..4e7bc45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 =========================================================== * Require Dotclear 2.24 diff --git a/README.md b/README.md index 2d07f39..7ff8c4a 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,21 @@ # README -[![Release](https://img.shields.io/badge/release-0.5-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) -[![Dotclear](https://img.shields.io/badge/dotclear-v2.27-137bbb.svg)](https://fr.dotclear.org/download) +[![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.10.07-c44d58.svg) +[![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) -[![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 -web publishing software called Dotclear. +_mail2log_ is a plugin for the open-source web publishing software called [Dotclear](https://www.dotclear.org). -It replaces mail function -and send them to Dotclear's log database table. +> It replaces mail function and send them to Dotclear's log database table. ## REQUIREMENTS -_mail2log_ requires: - -* Dotclear 2.24 -* PHP 7.4 +* Dotclear 2.28 +* PHP 8.1+ * A plugin to read log. (dcLog) ## USAGE @@ -32,9 +28,10 @@ Use it for dev only. ## LINKS -* License : [GNU GPL v2](https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html) -* Source & contribution : [Gitea Page](https://git.dotclear.watch/JcDenis/mail2log) or [GitHub Page](https://github.com/JcDenis/mail2log) -* Packages & details: [Gitea Page](https://git.dotclear.watch/JcDenis/mail2log/releases) or [Dotaddict Page](https://plugins.dotaddict.org/dc2/details/mail2log) +* [License](https://git.dotclear.watch/JcDenis/mail2log/src/branch/master/LICENSE) +* [Packages & details](https://git.dotclear.watch/JcDenis/mail2log/releases) (or on [Dotaddict](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 diff --git a/_define.php b/_define.php index 455a3c4..4b49ba6 100644 --- a/_define.php +++ b/_define.php @@ -10,19 +10,17 @@ * @copyright Jean-Christian Denis * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html */ -if (!defined('DC_RC_PATH')) { - return null; -} +use Dotclear\App; $this->registerModule( 'Mail to log', 'Do not send mails but log them', 'Jean-Christian Denis and contributors', - '0.5', + '0.6', [ - 'requires' => [['core', '2.24']], - 'permissions' => dcCore::app()->auth->makePermissions([ - dcCore::app()->auth::PERMISSION_USAGE, + 'requires' => [['core', '2.28']], + 'permissions' => App::auth()->makePermissions([ + App::auth()::PERMISSION_USAGE, ]), 'type' => 'plugin', '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 : ''); - $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_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; } diff --git a/dcstore.xml b/dcstore.xml index 480b701..f4c37f6 100644 --- a/dcstore.xml +++ b/dcstore.xml @@ -2,11 +2,11 @@ Mail to log - 0.5 + 0.6 Jean-Christian Denis and contributors Do not send mails but log them - https://git.dotclear.watch/JcDenis/mail2log/releases/download/v0.5/plugin-mail2log.zip - 2.24 + https://git.dotclear.watch/JcDenis/mail2log/releases/download/v0.6/plugin-mail2log.zip + 2.28 https://git.dotclear.watch/JcDenis/mail2log/src/branch/master/README.md https://git.dotclear.watch/JcDenis/mail2log/issues