diff options
author | Andrew Dolgov <[email protected]> | 2013-05-30 08:36:42 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-05-30 08:36:42 +0400 |
commit | 1f5e9d9ab0541fbd25570d9be05bd4a487163807 (patch) | |
tree | b053718e74a4d4ddb7bd6397416438c5d6fa0a5e /plugins/mail/init.php | |
parent | 37f00f7fcc4ad076c1a54ad890d6b86edd2185d8 (diff) | |
parent | f766373271b4d388597f95ef2a55d028fcbca8f1 (diff) |
Merge branch 'master' of git://github.com/justauserx/Tiny-Tiny-RSS into justauserx-master
Diffstat (limited to 'plugins/mail/init.php')
-rw-r--r-- | plugins/mail/init.php | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/plugins/mail/init.php b/plugins/mail/init.php index 80bc7d417..3b1582081 100644 --- a/plugins/mail/init.php +++ b/plugins/mail/init.php @@ -50,13 +50,16 @@ class Mail extends Plugin { $tpl = new MiniTemplator; $tpl_t = new MiniTemplator; - $tpl->readTemplateFromFile("templates/email_article_template.txt"); + $templ_name = "templates/email_article_template.txt"; + if(file_exists("templates/my_email_article_template.txt")) + $templ_name = "templates/my_email_article_template.txt"; + $tpl->readTemplateFromFile($templ_name); $tpl->setVariable('USER_NAME', $_SESSION["name"], true); $tpl->setVariable('USER_EMAIL', $user_email, true); $tpl->setVariable('TTRSS_HOST', $_SERVER["HTTP_HOST"], true); - $result = db_query("SELECT link, content, title + $result = db_query("SELECT link, content, title, note FROM ttrss_user_entries, ttrss_entries WHERE id = ref_id AND id IN ($param) AND owner_uid = " . $_SESSION["uid"]); @@ -70,6 +73,11 @@ 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->addBlock('article'); @@ -136,7 +144,10 @@ class Mail extends Plugin { $mail->From = strip_tags($_REQUEST['from_email']); $mail->FromName = strip_tags($_REQUEST['from_name']); - $mail->AddAddress($_REQUEST['destination']); + //$mail->AddAddress($_REQUEST['destination']); + $addresses = explode(';', $_REQUEST['destination']); + foreach($addresses as $nextaddr) + $mail->AddAddress($nextaddr); $mail->IsHTML(false); $mail->Subject = $_REQUEST['subject']; |