From 1f2a7219054872d3cf968ac385a5f529db4a4333 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 13 Mar 2020 14:40:35 +0300 Subject: allow overriding built-in templates via templates.local --- plugins/af_comics/filters/af_comics_gocomics.php | 4 +--- plugins/af_comics/filters/af_comics_gocomics_farside.php | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'plugins/af_comics') diff --git a/plugins/af_comics/filters/af_comics_gocomics.php b/plugins/af_comics/filters/af_comics_gocomics.php index 791dc07d3..2cb49b9bc 100644 --- a/plugins/af_comics/filters/af_comics_gocomics.php +++ b/plugins/af_comics/filters/af_comics_gocomics.php @@ -31,13 +31,11 @@ class Af_Comics_Gocomics extends Af_ComicFilter { $body = fetch_file_contents(array('url' => $article_link, 'type' => 'text/html', 'followlocation' => false)); - require_once 'lib/MiniTemplator.class.php'; - $feed_title = htmlspecialchars($comic[1]); $site_url = htmlspecialchars($site_url); $article_link = htmlspecialchars($article_link); - $tpl = new MiniTemplator(); + $tpl = new Templator(); $tpl->readTemplateFromFile('templates/generated_feed.txt'); diff --git a/plugins/af_comics/filters/af_comics_gocomics_farside.php b/plugins/af_comics/filters/af_comics_gocomics_farside.php index 783907e17..71c5e0059 100644 --- a/plugins/af_comics/filters/af_comics_gocomics_farside.php +++ b/plugins/af_comics/filters/af_comics_gocomics_farside.php @@ -25,11 +25,10 @@ class Af_Comics_Gocomics_FarSide extends Af_ComicFilter { public function on_fetch($url) { if (preg_match("#^https?://www\.thefarside\.com#", $url)) { - require_once 'lib/MiniTemplator.class.php'; $article_link = htmlspecialchars("https://www.thefarside.com" . date('/Y/m/d')); - $tpl = new MiniTemplator(); + $tpl = new Templator(); $tpl->readTemplateFromFile('templates/generated_feed.txt'); -- cgit v1.2.3