Issue #164 - addresses commit @917fb30
This commit is contained in:
parent
d1881e474f
commit
71e4a6c1a9
@ -282,12 +282,6 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
|
||||
/* get sidebar locations */
|
||||
serendipity_smarty_init();
|
||||
|
||||
if (isset($template_config['sidebars'])) {
|
||||
// we save the sidebars set by the template here, because serendipity_loadThemeOption
|
||||
// will otherwise overwrite it, since the move to a separate backend
|
||||
$sidebars = $template_config['sidebars'][0];
|
||||
}
|
||||
|
||||
if (is_array($template_config)) {
|
||||
$template_vars =& serendipity_loadThemeOptions($template_config);
|
||||
}
|
||||
@ -297,10 +291,6 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
|
||||
'eventh_col' => 'eventh'
|
||||
);
|
||||
|
||||
if ((! isset($template_vars['sidebars'])) && isset($sidebars)) {
|
||||
$template_vars['sidebars'] = $sidebars;
|
||||
}
|
||||
|
||||
if (isset($template_vars['sidebars'])) {
|
||||
$sidebars = explode(',', $template_vars['sidebars']);
|
||||
} elseif (isset($serendipity['sidebars'])) {
|
||||
|
@ -880,7 +880,7 @@ function serendipity_smarty_init($vars = array()) {
|
||||
include_once $template_dir . '/template.inc.php';
|
||||
} else {
|
||||
|
||||
// Backend template overwritten here (NOT earlier due to frontend specific check
|
||||
// Backend template overwritten here (NOT earlier due to frontend specific check)
|
||||
if (defined('IN_serendipity_admin')) {
|
||||
$template_dir = $serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['template_backend'];
|
||||
}
|
||||
@ -1068,6 +1068,13 @@ function serendipity_smarty_init($vars = array()) {
|
||||
}
|
||||
}
|
||||
|
||||
// FIRST: Load config of the currently configured FRONTEND template. We might actually need this in the backend (sidebar configuration, IPTC options, some others).
|
||||
// SECOND: Load config of the currently set template, which can also be the BACKEND template, or be the same as before. include_once takes care of only including the file once.
|
||||
$config = $serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['template'] . '/config.inc.php';
|
||||
if (file_exists($config)) {
|
||||
include_once $config;
|
||||
}
|
||||
|
||||
$config = $serendipity['smarty']->getConfigDir(0) . '/config.inc.php';
|
||||
if (file_exists($config)) {
|
||||
include_once $config;
|
||||
|
Loading…
x
Reference in New Issue
Block a user