Init basic Smarty when requesting CSS (Fixes #204)

In order to be able to call `serendipity_plugin_api_pre_event_hook` in a template's config.ini.php from serendipity.css.php, Smarty must be initialized first.
In case of a 'css' event, within the event hook $eventData contains the template's CSS which can now be manipulated and/or extended.
This commit is contained in:
Matthias Gutjahr 2014-08-20 17:10:44 +02:00
parent 8002559603
commit 959022fa07

View File

@ -548,6 +548,7 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
$serendipity['GET']['searchTerm'] = urldecode(htmlspecialchars(strip_tags(implode(' ', $search))));
include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');
} elseif (preg_match(PAT_CSS, $uri, $matches)) {
serendipity_smarty_init();
$serendipity['view'] = 'css';
$css_mode = $matches[1];
include(S9Y_INCLUDE_PATH . 'serendipity.css.php');