Commit b913c011 authored by friz's avatar friz
Browse files

Check SMARTY version for prefilter

parent ce1dc7db
......@@ -115,10 +115,12 @@ if (defined('usesmarty')) {
$smarty->cache_dir = "$phpTodo_work_dir/cache";
$smarty->config_dir = "$phpTodo_work_dir/config";
// Load whitespace pre-filter for Smarty
$smarty->addPluginsDir($phpTodo_http_dir . '/libs/');
$smarty->loadFilter("pre", 'whitespace_control');
// Load whitespace pre-filter for Smarty if < version 3.2
if (Smarty::SMARTY_VERSION < 3.2) {
$smarty->addPluginsDir($phpTodo_http_dir . '/libs/');
$smarty->loadFilter("pre", 'whitespace_control');
}
// Assign the stylesheet and favicon to smarty
$smarty->assign('phpTodo_stylesheet', $phpTodo_stylesheet);
$smarty->assign('phpTodo_favicon', $phpTodo_favicon);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment