|
From: OryNider <ory...@us...> - 2008-03-08 15:20:29
|
Update of /cvsroot/mxbb/mx_kb/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv5829/admin Modified Files: Tag: core28x admin_kb.php Log Message: upgrade for mx_mod 2.8.2 Index: admin_kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb.php,v retrieving revision 1.5.2.2 retrieving revision 1.5.2.3 diff -C2 -d -r1.5.2.2 -r1.5.2.3 *** admin_kb.php 15 Feb 2008 23:46:26 -0000 1.5.2.2 --- admin_kb.php 8 Mar 2008 15:19:08 -0000 1.5.2.3 *************** *** 9,27 **** */ - define( 'IN_PORTAL', true ); - $phpEx = substr(strrchr(__FILE__, '.'), 1); ! if ( @file_exists( './../viewtopic.'.$phpEx ) ) { ! define( 'IN_PHPBB', 1 ); ! define( 'MXBB_MODULE', false ); // ! // Main paths // ! $phpbb_root_path = $module_root_path = $mx_root_path = "./../"; ! $mx_mod_path = $phpbb_root_path . 'mx_mod/'; // // Left Pane Paths --- 9,65 ---- */ $phpEx = substr(strrchr(__FILE__, '.'), 1); ! if ( @file_exists( './../viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { ! define('MXBB_MODULE', false); ! define('IN_PHPBB', true); ! ! $phpbb_root_path = $module_root_path = './../'; ! $mx_mod_path = $phpbb_root_path . 'mx_mod/'; ! ! require_once($mx_mod_path . "includes/functions_required.$phpEx"); ! ! @define('IN_PORTAL', true); ! ! //Check if forum_hack is installed ! if (!isset($mx_root_path)) ! { ! $mx_root_path = './../'; ! ! include_once($mx_mod_path . "includes/mx_constants.$phpEx"); ! include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); ! } ! ! require_once($mx_mod_path . "includes/functions_core.$phpEx"); ! ! //Check for cash mod ! if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) ! { ! define('IN_CASHMOD', true); ! } ! ! //@ini_set( 'display_errors', '1' ); ! error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables ! //error_reporting(E_ALL & ~E_NOTICE); ! ! define('PAGE_KB', -502); // If this id generates a conflict with other mods, change it ;) // ! // Instatiate the mx_cache class // ! $mx_cache = new mx_cache(); ! ! // ! // instatiate the mx_request_vars class ! // ! $mx_request_vars = new mx_request_vars(); ! + if( !is_object($mx_page)) + { + $mx_page = new mx_page(); + } + // // Left Pane Paths *************** *** 29,41 **** $setmodules_admin_path = ''; $setmodules_module_path = "./../"; ! ! require_once( $phpbb_root_path . 'extension.inc' ); ! require_once( $mx_mod_path . 'includes/functions_required.' . $phpEx ); ! require_once( $mx_mod_path . 'includes/functions_core.' . $phpEx ); ! ! // ! // instatiate the mx_request_vars class ! // ! $mx_request_vars = new mx_request_vars(); } else --- 67,81 ---- $setmodules_admin_path = ''; $setmodules_module_path = "./../"; ! ! if (file_exists($phpbb_root_path."modcp.$phpEx")) // phpBB2 ! { ! define('PORTAL_BACKEND', 'phpbb2'); ! $tplEx = 'tpl'; ! } ! else if (@file_exists($phpbb_root_path."mcp.$phpEx")) // phpBB3 ! { ! define('PORTAL_BACKEND', 'phpbb3'); ! $tplEx = 'html'; ! } } else *************** *** 48,52 **** // $mx_root_path = './../../../'; ! $module_root_path = $mx_root_path. 'modules/mx_kb/'; // --- 88,92 ---- // $mx_root_path = './../../../'; ! $module_root_path = './../../../modules/mx_kb/'; // *************** *** 59,67 **** define( 'MXBB_27x', file_exists( $setmodules_root_path . 'mx_login.php' ) ); - $phpEx = substr(strrchr(__FILE__, '.'), 1); } if ( !empty( $setmodules ) ) { $filename = basename( __FILE__ ); $module['KB_title']['1_Configuration'] = $setmodules_admin_path . $filename . "?action=settings"; --- 99,109 ---- define( 'MXBB_27x', file_exists( $setmodules_root_path . 'mx_login.php' ) ); } + if ( !empty( $setmodules ) ) { + include_once( $setmodules_root_path . $setmodules_module_path . 'kb/includes/kb_constants.' . $phpEx ); + $filename = basename( __FILE__ ); $module['KB_title']['1_Configuration'] = $setmodules_admin_path . $filename . "?action=settings"; *************** *** 78,83 **** --- 120,144 ---- // require( $mx_root_path . 'admin/pagestart.' . $phpEx ); + + if ( !MXBB_MODULE ) + { + require_once($mx_mod_path . "includes/functions_styles.$phpEx"); + + $mx_user = new mx_user(); // instatiate the mx_user class + + // + // Define basic constants + // + $mx_user->page_id = 51; + $mx_user->user_ip = $user_ip; + $mx_user->_init_userprefs(); + $mx_user->set_module_cfg_name('kb'); + $mx_user->set_module_lang_path($module_root_path . 'kb/'); + $mx_user->extend(); + } + include( $module_root_path . 'kb/kb_common.' . $phpEx ); + // ********************************************************************** // Read language definition |