|
From: OryNider <ory...@us...> - 2008-03-12 05:05:54
|
Update of /cvsroot/mxbb/mx_mod_core/root In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv22568 Modified Files: mx_mod_install.php mx_mod_uninstall.php Log Message: Index: mx_mod_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_mod_core/root/mx_mod_install.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mx_mod_install.php 10 Mar 2008 06:02:35 -0000 1.1 --- mx_mod_install.php 12 Mar 2008 05:05:02 -0000 1.2 *************** *** 16,19 **** --- 16,28 ---- define( 'IN_PHPBB', true ); + if (file_exists("./modcp.$phpEx")) // phpBB2 + { + define('PORTAL_BACKEND', 'phpbb2'); + } + else if (@file_exists("./mcp.$phpEx")) // phpBB3 + { + define('PORTAL_BACKEND', 'phpbb3'); + } + $phpbb_root_path = $module_root_path = './'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; *************** *** 39,43 **** require($mx_mod_path . "includes/functions_core.$phpEx"); require($mx_mod_path . "includes/functions_styles.$phpEx"); ! //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) --- 48,52 ---- require($mx_mod_path . "includes/functions_core.$phpEx"); require($mx_mod_path . "includes/functions_styles.$phpEx"); ! //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) *************** *** 71,76 **** // $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); - - $is_block = false; // --- 80,83 ---- *************** *** 79,87 **** $mx_user = new mx_user(); ! if (file_exists("./modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; ! // // Start user session --- 86,96 ---- $mx_user = new mx_user(); ! $is_block = false; ! ! if (PORTAL_BACKEND == 'phpbb2') // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; ! // // Start user session *************** *** 90,93 **** --- 99,103 ---- $mx_user->init($user_ip, $page_id, false); init_userprefs($userdata); + //$mx_user->init_style(); //Overwrite template class $mx_user->set_module_default_style('prosilver'); // For compatibility with core 2.8.x *************** *** 99,105 **** } ! else if (@file_exists("./mcp.$phpEx")) // phpBB3 { - define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; --- 109,114 ---- } ! else if (PORTAL_BACKEND == 'phpbb3') // phpBB3 { $tplEx = 'html'; Index: mx_mod_uninstall.php =================================================================== RCS file: /cvsroot/mxbb/mx_mod_core/root/mx_mod_uninstall.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mx_mod_uninstall.php 10 Mar 2008 06:02:35 -0000 1.1 --- mx_mod_uninstall.php 12 Mar 2008 05:05:02 -0000 1.2 *************** *** 16,19 **** --- 16,28 ---- define( 'IN_PHPBB', true ); + if (file_exists("./modcp.$phpEx")) // phpBB2 + { + define('PORTAL_BACKEND', 'phpbb2'); + } + else if (@file_exists("./mcp.$phpEx")) // phpBB3 + { + define('PORTAL_BACKEND', 'phpbb3'); + } + $phpbb_root_path = $module_root_path = './'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; *************** *** 79,87 **** $mx_user = new mx_user(); ! if (file_exists("./modcp.$phpEx")) // phpBB2 { - define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; ! // // Start user session --- 88,95 ---- $mx_user = new mx_user(); ! if (PORTAL_BACKEND == 'phpbb2') // phpBB2 { $tplEx = 'tpl'; ! // // Start user session *************** *** 99,105 **** } ! else if (@file_exists("./mcp.$phpEx")) // phpBB3 { - define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; --- 107,112 ---- } ! else if (PORTAL_BACKEND == 'phpbb3') // phpBB3 { $tplEx = 'html'; |