mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2026-01-07 22:19:24 +00:00
allow overriding built-in templates via templates.local
This commit is contained in:
@@ -92,18 +92,20 @@ class Mail extends Plugin {
|
||||
if ($row = $sth->fetch()) {
|
||||
$user_email = htmlspecialchars($row['email']);
|
||||
$user_name = htmlspecialchars($row['full_name']);
|
||||
} else {
|
||||
$user_name = "";
|
||||
$user_email = "";
|
||||
}
|
||||
|
||||
if (!$user_name) $user_name = $_SESSION['name'];
|
||||
if (!$user_name)
|
||||
$user_name = $_SESSION['name'];
|
||||
|
||||
print_hidden("from_email", "$user_email");
|
||||
print_hidden("from_name", "$user_name");
|
||||
|
||||
require_once "lib/MiniTemplator.class.php";
|
||||
$tpl = new Templator();
|
||||
|
||||
$tpl = new MiniTemplator;
|
||||
|
||||
$tpl->readTemplateFromFile("templates/email_article_template.txt");
|
||||
$tpl->readTemplateFromFile("email_article_template.txt");
|
||||
|
||||
$tpl->setVariable('USER_NAME', $_SESSION["name"], true);
|
||||
$tpl->setVariable('USER_EMAIL', $user_email, true);
|
||||
@@ -116,6 +118,8 @@ class Mail extends Plugin {
|
||||
|
||||
if (count($ids) > 1) {
|
||||
$subject = __("[Forwarded]") . " " . __("Multiple articles");
|
||||
} else {
|
||||
$subject = "";
|
||||
}
|
||||
|
||||
while ($line = $sth->fetch()) {
|
||||
|
||||
Reference in New Issue
Block a user