Show configuration form after saving
This commit is contained in:
@ -20,8 +20,7 @@ if (!serendipity_checkPermission('siteConfiguration') && !serendipity_checkPermi
|
|||||||
|
|
||||||
$data = array();
|
$data = array();
|
||||||
|
|
||||||
switch ($_POST['installAction'] && serendipity_checkFormToken()) {
|
if ($_POST['installAction'] == 'check' && serendipity_checkFormToken()) {
|
||||||
case 'check':
|
|
||||||
$data['installAction'] = 'check';
|
$data['installAction'] = 'check';
|
||||||
$oldConfig = $serendipity;
|
$oldConfig = $serendipity;
|
||||||
$res = serendipity_updateConfiguration();
|
$res = serendipity_updateConfiguration();
|
||||||
@ -62,16 +61,10 @@ switch ($_POST['installAction'] && serendipity_checkFormToken()) {
|
|||||||
serendipity_buildPermalinks();
|
serendipity_buildPermalinks();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
$from = &$serendipity;
|
|
||||||
$t = serendipity_parseTemplate(S9Y_CONFIG_TEMPLATE);
|
|
||||||
$data['config'] = serendipity_printConfigTemplate($t, $from, false, true);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$data['config'] = serendipity_printConfigTemplate(serendipity_parseTemplate(S9Y_CONFIG_TEMPLATE), $serendipity, false, true);
|
||||||
|
|
||||||
if (!is_object($serendipity['smarty'])) {
|
if (!is_object($serendipity['smarty'])) {
|
||||||
serendipity_smarty_init();
|
serendipity_smarty_init();
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<h2>{$CONST.CONFIGURATION}</h2>
|
||||||
{if $installAction == 'check'}
|
{if $installAction == 'check'}
|
||||||
{if $diagnosticError}
|
{if $diagnosticError}
|
||||||
<h2>{$CONST.DIAGNOSTIC_ERROR}</h2>
|
<h2>{$CONST.DIAGNOSTIC_ERROR}</h2>
|
||||||
@ -17,7 +18,5 @@
|
|||||||
{/if}
|
{/if}
|
||||||
<span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.WRITTEN_N_SAVED}</span>
|
<span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.WRITTEN_N_SAVED}</span>
|
||||||
{/if}
|
{/if}
|
||||||
{else}
|
|
||||||
<h2>{$CONST.CONFIGURATION}</h2>
|
|
||||||
{$config}
|
|
||||||
{/if}
|
{/if}
|
||||||
|
{$config}
|
||||||
|
Reference in New Issue
Block a user