diff -r 098e744df928 -r a216e412c439 plugins/SpecialAdmin.php --- a/plugins/SpecialAdmin.php Sat Nov 15 18:22:13 2008 -0500 +++ b/plugins/SpecialAdmin.php Sat Nov 15 18:23:25 2008 -0500 @@ -246,10 +246,16 @@ // Global site options setConfig('site_name', $_POST['site_name']); setConfig('site_desc', $_POST['site_desc']); - setConfig('main_page', str_replace(' ', '_', $_POST['main_page'])); + setConfig('main_page', sanitize_page_id($_POST['main_page'])); setConfig('copyright_notice', $_POST['copyright']); setConfig('contact_email', $_POST['contact_email']); + setConfig('main_page_alt_enable', ( isset($_POST['main_page_alt_enable']) && $_POST['main_page_alt_enable'] === '1' ? '1' : '0' )); + if ( !empty($_POST['main_page_alt']) ) + { + setConfig('main_page_alt', sanitize_page_id($_POST['main_page_alt'])); + } + // Wiki mode if(isset($_POST['wikimode'])) setConfig('wiki_mode', '1'); else setConfig('wiki_mode', '0'); @@ -413,14 +419,76 @@ get('acpgc_heading_main'); ?> - get('acpgc_heading_submain'); ?> + + + get('acpgc_heading_submain'); ?> + + + + + + + get('acpgc_field_site_name'); ?> + + + + + + + + + + get('acpgc_field_site_desc'); ?> + + + + + - get('acpgc_field_site_name'); ?> - get('acpgc_field_site_desc'); ?> - get('acpgc_field_main_page'); ?> pagename_field('main_page', sanitize_page_id(getConfig('main_page'))); ?> - get('acpgc_field_copyright'); ?> - get('acpgc_field_copyright_hint'); ?> - get('acpgc_field_contactemail'); ?>
get('acpgc_field_contactemail_hint'); ?> + + + + get('acpgc_field_main_page'); ?> + + pagename_field('main_page', sanitize_page_id(getConfig('main_page'))); ?>
+
+ + + + > + + get('acpgc_field_main_page_members'); ?> + + + pagename_field('main_page_alt', sanitize_page_id(getConfig('main_page_alt', /* default alt to current main page */ getConfig('main_page', 'Main_Page')))); ?> + + + + + + + get('acpgc_field_copyright'); ?> + + + + + + + + get('acpgc_field_copyright_hint'); ?> + + + + + + + get('acpgc_field_contactemail'); ?>
+ get('acpgc_field_contactemail_hint'); ?> + + + + + @@ -2084,7 +2152,7 @@ $session->logout(USER_LEVEL_ADMIN); echo '

' . $lang->get('acplo_heading_main') . '

-

' . $lang->get('acplo_msg_logout_complete', array('mainpage_link' => makeUrl(getConfig('main_page')))) . '

'; +

' . $lang->get('acplo_msg_logout_complete', array('mainpage_link' => makeUrl(get_main_page()))) . '

'; } function page_Special_Administration() @@ -2534,11 +2602,14 @@ makeParserText($vars['sidebar_section_raw']); - $c = ($template->fetch_block($row['block_content'])) ? $template->fetch_block($row['block_content']) : $lang->get('sbedit_msg_plugin_not_loaded'); + $c = ($template->fetch_block($row['block_content'], true)) ? $template->fetch_block($row['block_content'], true) : $lang->get('sbedit_msg_plugin_not_loaded'); + break; } $c = preg_replace('/\{(restrict|hideif) ([a-z0-9_\(\)\|&! ]+)\}/', '', $c); @@ -2804,7 +2876,7 @@
- ' . $lang->get('sbedit_btn_create_new_stage1') . ' | ' . $lang->get('sbedit_btn_main_page') . ' + ' . $lang->get('sbedit_btn_create_new_stage1') . ' | ' . $lang->get('sbedit_btn_main_page') . ' ';