nav amount fix
This commit is contained in:
parent
ebaa8afe04
commit
7d7a1aadee
@ -2132,11 +2132,18 @@ function serendipity_loadGlobalThemeOptions(&$template_config, &$template_loaded
|
||||
'scope' => 'global'
|
||||
);
|
||||
|
||||
// This always needs to be present, if not it could happen that the template options do have an older version of this variable
|
||||
$template_config[] = $conf_amount;
|
||||
|
||||
if (!isset($template_loaded_config['amount']) || empty($template_loaded_config['amount'])) {
|
||||
$template_config[] = $conf_amount;
|
||||
$template_loaded_config['amount'] = $conf_amount['default'];
|
||||
}
|
||||
|
||||
|
||||
// Check if we are currently inside the admin interface.
|
||||
if ($serendipity['POST']['adminModule'] == 'templates' && $serendipity['POST']['adminAction'] == 'configure' && !empty($serendipity['POST']['template']['amount'])) {
|
||||
$template_loaded_config['amount'] = (int)$serendipity['POST']['template']['amount'];
|
||||
}
|
||||
|
||||
for ($i = 0; $i < $template_loaded_config['amount']; $i++) {
|
||||
$navlinks[] = array(
|
||||
'title' => $template_loaded_config['navlink' . $i . 'text'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user