]> git.wh0rd.org Git - tt-rss.git/commitdiff
changed the preg_split to explode per fox. fixed the template to
authorjustauser <justausr@hotmail.com>
Wed, 29 May 2013 12:06:05 +0000 (08:06 -0400)
committerjustauser <justausr@hotmail.com>
Wed, 29 May 2013 12:06:05 +0000 (08:06 -0400)
have a block for note and only include if there is a note

plugins/mail/init.php
templates/email_article_template.txt

index a7efcf273ea9d62d8b8b7bdcbb2922df8153f0bc..5b61c2355517c6ab4e0fb9d8d3dae02fba0673f2 100644 (file)
@@ -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);
 
index 602a9c4a1e81d81e6f5ec6ab1a21dece30634913..b6bc63921f4b242471946d65e44811cf1ee14a4a 100644 (file)
@@ -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 -->