# HG changeset patch # User Dan # Date 1226791405 18000 # Node ID a216e412c439d2cdd272f19a1f3eb581ff25c29a # Parent 098e744df928663bec8aae1a89b77b704eef35f5 Added ability to have alternate main page for members diff -r 098e744df928 -r a216e412c439 includes/clientside/static/login.js --- a/includes/clientside/static/login.js Sat Nov 15 18:22:13 2008 -0500 +++ b/includes/clientside/static/login.js Sat Nov 15 18:23:25 2008 -0500 @@ -19,7 +19,14 @@ return true; ajaxLoginInit(function(k) { - window.location.reload(); + if ( on_main_page ) + { + window.location = makeUrl(main_page_members); + } + else + { + window.location.reload(); + } }, USER_LEVEL_MEMBER); } diff -r 098e744df928 -r a216e412c439 includes/functions.php --- a/includes/functions.php Sat Nov 15 18:22:13 2008 -0500 +++ b/includes/functions.php Sat Nov 15 18:23:25 2008 -0500 @@ -260,6 +260,27 @@ } /** + * Returns the full page ID string of the main page. + * @return string + */ + +function get_main_page($force_logged_in = false) +{ + global $db, $session, $paths, $template, $plugins; // Common objects + + $logged_in = false; + if ( is_object($session) && !$force_logged_in ) + { + $logged_in = $session->user_logged_in; + } + else if ( $force_logged_in ) + { + $logged_in = true; + } + return $logged_in ? getConfig('main_page_alt', getConfig('main_page')) : getConfig('main_page'); +} + +/** * Enano replacement for date(). Accounts for individual users' timezone preferences. * @param string Date-formatted string * @param int Optional - UNIX timestamp value to use. If omitted, the current time is used. diff -r 098e744df928 -r a216e412c439 includes/pageprocess.php --- a/includes/pageprocess.php Sat Nov 15 18:22:13 2008 -0500 +++ b/includes/pageprocess.php Sat Nov 15 18:23:25 2008 -0500 @@ -359,47 +359,59 @@ } } } - else // (disabled for compatibility reasons) if ( in_array($this->namespace, array('Article', 'User', 'Project', 'Help', 'File', 'Category')) && $this->page_exists ) + else { - // Send as regular page - if ( $this->send_headers ) + $this->send_from_db($strict_no_headers); + } + } + + /** + * Sends the page through by fetching it from the database. + */ + + function send_from_db($strict_no_headers = false) + { + global $db, $session, $paths, $template, $plugins; // Common objects + global $lang; + + // Send as regular page + if ( $this->send_headers ) + { + $template->init_vars($this); + } + + $text = $this->fetch_text(); + + if ( $text == 'err_no_text_rows' ) + { + $this->err_no_rows(); + return false; + } + else + { + $redirect = ( isset($_GET['redirect']) ) ? $_GET['redirect'] : 'YES YOU IDIOT'; + if ( preg_match('/^#redirect \[\[([^\]]+)\]\]/i', $text, $match) && $redirect != 'no' ) { - $template->init_vars($this); - } - - $text = $this->fetch_text(); - - if ( $text == 'err_no_text_rows' ) - { - $this->err_no_rows(); - return false; + // Redirect page! + $page_to = sanitize_page_id($match[1]); + $page_id_data = RenderMan::strToPageID($page_to); + if ( count($this->redirect_stack) >= 3 ) + { + $this->render( (!$strict_no_headers), '
' . $lang->get('page_err_redirects_exceeded') . '
' ); + } + else + { + $result = $this->_handle_redirect($page_id_data[0], $page_id_data[1]); + if ( $result !== true ) + { + // There was some error during the redirect process - usually an infinite redirect + $this->render( (!$strict_no_headers), '
' . $result . '
' ); + } + } } else { - $redirect = ( isset($_GET['redirect']) ) ? $_GET['redirect'] : 'YES YOU IDIOT'; - if ( preg_match('/^#redirect \[\[([^\]]+)\]\]/i', $text, $match) && $redirect != 'no' ) - { - // Redirect page! - $page_to = sanitize_page_id($match[1]); - $page_id_data = RenderMan::strToPageID($page_to); - if ( count($this->redirect_stack) >= 3 ) - { - $this->render( (!$strict_no_headers), '
' . $lang->get('page_err_redirects_exceeded') . '
' ); - } - else - { - $result = $this->_handle_redirect($page_id_data[0], $page_id_data[1]); - if ( $result !== true ) - { - // There was some error during the redirect process - usually an infinite redirect - $this->render( (!$strict_no_headers), '
' . $result . '
' ); - } - } - } - else - { - $this->render( (!$strict_no_headers) ); - } + $this->render( (!$strict_no_headers) ); } } } @@ -1952,13 +1964,13 @@ { $standard_404 .= ' ' . $lang->get('page_msg_404_create', array( 'create_flags' => 'href="'.makeUrlNS($this->namespace, $this->page_id, 'do=edit', true).'" onclick="ajaxEditor(); return false;"', - 'mainpage_link' => makeUrl(getConfig('main_page'), false, true) + 'mainpage_link' => makeUrl(get_main_page(), false, true) )); } else { $standard_404 .= ' ' . $lang->get('page_msg_404_gohome', array( - 'mainpage_link' => makeUrl(getConfig('main_page'), false, true) + 'mainpage_link' => makeUrl(get_main_page(), false, true) )); } $standard_404 .= '

