From dfaf0a9015b6e592648abac645a8577bec1b9fd9 Mon Sep 17 00:00:00 2001
From: xiaomlove <353856593@qq.com>
Date: Tue, 2 Feb 2021 20:27:37 +0800
Subject: [PATCH] fix email encode and format
---
README.md | 2 +-
include/functions.php | 15 +++-
public/cheaterbox.php | 8 +-
public/cheaters.php | 2 +-
public/confirm_resend.php | 2 +-
public/forummanage.php | 4 +-
public/ipsearch.php | 4 +-
public/linksmanage.php | 16 ++--
public/location.php | 16 ++--
public/log.php | 8 +-
public/massmail.php | 3 +
public/messages.php | 2 +-
public/nowarn.php | 8 +-
public/recover.php | 6 +-
public/searchsuggest.php | 2 +-
public/settings.php | 58 +++++++++++++++
public/shoutbox.php | 2 +-
public/staffbox.php | 4 +-
public/takeconfirm.php | 10 +--
public/takeinvite.php | 2 +-
public/usersearch.php | 38 +++++-----
resources/static-pages/beian-aliyun.html | 94 ++++++++++++++++++++++++
22 files changed, 235 insertions(+), 71 deletions(-)
create mode 100644 resources/static-pages/beian-aliyun.html
diff --git a/README.md b/README.md
index 5f6230c1..43f37a92 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,2 @@
## Doc
-Visit [here](http://doc.nexusphp.cn/)
+Visit [here](http://doc.nexusphp.org/)
diff --git a/include/functions.php b/include/functions.php
index 4dc75011..8cae2981 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1432,7 +1432,7 @@ function sent_mail($to,$fromname,$fromemail,$subject,$body,$type = "confirmation
$message = (new Swift_Message($subject))
->setFrom($fromemail, $fromname)
->setTo([$to])
- ->setBody($body)
+ ->setBody($body, 'text/html')
;
// Send the message
@@ -2016,14 +2016,23 @@ function mkglobal($vars) {
return 1;
}
-function tr($x,$y,$noesc=0,$relation='') {
+function tr($x,$y,$noesc=0,$relation='', $return = false) {
if ($noesc)
$a = $y;
else {
$a = htmlspecialchars($y);
$a = str_replace("\n", "
\n", $a);
}
- print("