1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 15:35:55 +00:00

allow overriding built-in templates via templates.local

This commit is contained in:
Andrew Dolgov
2020-03-13 14:40:35 +03:00
parent 82326187f9
commit 1f2a721905
10 changed files with 48 additions and 40 deletions

View File

@@ -213,11 +213,9 @@ class Pref_Prefs extends Handler_Protected {
if ($old_email != $email) {
$mailer = new Mailer();
require_once "lib/MiniTemplator.class.php";
$tpl = new Templator();
$tpl = new MiniTemplator;
$tpl->readTemplateFromFile("templates/mail_change_template.txt");
$tpl->readTemplateFromFile("mail_change_template.txt");
$tpl->setVariable('LOGIN', $row["login"]);
$tpl->setVariable('NEWMAIL', $email);
@@ -1087,11 +1085,9 @@ class Pref_Prefs extends Handler_Protected {
if ($row = $sth->fetch()) {
$mailer = new Mailer();
require_once "lib/MiniTemplator.class.php";
$tpl = new Templator();
$tpl = new MiniTemplator;
$tpl->readTemplateFromFile("templates/otp_disabled_template.txt");
$tpl->readTemplateFromFile("otp_disabled_template.txt");
$tpl->setVariable('LOGIN', $row["login"]);
$tpl->setVariable('TTRSS_HOST', SELF_URL_PATH);