Removed useless "Subject:" from email templates (#993)

* Removed useless "Subject:" from email templates

* Updated

* Updated
This commit is contained in:
Roman Kelesidis 2023-10-26 15:53:48 +07:00 committed by GitHub
commit 3f835e30e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 14 additions and 41 deletions

View file

@ -178,7 +178,6 @@ if (!$group_id) {
$emailer->set_template('group_request', $moderator['user_lang']);
$emailer->assign_vars([
'USER' => $userdata['username'],
'SITENAME' => $bb_cfg['sitename'],
'GROUP_MODERATOR' => $moderator['username'],
'U_GROUP' => make_url(GROUP_URL . $group_id)
]);
@ -234,7 +233,6 @@ if (!$group_id) {
$emailer->set_template('group_added', $row['user_lang']);
$emailer->assign_vars([
'SITENAME' => $bb_cfg['sitename'],
'GROUP_NAME' => $group_info['group_name'],
'U_GROUP' => make_url(GROUP_URL . $group_id)
]);
@ -293,7 +291,6 @@ if (!$group_id) {
$emailer->set_template('group_approved', $row['user_lang']);
$emailer->assign_vars([
'SITENAME' => $bb_cfg['sitename'],
'GROUP_NAME' => $group_info['group_name'],
'U_GROUP' => make_url(GROUP_URL . $group_id)
]);

View file

@ -60,7 +60,6 @@ if ($row = DB()->fetch_row($sql)) {
$emailer->set_template('profile_send_email', $user_lang);
$emailer->assign_vars([
'SITENAME' => $bb_cfg['sitename'],
'FROM_USERNAME' => $userdata['username'],
'TO_USERNAME' => $username,
'MESSAGE' => $message

View file

@ -578,7 +578,6 @@ if ($submit && !$errors) {
$emailer->set_template($email_template, $user_lang);
$emailer->assign_vars([
'SITENAME' => $bb_cfg['sitename'],
'WELCOME_MSG' => sprintf($lang['WELCOME_SUBJECT'], $bb_cfg['sitename']),
'USERNAME' => html_entity_decode($username),
'PASSWORD' => $new_pass,
@ -610,7 +609,6 @@ if ($submit && !$errors) {
$emailer->set_template('user_activate', $pr_data['user_lang']);
$emailer->assign_vars([
'SITENAME' => $bb_cfg['sitename'],
'USERNAME' => html_entity_decode($username),
'U_ACTIVATE' => make_url("profile.php?mode=activate&u={$pr_data['user_id']}&act_key=$user_actkey"),
]);

View file

@ -55,7 +55,6 @@ if (isset($_POST['submit'])) {
$emailer->set_template('user_activate_passwd', $row['user_lang']);
$emailer->assign_vars([
'SITENAME' => $bb_cfg['sitename'],
'USERNAME' => $username,
'PASSWORD' => $user_password,
'U_ACTIVATE' => make_url('profile.php?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey)

View file

@ -1,6 +1,4 @@
Subject: You have been added to this usergroup
Congratulations,
Congratulations!
You have been added to the "{GROUP_NAME}" group on {SITENAME}.
This action was done by the group moderator or the site administrator, contact them for more information.

View file

@ -1,6 +1,4 @@
Subject: Your request has been approved
Congratulations,
Congratulations!
Your request to join the "{GROUP_NAME}" group on {SITENAME} has been approved.
Click on the following link to see your group membership.

View file

@ -1,6 +1,4 @@
Subject: A request to join your group has been made
Dear {GROUP_MODERATOR},
Dear {GROUP_MODERATOR}.
A user {USER} has requested to join a group you moderator on {SITENAME}.
To approve or deny this request for group membership please visit the following link:

View file

@ -1,6 +1,4 @@
Subject: New Private Message has arrived
Hello {USERNAME},
Hello, {USERNAME}!
You have received a new private message to your account on "{SITENAME}" and you have requested that you be notified on this event. You can view your new message by clicking on the following link:

View file

@ -1,4 +1,4 @@
Hello {TO_USERNAME},
Hello, {TO_USERNAME}!
The following is an email sent to you by {FROM_USERNAME} via your account on {SITENAME}. If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address:

View file

@ -1,6 +1,4 @@
Subject: Topic Reply Notification - {TOPIC_TITLE}
Hello,
Hello, {USERNAME}!
You are receiving this email because you are watching the topic, "{TOPIC_TITLE}" at {SITENAME}. This topic has received a reply since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic.

View file

@ -1,6 +1,4 @@
Subject: Reactivate your account
Hello {USERNAME},
Hello, {USERNAME}!
Your account on "{SITENAME}" has been deactivated, most likely due to changes made to your profile. In order to reactivate your account you must click on the link below:

View file

@ -1,6 +1,4 @@
Subject: New password activation
Hello {USERNAME}
Hello, {USERNAME}!
You are receiving this email because you have (or someone pretending to be you has) requested a new password be sent for your account on {SITENAME}. If you did not request this email then please ignore it, if you keep receiving it please contact the board administrator.

View file

@ -1,5 +1,3 @@
Subject: Welcome to {SITENAME} Forums
{WELCOME_MSG}
Please keep this email for your records. Your account information is as follows:

View file

@ -1,5 +1,3 @@
Subject: Welcome to {SITENAME} Forums
{WELCOME_MSG}
Please keep this email for your records. Your account information is as follows:

View file

@ -379,7 +379,6 @@ $lang['DELETED'] = 'Your message has been deleted successfully.';
$lang['POLL_DELETE'] = 'Your poll has been deleted successfully.';
$lang['VOTE_CAST'] = 'Your vote has been cast.';
$lang['TOPIC_REPLY_NOTIFICATION'] = 'Topic Reply Notification';
$lang['EMOTICONS'] = 'Emoticons';
$lang['MORE_EMOTICONS'] = 'View more Emoticons';
@ -2817,7 +2816,7 @@ $lang['EMAILER_SUBJECT'] = [
'GROUP_APPROVED' => 'Your request to join the user group has been granted',
'GROUP_REQUEST' => 'A request to join your user group',
'PRIVMSG_NOTIFY' => 'New private message',
'TOPIC_NOTIFY' => 'Notification of response in the thread %s',
'TOPIC_NOTIFY' => 'Notification of response in the thread - %s',
'USER_ACTIVATE' => 'Account reactivation',
'USER_ACTIVATE_PASSWD' => 'Confirming a new password',
'USER_WELCOME' => 'Welcome to the site %s',

View file

@ -917,7 +917,6 @@ if ($mode == 'read') {
'USERNAME' => html_entity_decode($to_username),
'NAME_FROM' => $userdata['username'],
'MSG_SUBJECT' => html_entity_decode($privmsg_subject),
'SITENAME' => $bb_cfg['sitename'],
'U_INBOX' => make_url(PM_URL . "?folder=inbox&mode=read&p=$privmsg_sent_id"),
]);

View file

@ -45,7 +45,7 @@ class Emailer
*
* @return void
*/
public function set_subject(string $subject)
public function set_subject(string $subject): void
{
$this->subject = $subject;
}
@ -58,7 +58,7 @@ class Emailer
*
* @return void
*/
public function set_to(string $email, string $name)
public function set_to(string $email, string $name): void
{
$this->to = new Address($email, $name);
}
@ -70,7 +70,7 @@ class Emailer
*
* @return void
*/
public function set_reply(string $email)
public function set_reply(string $email): void
{
$this->reply = new Address($email);
}
@ -83,7 +83,7 @@ class Emailer
*
* @return void
*/
public function set_template(string $template_file, string $template_lang = '')
public function set_template(string $template_file, string $template_lang = ''): void
{
global $bb_cfg;
@ -206,7 +206,7 @@ class Emailer
*
* @return void
*/
public function assign_vars($vars)
public function assign_vars($vars): void
{
global $bb_cfg;