Issue #164 - addresses commit @917fb30
This commit is contained in:
@ -282,12 +282,6 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
|
|||||||
/* get sidebar locations */
|
/* get sidebar locations */
|
||||||
serendipity_smarty_init();
|
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)) {
|
if (is_array($template_config)) {
|
||||||
$template_vars =& serendipity_loadThemeOptions($template_config);
|
$template_vars =& serendipity_loadThemeOptions($template_config);
|
||||||
}
|
}
|
||||||
@ -297,10 +291,6 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
|
|||||||
'eventh_col' => 'eventh'
|
'eventh_col' => 'eventh'
|
||||||
);
|
);
|
||||||
|
|
||||||
if ((! isset($template_vars['sidebars'])) && isset($sidebars)) {
|
|
||||||
$template_vars['sidebars'] = $sidebars;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($template_vars['sidebars'])) {
|
if (isset($template_vars['sidebars'])) {
|
||||||
$sidebars = explode(',', $template_vars['sidebars']);
|
$sidebars = explode(',', $template_vars['sidebars']);
|
||||||
} elseif (isset($serendipity['sidebars'])) {
|
} elseif (isset($serendipity['sidebars'])) {
|
||||||
|
@ -880,7 +880,7 @@ function serendipity_smarty_init($vars = array()) {
|
|||||||
include_once $template_dir . '/template.inc.php';
|
include_once $template_dir . '/template.inc.php';
|
||||||
} else {
|
} 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')) {
|
if (defined('IN_serendipity_admin')) {
|
||||||
$template_dir = $serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['template_backend'];
|
$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';
|
$config = $serendipity['smarty']->getConfigDir(0) . '/config.inc.php';
|
||||||
if (file_exists($config)) {
|
if (file_exists($config)) {
|
||||||
include_once $config;
|
include_once $config;
|
||||||
|
Reference in New Issue
Block a user