freetag now uses API

This commit is contained in:
Ian 2015-08-19 12:40:43 +02:00
parent 63332b6d66
commit 7e7e4cc0c8
2 changed files with 7 additions and 11 deletions

View file

@ -1,3 +1,7 @@
3.65:
-----
* Use native API method parseTemplate() for the tpl file
3.64.1
----
* Fix a bug where related entries were shown on overview sections when

View file

@ -68,11 +68,11 @@ class serendipity_event_freetag extends serendipity_event
$propbag->add('stackable', false);
$propbag->add('author', 'Garvin Hicking, Jonathan Arkell, Grischa Brockhaus, Lars Strojny, Malte Paskuda, Ian');
$propbag->add('requirements', array(
'serendipity' => '0.8',
'serendipity' => '1.3',
'smarty' => '2.6.7',
'php' => '4.1.0'
));
$propbag->add('version', '3.64.1');
$propbag->add('version', '3.65');
$propbag->add('event_hooks', array(
'frontend_fetchentries' => true,
'frontend_fetchentry' => true,
@ -1511,15 +1511,7 @@ addLoadEvent(enableAutocomplete);
$serendipity['smarty']->assign('freetag_hasTags', false);
}
$filename = 'plugin_freetag.tpl';
$tfile = serendipity_getTemplateFile($filename, 'serendipityPath');
if (!$tfile || $tfile == $filename) {
$tfile = dirname(__FILE__) . '/' . $filename;
}
$inclusion = $serendipity['smarty']->security_settings[INCLUDE_ANY];
$serendipity['smarty']->security_settings[INCLUDE_ANY] = true;
$content = $serendipity['smarty']->fetch('file:'. $tfile);
$serendipity['smarty']->security_settings[INCLUDE_ANY] = $inclusion;
$content = $this->parseTemplate('plugin_freetag.tpl');
echo $content;
}