|
From: OryNider <ory...@us...> - 2008-03-08 15:27:53
|
Update of /cvsroot/mxbb/mx_pafiledb/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18254/admin Modified Files: Tag: core28x admin_pafiledb.php Log Message: update for new mx_mod 2.8.2 Index: admin_pafiledb.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pafiledb.php,v retrieving revision 1.6.2.2 retrieving revision 1.6.2.3 diff -C2 -d -r1.6.2.2 -r1.6.2.3 *** admin_pafiledb.php 15 Feb 2008 23:53:11 -0000 1.6.2.2 --- admin_pafiledb.php 8 Mar 2008 15:27:13 -0000 1.6.2.3 *************** *** 9,26 **** */ - 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/'; // --- 9,64 ---- */ $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(); ! ! ! // ! // instatiate the mx_user class ! // ! //$mx_user = new mx_user(); // *************** *** 29,35 **** $setmodules_admin_path = ''; $setmodules_module_path = "./../"; ! ! require_once( $phpbb_root_path . 'extension.inc' ); ! require_once( $mx_mod_path . 'includes/functions_required.' . $phpEx ); } 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 *************** *** 75,78 **** --- 121,142 ---- // 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 = 502; + $mx_user->user_ip = $user_ip; + $mx_user->_init_userprefs(); + $mx_user->set_module_cfg_name('pafiledb'); + $mx_user->set_module_lang_path($module_root_path . 'pafiledb/'); + $mx_user->extend(); + } + include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); *************** *** 102,106 **** } } - // // Get action variable other wise set it to the main --- 166,169 ---- |