From: nupplaPhil Date: Sat, 1 Feb 2020 08:52:08 +0000 (+0100) Subject: Cleanup enotify email X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=74490d65944098c564331a10b7e863d5430bce68;p=friendica.git Cleanup enotify email - Removing unused fields - Move notify template to email subdirectory --- 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 new file mode 100644 index 0000000000..d9eeb841fd --- /dev/null +++ b/view/templates/email/notify_html.tpl @@ -0,0 +1,37 @@ + + + + {{$banner}} + + + + + + + + + + + +{{if $content_allowed}} + {{if $source_photo}} + + + + + {{/if}} + + +{{/if}} + + + + + +
+ +
{{$product}}
+
+
{{$preamble nofilter}}
{{$source_name}}
{{$title}}
{{$htmlversion nofilter}}
{{$hsitelink nofilter}}
{{$hitemlink nofilter}}
{{$thanks}}
{{$site_admin}}
+ + diff --git a/view/templates/email/notify_text.tpl b/view/templates/email/notify_text.tpl new file mode 100644 index 0000000000..28b644d248 --- /dev/null +++ b/view/templates/email/notify_text.tpl @@ -0,0 +1,14 @@ + +{{$preamble nofilter}} + +{{if $content_allowed}} +{{$title nofilter}} + +{{$textversion nofilter}} + +{{/if}} +{{$tsitelink nofilter}} +{{$titemlink nofilter}} + +{{$thanks nofilter}} +{{$site_admin nofilter}} diff --git a/view/templates/email_notify_html.tpl b/view/templates/email_notify_html.tpl deleted file mode 100644 index d9eeb841fd..0000000000 --- a/view/templates/email_notify_html.tpl +++ /dev/null @@ -1,37 +0,0 @@ - - - - {{$banner}} - - - - - - - - - - - -{{if $content_allowed}} - {{if $source_photo}} - - - - - {{/if}} - - -{{/if}} - - - - - -
- -
{{$product}}
-
-
{{$preamble nofilter}}
{{$source_name}}
{{$title}}
{{$htmlversion nofilter}}
{{$hsitelink nofilter}}
{{$hitemlink nofilter}}
{{$thanks}}
{{$site_admin}}
- - diff --git a/view/templates/email_notify_text.tpl b/view/templates/email_notify_text.tpl deleted file mode 100644 index 28b644d248..0000000000 --- a/view/templates/email_notify_text.tpl +++ /dev/null @@ -1,14 +0,0 @@ - -{{$preamble nofilter}} - -{{if $content_allowed}} -{{$title nofilter}} - -{{$textversion nofilter}} - -{{/if}} -{{$tsitelink nofilter}} -{{$titemlink nofilter}} - -{{$thanks nofilter}} -{{$site_admin nofilter}}