'; @@ -2041,16 +2053,16 @@ { // Display the "home" link first. $pathskey = $paths->nslist[ $this->namespace ] . $this->page_id; - if ( $pathskey !== getConfig('main_page') ) - echo ''; + if ( $pathskey !== get_main_page() ) + echo ''; echo $lang->get('onpage_btn_breadcrumbs_home'); - if ( $pathskey !== getConfig('main_page') ) + if ( $pathskey !== get_main_page() ) echo ''; } foreach ( $breadcrumb_data as $i => $crumb ) { $cumulative = implode('/', array_slice($breadcrumb_data, 0, ( $i + 1 ))); - if ( $show_home && $cumulative === getConfig('main_page') ) + if ( $show_home && $cumulative === get_main_page() ) continue; if ( $show_home || $i > 0 ) echo ' » '; diff -r 098e744df928 -r a216e412c439 includes/paths.php --- a/includes/paths.php Sat Nov 15 18:22:13 2008 -0500 +++ b/includes/paths.php Sat Nov 15 18:23:25 2008 -0500 @@ -192,7 +192,7 @@ if ( defined('ENANO_INTERFACE_INDEX') || defined('ENANO_INTERFACE_AJAX') || defined('IN_ENANO_UPGRADE') ) { $title = $this->parse_url(false); - if ( empty($title) && getConfig('main_page') != '' ) + if ( empty($title) && get_main_page() != '' ) { $this->main_page(); } @@ -358,9 +358,9 @@ if($this->namespace == 'Special' && !$this->external_api_page) { // Can't load nonexistent pages - if( is_string(getConfig('main_page')) ) + if( is_string(get_main_page()) ) { - $main_page = makeUrl(getConfig('main_page')); + $main_page = makeUrl(get_main_page()); } else { @@ -408,9 +408,9 @@ function main_page() { - if( is_string(getConfig('main_page')) ) + if( is_string(get_main_page()) ) { - $main_page = makeUrl(getConfig('main_page')); + $main_page = makeUrl(get_main_page()); } else { diff -r 098e744df928 -r a216e412c439 includes/template.php --- a/includes/template.php Sat Nov 15 18:22:13 2008 -0500 +++ b/includes/template.php Sat Nov 15 18:23:25 2008 -0500 @@ -14,7 +14,7 @@ class template { - var $tpl_strings, $tpl_bool, $vars_assign_history, $theme, $style, $no_headers, $additional_headers, $sidebar_extra, $sidebar_widgets, $toolbar_menu, $theme_list, $named_theme_list, $default_theme, $default_style, $plugin_blocks, $namespace_string, $style_list, $theme_loaded, $initted_to_page_id, $initted_to_namespace; + var $tpl_strings, $tpl_bool, $vars_assign_history, $theme, $style, $no_headers, $additional_headers, $sidebar_extra, $sidebar_widgets, $toolbar_menu, $theme_list, $named_theme_list, $default_theme, $default_style, $plugin_blocks, $plugin_blocks_content, $namespace_string, $style_list, $theme_loaded, $initted_to_page_id, $initted_to_namespace; var $initted_to_theme = array( 'theme' => false, @@ -54,6 +54,7 @@ $this->toolbar_menu = ''; $this->additional_headers = ''; $this->plugin_blocks = Array(); + $this->plugin_blocks_content = array(); $this->theme_loaded = false; $this->theme_list = Array(); @@ -185,7 +186,7 @@ } /** - * Systematically deletes themes if they're blocked by theme security settings. Called when session->start() finishes. + * Systematically deletes themes from available list if they're blocked by theme security settings. Called when session->start() finishes. */ function process_theme_acls() @@ -305,6 +306,7 @@ $parser->assign_vars(Array('TITLE' => '{TITLE}','CONTENT' => $h)); $this->plugin_blocks[$t] = $parser->run(); + $this->plugin_blocks_content[$t] = $h; $this->sidebar_widgets .= $parser->run(); } function add_header($html) @@ -344,7 +346,7 @@ // If it was removed, it's probably blocked by an ACL, or it was uninstalled !isset($this->named_theme_list[$this->theme]) || // Check if the theme is disabled - ( isset($this->named_theme_list[$this->theme]) && $this->named_theme_list[$this->theme]['enabled'] == 0 ) ) + ( isset($this->named_theme_list[$this->theme]) && isset($this->named_theme_list[$this->theme]['enabled']) && $this->named_theme_list[$this->theme]['enabled'] == 0 ) ) // Above all, if it's a system theme, don't inhibit the loading process. && !in_array($this->theme, $this->system_themes) ) @@ -1105,6 +1107,14 @@ $admin_link = $parser->run(); + $parser->assign_vars(Array( + 'HREF'=>makeUrlNS('Special', 'EditSidebar'), + 'FLAGS'=>'onclick="if ( !KILL_SWITCH ) { void(ajaxLoginNavTo(\'Special\', \'EditSidebar\', ' . USER_LEVEL_ADMIN . ')); return false; }"', + 'TEXT'=>$lang->get('sidebar_btn_editsidebar'), + )); + + $sidebar_link = $parser->run(); + $SID = ($session->sid_super) ? $session->sid_super : ''; $urlname_clean = str_replace('\'', '\\\'', str_replace('\\', '\\\\', dirtify_page_id($local_fullpage))); @@ -1128,6 +1138,8 @@ // SKIN DEVELOPERS: The template variable for this code block is {JS_DYNAMIC_VARS}. This MUST be inserted BEFORE the tag that links to the main Javascript lib. var title = \''. $urlname_jssafe .'\'; var physical_title = \'' . $physical_urlname_jssafe . '\'; + var on_main_page = ' . ( $local_page == get_main_page() ? 'true' : 'false' ) . '; + var main_page_members = \'' . addslashes(get_main_page(true)) . '\'; var page_exists = '. ( ( $local_page_exists) ? 'true' : 'false' ) .'; var scriptPath = \'' . addslashes(scriptPath) . '\'; var contentPath = \'' . addslashes(contentPath) . '\'; @@ -1173,39 +1185,40 @@ $js_dynamic .= "\n //]]>\n "; $tpl_strings = Array( - 'PAGE_NAME'=>htmlspecialchars($local_cdata['name']), - 'PAGE_URLNAME'=> $urlname_clean, - 'SITE_NAME'=>htmlspecialchars(getConfig('site_name')), - 'USERNAME'=>$session->username, - 'SITE_DESC'=>htmlspecialchars(getConfig('site_desc')), - 'TOOLBAR'=>$tb, - 'SCRIPTPATH'=>scriptPath, - 'CONTENTPATH'=>contentPath, + 'PAGE_NAME' => htmlspecialchars($local_cdata['name']), + 'PAGE_URLNAME' => $urlname_clean, + 'SITE_NAME' => htmlspecialchars(getConfig('site_name')), + 'USERNAME' => $session->username, + 'SITE_DESC' => htmlspecialchars(getConfig('site_desc')), + 'TOOLBAR' => $tb, + 'SCRIPTPATH' => scriptPath, + 'CONTENTPATH' => contentPath, 'CDNPATH' => cdnPath, - 'ADMIN_SID_QUES'=>$asq, - 'ADMIN_SID_AMP'=>$asa, - 'ADMIN_SID_AMP_HTML'=>$ash, - 'ADMIN_SID_AUTO'=>$as2, - 'ADMIN_SID_RAW'=> ( is_string($session->sid_super) ? $session->sid_super : '' ), - 'COPYRIGHT'=>RenderMan::parse_internal_links(getConfig('copyright_notice')), - 'TOOLBAR_EXTRAS'=>$this->toolbar_menu, - 'REQUEST_URI'=>( defined('ENANO_CLI') ? '' : $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'] ), - 'STYLE_LINK'=>makeUrlNS('Special', 'CSS'.$p, null, true), //contentPath.$paths->nslist['Special'].'CSS' . $p, - 'LOGIN_LINK'=>$login_link, - 'LOGOUT_LINK'=>$logout_link, - 'ADMIN_LINK'=>$admin_link, - 'THEME_LINK'=>$theme_link, - 'SEARCH_ACTION'=>makeUrlNS('Special', 'Search'), - 'INPUT_TITLE'=>( urlSeparator == '&' ? '' : ''), - 'INPUT_AUTH'=>( $session->sid_super ? '' : ''), - 'TEMPLATE_DIR'=>scriptPath.'/themes/'.$this->theme, - 'THEME_ID'=>$this->theme, - 'STYLE_ID'=>$this->style, - 'MAIN_PAGE' => getConfig('main_page'), + 'ADMIN_SID_QUES' => $asq, + 'ADMIN_SID_AMP' => $asa, + 'ADMIN_SID_AMP_HTML' => $ash, + 'ADMIN_SID_AUTO' => $as2, + 'ADMIN_SID_RAW' => ( is_string($session->sid_super) ? $session->sid_super : '' ), + 'COPYRIGHT' => RenderMan::parse_internal_links(getConfig('copyright_notice')), + 'TOOLBAR_EXTRAS' => $this->toolbar_menu, + 'REQUEST_URI' => ( defined('ENANO_CLI') ? '' : $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'] ), + 'STYLE_LINK' => makeUrlNS('Special', 'CSS'.$p, null, true), //contentPath.$paths->nslist['Special'].'CSS' . $p, + 'LOGIN_LINK' => $login_link, + 'LOGOUT_LINK' => $logout_link, + 'ADMIN_LINK' => $admin_link, + 'THEME_LINK' => $theme_link, + 'SIDEBAR_LINK' => $sidebar_link, + 'SEARCH_ACTION' => makeUrlNS('Special', 'Search'), + 'INPUT_TITLE' => ( urlSeparator == '&' ? '' : ''), + 'INPUT_AUTH' => ( $session->sid_super ? '' : ''), + 'TEMPLATE_DIR' => scriptPath.'/themes/'.$this->theme, + 'THEME_ID' => $this->theme, + 'STYLE_ID' => $this->style, + 'MAIN_PAGE' => get_main_page(), 'JS_HEADER' => $js_head, 'JS_FOOTER' => $js_foot, - 'JS_DYNAMIC_VARS'=>$js_dynamic, - 'UNREAD_PMS'=>$session->unread_pms, + 'JS_DYNAMIC_VARS' => $js_dynamic, + 'UNREAD_PMS' => $session->unread_pms, 'URL_ABOUT_ENANO' => makeUrlNS('Special', 'About_Enano', '', true), 'REPORT_URI' => makeUrl($local_fullpage, 'do=sql_report', true) ); @@ -2042,10 +2055,17 @@ * @return string */ - function fetch_block($id) + function fetch_block($id, $just_the_innards_maam = false) { - if(isset($this->plugin_blocks[$id])) return $this->plugin_blocks[$id]; - else return false; + if ( $just_the_innards_maam ) + { + $source =& $this->plugin_blocks_content; + } + else + { + $source =& $this->plugin_blocks; + } + return isset($source[$id]) ? $source[$id] : false; } /** diff -r 098e744df928 -r a216e412c439 install/upgrade.php --- a/install/upgrade.php Sat Nov 15 18:22:13 2008 -0500 +++ b/install/upgrade.php Sat Nov 15 18:23:25 2008 -0500 @@ -59,7 +59,7 @@ if ( enano_version() == installer_enano_version() ) { $ui->show_header(); - $link_home = makeUrl(getConfig('main_page'), false, true); + $link_home = makeUrl(get_main_page(), false, true); echo '

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

' . '

' . $lang->get('upgrade_err_current_body', array('mainpage_link' => $link_home)) . '

' . '

' . $lang->get('upgrade_err_current_body_para2', array('mainpage_link' => $link_home)) . '

'; @@ -255,7 +255,7 @@ // demote privileges $session->logout(USER_LEVEL_ADMIN); - $link_home = makeUrl(getConfig('main_page'), false, true); + $link_home = makeUrl(get_main_page(), false, true); echo '

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

'; echo '

' . $lang->get('upgrade_post_status_finish_body', array('mainpage_link' => $link_home)) . '

'; } diff -r 098e744df928 -r a216e412c439 language/english/admin.json --- a/language/english/admin.json Sat Nov 15 18:22:13 2008 -0500 +++ b/language/english/admin.json Sat Nov 15 18:23:25 2008 -0500 @@ -242,6 +242,9 @@ field_site_name: 'Site name:', field_site_desc: 'Site description:', field_main_page: 'Main page:', + field_main_page_option_same: 'Use the same main page for everyone', + field_main_page_option_members: 'Use a different main page for members:', + field_main_page_members: 'Main page for members:', field_copyright: 'Copyright notice shown on pages:', field_copyright_hint: 'Hint: To make a copyright symbol (©), type ©.', field_contactemail: 'Contact e-mail', 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') . ' '; diff -r 098e744df928 -r a216e412c439 plugins/SpecialUserFuncs.php --- a/plugins/SpecialUserFuncs.php Sat Nov 15 18:22:13 2008 -0500 +++ b/plugins/SpecialUserFuncs.php Sat Nov 15 18:23:25 2008 -0500 @@ -624,7 +624,7 @@ 'username' => $session->username, 'redir_target' => $lang->get('user_login_success_body_mainpage') ); - redirect( makeUrl(getConfig('main_page'), false, true), $lang->get('user_login_success_title'), $lang->get('user_login_success_body', $subst) ); + redirect( makeUrl(get_main_page(), false, true), $lang->get('user_login_success_title'), $lang->get('user_login_success_body', $subst) ); } } else @@ -674,7 +674,7 @@ $l = $session->logout(); if ( $l == 'success' ) { - $url = makeUrl(getConfig('main_page'), false, true); + $url = makeUrl(get_main_page(), false, true); if ( $paths->getParam(1) ) { $pi = explode('/', $paths->getAllParams()); @@ -1442,7 +1442,7 @@ $ret = ( isset($_POST['return_to']) ) ? $_POST['return_to'] : $paths->getParam(0); if ( !$ret ) { - $ret = getConfig('main_page'); + $ret = get_main_page(); } ?>
@@ -1665,7 +1665,7 @@ if($q) { $session->login_without_crypto($row['username'], $data); - echo '

' . $lang->get('userfuncs_passreset_stage2_success', array('url_mainpage' => makeUrl(getConfig('main_page')))) . '

'; + echo '

' . $lang->get('userfuncs_passreset_stage2_success', array('url_mainpage' => makeUrl(get_main_page()))) . '

'; } else { diff -r 098e744df928 -r a216e412c439 plugins/SpecialUserPrefs.php --- a/plugins/SpecialUserPrefs.php Sat Nov 15 18:22:13 2008 -0500 +++ b/plugins/SpecialUserPrefs.php Sat Nov 15 18:23:25 2008 -0500 @@ -269,11 +269,11 @@ { if ( getConfig('account_activation') == 'user' ) { - redirect(makeUrl(getConfig('main_page')), $lang->get('usercp_emailpassword_msg_profile_success'), $lang->get('usercp_emailpassword_msg_need_activ_user'), 20); + redirect(makeUrl(get_main_page()), $lang->get('usercp_emailpassword_msg_profile_success'), $lang->get('usercp_emailpassword_msg_need_activ_user'), 20); } else if ( getConfig('account_activation') == 'admin' ) { - redirect(makeUrl(getConfig('main_page')), $lang->get('usercp_emailpassword_msg_profile_success'), $lang->get('usercp_emailpassword_msg_need_activ_admin'), 20); + redirect(makeUrl(get_main_page()), $lang->get('usercp_emailpassword_msg_profile_success'), $lang->get('usercp_emailpassword_msg_need_activ_admin'), 20); } } $session->login_without_crypto($session->username, $newpass); @@ -298,11 +298,11 @@ { if ( getConfig('account_activation') == 'user' ) { - redirect(makeUrl(getConfig('main_page')), $lang->get('usercp_emailpassword_msg_profile_success'), $lang->get('usercp_emailpassword_msg_need_activ_user'), 20); + redirect(makeUrl(get_main_page()), $lang->get('usercp_emailpassword_msg_profile_success'), $lang->get('usercp_emailpassword_msg_need_activ_user'), 20); } else if ( getConfig('account_activation') == 'admin' ) { - redirect(makeUrl(getConfig('main_page')), $lang->get('usercp_emailpassword_msg_profile_success'), $lang->get('usercp_emailpassword_msg_need_activ_admin'), 20); + redirect(makeUrl(get_main_page()), $lang->get('usercp_emailpassword_msg_profile_success'), $lang->get('usercp_emailpassword_msg_need_activ_admin'), 20); } } else diff -r 098e744df928 -r a216e412c439 plugins/admin/PageManager.php --- a/plugins/admin/PageManager.php Sat Nov 15 18:22:13 2008 -0500 +++ b/plugins/admin/PageManager.php Sat Nov 15 18:23:25 2008 -0500 @@ -149,7 +149,7 @@ // Field: page URL string $page_urlname = $_POST['page_urlname']; $page_urlname = trim($_POST['page_urlname']); - if ( empty($page_urlname) && getConfig('main_page') !== '' ) + if ( empty($page_urlname) && get_main_page() !== '' ) { $errors[] = $lang->get('acppm_err_invalid_url_string'); } diff -r 098e744df928 -r a216e412c439 plugins/admin/UserManager.php --- a/plugins/admin/UserManager.php Sat Nov 15 18:22:13 2008 -0500 +++ b/plugins/admin/UserManager.php Sat Nov 15 18:23:25 2008 -0500 @@ -1114,24 +1114,24 @@ { case 'keep': case 'remove': - $('avatar_upload_http_{UUID}').object.style.display = 'none'; - $('avatar_upload_file_{UUID}').object.style.display = 'none'; - $('avatar_upload_gravatar_{UUID}').object.style.display = 'none'; + \$dynano('avatar_upload_http_{UUID}').object.style.display = 'none'; + \$dynano('avatar_upload_file_{UUID}').object.style.display = 'none'; + \$dynano('avatar_upload_gravatar_{UUID}').object.style.display = 'none'; break; case 'set_http': - $('avatar_upload_http_{UUID}').object.style.display = 'block'; - $('avatar_upload_file_{UUID}').object.style.display = 'none'; - $('avatar_upload_gravatar_{UUID}').object.style.display = 'none'; + \$dynano('avatar_upload_http_{UUID}').object.style.display = 'block'; + \$dynano('avatar_upload_file_{UUID}').object.style.display = 'none'; + \$dynano('avatar_upload_gravatar_{UUID}').object.style.display = 'none'; break; case 'set_file': - $('avatar_upload_http_{UUID}').object.style.display = 'none'; - $('avatar_upload_file_{UUID}').object.style.display = 'block'; - $('avatar_upload_gravatar_{UUID}').object.style.display = 'none'; + \$dynano('avatar_upload_http_{UUID}').object.style.display = 'none'; + \$dynano('avatar_upload_file_{UUID}').object.style.display = 'block'; + \$dynano('avatar_upload_gravatar_{UUID}').object.style.display = 'none'; break; case 'set_gravatar': - $('avatar_upload_gravatar_{UUID}').object.style.display = 'block'; - $('avatar_upload_http_{UUID}').object.style.display = 'none'; - $('avatar_upload_file_{UUID}').object.style.display = 'none'; + \$dynano('avatar_upload_gravatar_{UUID}').object.style.display = 'block'; + \$dynano('avatar_upload_http_{UUID}').object.style.display = 'none'; + \$dynano('avatar_upload_file_{UUID}').object.style.display = 'none'; break; } }