|
From: Jon O. <jon...@us...> - 2008-07-10 22:04:56
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv23887/includes Modified Files: mx_functions_core.php Log Message: Cleaning up... Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** mx_functions_core.php 9 Jul 2008 20:47:53 -0000 1.90 --- mx_functions_core.php 10 Jul 2008 22:04:52 -0000 1.91 *************** *** 262,265 **** --- 262,270 ---- define('PORTAL_BACKEND', $portal_config['portal_backend']); } + + // + // Now, load backend specific constants + // + include_once($mx_root_path . 'includes/sessions/'.PORTAL_BACKEND.'/constants.' . $phpEx); } *************** *** 325,328 **** --- 330,460 ---- $server_url_phpbb = $server_protocol . $server_name . $server_port . $script_name_phpbb; define('PHPBB_URL', $server_url_phpbb); + + // + // Now sync Configs + // In phpBB mode, we rely on native phpBB configs, thus we need to sync mxp and phpbb settings + // + $this->sync_configs(); + } + + /** + * Sync Configs + * @access private + */ + function sync_configs() + { + global $portal_config, $board_config; + + foreach ($portal_config as $key => $value) + { + $do = true; + switch ($key) + { + // + // Keep phpBB cookies/sessions + // + case 'cookie_domain': + case 'cookie_name': + case 'cookie_path': + case 'cookie_secure': + case 'session_length': + case 'allow_autologin': + case 'max_autologin_time': + case 'max_login_attempts': + case 'login_reset_time': + + if (PORTAL_BACKEND != 'internal') + { + $do = false; + } + break; + + // + // Keep phpBB stats + // + case 'record_online_users': + case 'record_online_date': + + if (PORTAL_BACKEND != 'internal') + { + $do = false; + } + break; + + // + // Keep portal settings + // + case 'default_style': + case 'override_user_style': + case 'default_lang': + + // + // Keep portal settings + // + case 'allow_html': + case 'allow_html_tags': + case 'allow_bbcode': + case 'allow_smilies': + case 'smilies_path': + + // + // Keep portal settings + // + case 'board_email': + case 'board_email_sig': + case 'smtp_delivery': + case 'smtp_host': + case 'smtp_username': + case 'smtp_password': + case 'smtp_auth_method': + + // + // Keep portal settings + // + case 'default_dateformat': + case 'board_timezone': + case 'gzip_compress': + + // + // Keep portal settings + // + case 'portal_id': + case 'portal_status': + case 'disabled_message': + case 'script_path': + case 'mx_use_cache': + case 'mod_rewrite': + case 'default_admin_style': + case 'overall_header': + case 'overall_footer': + case 'main_layout': + case 'navigation_block': + case 'top_phpbb_links': + case 'portal_version': + case 'portal_recached': + case 'portal_backend': + case 'portal_startdate': + case 'rand_seed': + + break; + + // Rename config keys and get internal sitename/sitedesc + // + case 'portal_name': + + $key = 'sitename'; + break; + + case 'portal_desc': + + $key = 'site_desc'; + break; + } + + if ($do) + { + $board_config[$key] = $value; + } + } } *************** *** 3235,3359 **** /** - * Initiate and load page data - * @access private - */ - function sync_configs() - { - global $portal_config, $board_config; - - foreach ($portal_config as $key => $value) - { - $do = true; - switch ($key) - { - // - // Keep phpBB cookies/sessions - // - case 'cookie_domain': - case 'cookie_name': - case 'cookie_path': - case 'cookie_secure': - case 'session_length': - case 'allow_autologin': - case 'max_autologin_time': - case 'max_login_attempts': - case 'login_reset_time': - - if (PORTAL_BACKEND != 'internal') - { - $do = false; - } - break; - - // - // Keep phpBB stats - // - case 'record_online_users': - case 'record_online_date': - - if (PORTAL_BACKEND != 'internal') - { - $do = false; - } - break; - - // - // Keep portal settings - // - case 'default_style': - case 'override_user_style': - case 'default_lang': - - // - // Keep portal settings - // - case 'allow_html': - case 'allow_html_tags': - case 'allow_bbcode': - case 'allow_smilies': - case 'smilies_path': - - // - // Keep portal settings - // - case 'board_email': - case 'board_email_sig': - case 'smtp_delivery': - case 'smtp_host': - case 'smtp_username': - case 'smtp_password': - case 'smtp_auth_method': - - // - // Keep portal settings - // - case 'default_dateformat': - case 'board_timezone': - case 'gzip_compress': - - // - // Keep portal settings - // - case 'portal_id': - case 'portal_status': - case 'disabled_message': - case 'script_path': - case 'mx_use_cache': - case 'mod_rewrite': - case 'default_admin_style': - case 'overall_header': - case 'overall_footer': - case 'main_layout': - case 'navigation_block': - case 'top_phpbb_links': - case 'portal_version': - case 'portal_recached': - case 'portal_backend': - case 'portal_startdate': - case 'rand_seed': - - break; - - // Rename config keys and get internal sitename/sitedesc - // - case 'portal_name': - - $key = 'sitename'; - break; - - case 'portal_desc': - - $key = 'site_desc'; - break; - } - - if ($do) - { - $board_config[$key] = $value; - } - } - } - - /** * Enter description here... * --- 3367,3370 ---- *************** *** 3527,3544 **** global $mx_block, $theme, $mx_user; ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! case 'phpbb2': ! $style_path = $theme['template_name']; ! break; ! case 'phpbb3': ! $style_path = $theme['style_name']; ! break; ! } ! ! if ( file_exists($mx_block->module_root_path . 'templates/' . $style_path.'/'.(!empty($filename) ? $filename : $theme['head_stylesheet']) )) { ! $this->mxbb_css_addup[] = $mx_block->module_root_path . 'templates/' . $style_path.'/'.(!empty($filename) ? $filename : $theme['head_stylesheet']); } else if ( file_exists($mx_block->module_root_path . 'templates/' . $mx_user->cloned_template_name.'/'.(!empty($filename) ? $filename : $mx_user->cloned_template_name)) ) --- 3538,3544 ---- global $mx_block, $theme, $mx_user; ! if ( file_exists($mx_block->module_root_path . 'templates/' . $mx_user->template_name.'/'.(!empty($filename) ? $filename : $theme['head_stylesheet']) )) { ! $this->mxbb_css_addup[] = $mx_block->module_root_path . 'templates/' . $mx_user->template_name.'/'.(!empty($filename) ? $filename : $theme['head_stylesheet']); } else if ( file_exists($mx_block->module_root_path . 'templates/' . $mx_user->cloned_template_name.'/'.(!empty($filename) ? $filename : $mx_user->cloned_template_name)) ) |