From 5f200bfa6969e2f2996e37c025832acf3f8d2762 Mon Sep 17 00:00:00 2001
From: Jean-Christian Denis
Date: Sun, 24 Dec 2023 11:46:51 +0100
Subject: [PATCH] cosmetic fix
---
CHANGELOG.md | 7 +++++++
README.md | 4 ++--
_define.php | 2 +-
dcstore.xml | 4 ++--
src/Frontend.php | 8 ++++----
5 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7309569..14f7fde 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,10 @@
+emailNotification 1.8 - 2023.12.24
+===========================================================
+* Require Dotclear 2.28
+* Require PHP 8.1
+* Fix translation
+* Fix type hint
+
emailNotification 1.7 - 2023.10.16
===========================================================
* Require Dotclear 2.28
diff --git a/README.md b/README.md
index a467011..ea99ae9 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
# README
-[![Release](https://img.shields.io/badge/release-1.7-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/emailNotification/releases)
-![Date](https://img.shields.io/badge/date-2023.10.16-c44d58.svg)
+[![Release](https://img.shields.io/badge/release-1.8-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/emailNotification/releases)
+![Date](https://img.shields.io/badge/date-2023.12.24-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/emailNotification)
[![License](https://img.shields.io/badge/license-GPL--2.0-ececec.svg)](https://git.dotclear.watch/JcDenis/emailNotification/src/branch/master/LICENSE)
diff --git a/_define.php b/_define.php
index faced8a..8248bcd 100644
--- a/_define.php
+++ b/_define.php
@@ -18,7 +18,7 @@ $this->registerModule(
'Email notification',
'Email notification',
'Olivier Meunier and contributors',
- '1.7',
+ '1.8',
[
'requires' => [['core', '2.28']],
'permissions' => 'My',
diff --git a/dcstore.xml b/dcstore.xml
index d76b590..8192537 100644
--- a/dcstore.xml
+++ b/dcstore.xml
@@ -2,10 +2,10 @@
Email notification
- 1.7
+ 1.8
Olivier Meunier and contributors
Email notification
- https://git.dotclear.watch/JcDenis/emailNotification/releases/download/v1.7/plugin-emailNotification.zip
+ https://git.dotclear.watch/JcDenis/emailNotification/releases/download/v1.8/plugin-emailNotification.zip
2.28
https://git.dotclear.watch/JcDenis/emailNotification/src/branch/master/README.md
https://git.dotclear.watch/JcDenis/emailNotification/issues
diff --git a/src/Frontend.php b/src/Frontend.php
index 408932c..ed2cac5 100644
--- a/src/Frontend.php
+++ b/src/Frontend.php
@@ -117,16 +117,16 @@ class Frontend extends Process
$subject = '[' . App::blog()->name() . '] ' . sprintf(__('"%s" - New comment'), $rs->f('post_title'));
$subject = Mail::B64Header($subject);
- $msg = preg_replace('%
\s*%msu', "\n\n", $rs->f('comment_content'));
+ $msg = preg_replace('%
\s*%msu', "\n\n", (string) $rs->f('comment_content'));
$msg = Html::clean($msg);
$msg = html_entity_decode($msg);
if ((int) $cur->getField('comment_status') == App::blog()::COMMENT_PUBLISHED) {
- $status = __('published');
+ $status = __('Published');
} elseif ((int) $cur->getField('comment_status') == App::blog()::COMMENT_UNPUBLISHED) {
- $status = __('unpublished');
+ $status = __('Unpublished');
} elseif ((int) $cur->getField('comment_status') == App::blog()::COMMENT_PENDING) {
- $status = __('pending');
+ $status = __('Pending');
} else {
// unknown status
$status = $cur->getField('comment_status');