From 74490d65944098c564331a10b7e863d5430bce68 Mon Sep 17 00:00:00 2001 From: nupplaPhil Date: Sat, 1 Feb 2020 09:52:08 +0100 Subject: [PATCH] Cleanup enotify email - Removing unused fields - Move notify template to email subdirectory --- include/enotify.php | 14 ++------------ .../notify_html.tpl} | 0 .../notify_text.tpl} | 0 3 files changed, 2 insertions(+), 12 deletions(-) rename view/templates/{email_notify_html.tpl => email/notify_html.tpl} (100%) rename view/templates/{email_notify_text.tpl => email/notify_text.tpl} (100%) diff --git a/include/enotify.php b/include/enotify.php index e21adc91ac..b90f96d5aa 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -548,7 +548,6 @@ function notification($params) $datarray['source_link'] = $params['source_link'] ?? ''; $datarray['source_photo'] = $params['source_photo'] ?? ''; $datarray['uid'] = $params['uid']; - $datarray['username'] = $params['to_name'] ?? ''; $datarray['hsitelink'] = $hsitelink; $datarray['tsitelink'] = $tsitelink; $datarray['hitemlink'] = '' . $itemlink . ''; @@ -568,7 +567,7 @@ function notification($params) $content_allowed = ((!DI::config()->get('system', 'enotify_no_content')) || ($params['type'] == SYSTEM_EMAIL)); // load the template for private message notifications - $tpl = Renderer::getMarkupTemplate('email_notify_html.tpl'); + $tpl = Renderer::getMarkupTemplate('email/notify_html.tpl'); $email_html_body = Renderer::replaceMacros($tpl, [ '$banner' => $datarray['banner'], '$product' => $datarray['product'], @@ -578,7 +577,6 @@ function notification($params) '$source_name' => $datarray['source_name'], '$source_link' => $datarray['source_link'], '$source_photo' => $datarray['source_photo'], - '$username' => $datarray['username'], '$hsitelink' => $datarray['hsitelink'], '$hitemlink' => $datarray['hitemlink'], '$thanks' => $datarray['thanks'], @@ -589,17 +587,9 @@ function notification($params) ]); // load the template for private message notifications - $tpl = Renderer::getMarkupTemplate('email_notify_text.tpl'); + $tpl = Renderer::getMarkupTemplate('email/notify_text.tpl'); $email_text_body = Renderer::replaceMacros($tpl, [ - '$banner' => $datarray['banner'], - '$product' => $datarray['product'], '$preamble' => $datarray['preamble'], - '$sitename' => $datarray['sitename'], - '$siteurl' => $datarray['siteurl'], - '$source_name' => $datarray['source_name'], - '$source_link' => $datarray['source_link'], - '$source_photo' => $datarray['source_photo'], - '$username' => $datarray['username'], '$tsitelink' => $datarray['tsitelink'], '$titemlink' => $datarray['titemlink'], '$thanks' => $datarray['thanks'], diff --git a/view/templates/email_notify_html.tpl b/view/templates/email/notify_html.tpl similarity index 100% rename from view/templates/email_notify_html.tpl rename to view/templates/email/notify_html.tpl diff --git a/view/templates/email_notify_text.tpl b/view/templates/email/notify_text.tpl similarity index 100% rename from view/templates/email_notify_text.tpl rename to view/templates/email/notify_text.tpl -- 2.39.5