summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjustauser <[email protected]>2013-05-29 08:06:05 -0400
committerjustauser <[email protected]>2013-05-29 08:06:05 -0400
commited7dd4bf6c8c94e740b32b17545b5fe60fedc1f0 (patch)
tree7434375a5c9a84dc174d4b53274610450bd89599
parent7aab5617b689701cd9b6210132ed4e9dd55d3941 (diff)
changed the preg_split to explode per fox. fixed the template to
have a block for note and only include if there is a note
-rw-r--r--plugins/mail/init.php8
-rw-r--r--templates/email_article_template.txt4
2 files changed, 8 insertions, 4 deletions
diff --git a/plugins/mail/init.php b/plugins/mail/init.php
index a7efcf273..5b61c2355 100644
--- a/plugins/mail/init.php
+++ b/plugins/mail/init.php
@@ -70,8 +70,12 @@ class Mail extends Plugin {
$subject = __("[Forwarded]") . " " . htmlspecialchars($line["title"]);
$tpl->setVariable('ARTICLE_TITLE', strip_tags($line["title"]));
+ $tnote = strip_tags($line["note"]);
+ if( $tnote != ''){
+ $tpl->setVariable('ARTICLE_NOTE', $tnote, true);
+ $tpl->addBlock('note');
+ }
$tpl->setVariable('ARTICLE_URL', strip_tags($line["link"]));
- $tpl->setVariable('ARTICLE_NOTE', strip_tags($line["note"]));
$tpl->addBlock('article');
}
@@ -138,7 +142,7 @@ class Mail extends Plugin {
$mail->From = strip_tags($_REQUEST['from_email']);
$mail->FromName = strip_tags($_REQUEST['from_name']);
//$mail->AddAddress($_REQUEST['destination']);
- $addresses = preg_split('/;/', $_REQUEST['destination'],-1,PREG_SPLIT_NO_EMPTY);
+ $addresses = explode(';', $_REQUEST['destination']);
foreach($addresses as $nextaddr)
$mail->AddAddress($nextaddr);
diff --git a/templates/email_article_template.txt b/templates/email_article_template.txt
index 602a9c4a1..b6bc63921 100644
--- a/templates/email_article_template.txt
+++ b/templates/email_article_template.txt
@@ -5,9 +5,9 @@ Thought I'd share the following with you:
<!-- $BeginBlock article -->
* ${ARTICLE_TITLE}
-
+<!-- $BeginBlock note -->
${ARTICLE_NOTE}
-
+<!-- $EndBlock note -->
${ARTICLE_URL}
<!-- $EndBlock article -->