From 11323d42b11b78afaec700f6dfd4b69eb2d02cbb Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Thu, 22 Dec 2022 23:06:46 +0100 Subject: [PATCH] use abstract plugin id --- CHANGELOG.md | 4 ++++ _define.php | 10 +++++----- _prepend.php | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28d61b9..1b7d7af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +0.2 - 2022.12.22 +- use abstract plugin id +- fix permissions + 0.1 - 2022.11.27 - First version - Required Dotclear 2.24 \ No newline at end of file diff --git a/_define.php b/_define.php index e527918..4d242a0 100644 --- a/_define.php +++ b/_define.php @@ -15,7 +15,7 @@ if (!defined('DC_RC_PATH')) { } $this->registerModule( - 'mail2log', + basename(__DIR__), 'Do not send mails but log them', 'Jean-Christian Denis and contributors', '0.1', @@ -24,9 +24,9 @@ $this->registerModule( 'permissions' => dcCore::app()->auth->makePermissions([ dcAuth::PERMISSION_USAGE, ]), - 'type' => 'plugin', - 'support' => 'https://github.com/JcDenis/mail2log', - 'details' => 'https://plugins.dotaddict.org/dc2/details/mail2log', - 'repository' => 'https://raw.githubusercontent.com/JcDenis/mail2log/master/dcstore.xml', + 'type' => 'plugin', + 'support' => 'https://github.com/JcDenis/' . basename(__DIR__), + 'details' => 'https://plugins.dotaddict.org/dc2/details/' . basename(__DIR__), + 'repository' => 'https://raw.githubusercontent.com/JcDenis/' . basename(__DIR__) . '/master/dcstore.xml', ] ); diff --git a/_prepend.php b/_prepend.php index f1f5abb..e399e21 100644 --- a/_prepend.php +++ b/_prepend.php @@ -20,7 +20,7 @@ if (!function_exists('_mail')) { $headers = is_array($headers) ? implode("\n\t", $headers) : (string) $headers; $cur = dcCore::app()->con->openCursor(dcCore::app()->prefix . dcLog::LOG_TABLE_NAME); - $cur->log_table = 'mail2log'; + $cur->log_table = basename(__DIR__); $cur->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);