|
From: Jon O. <jon...@us...> - 2006-08-22 20:21:55
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26767/modules/mx_coreblocks Modified Files: mx_blockcp.php Log Message: handy switch in common.php when upgrading sites several major fixes for the blockCP - adding blocks for functions with no blocks etc navigation menu adminCP rewritten. query data. no cache. subsilver narrow layout a couple of fixes when basedir restriction is activated Index: mx_blockcp.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_blockcp.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** mx_blockcp.php 26 Jun 2006 21:32:23 -0000 1.12 --- mx_blockcp.php 22 Aug 2006 20:21:50 -0000 1.13 *************** *** 98,110 **** } ! if ( empty($block_id) ) { $cookie_tmp = $board_config['cookie_name'].'_adminBlockCP_block_id'; $block_id = !empty($HTTP_COOKIE_VARS[$cookie_tmp]) ? $HTTP_COOKIE_VARS[$cookie_tmp] : 1; } ! setcookie($board_config['cookie_name'] . '_adminBlockCP_block_id', $block_id, time() + 10000000, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']); ! ! $mx_blockcp->init($block_id, true); // --- 98,125 ---- } ! // ! // Intitialize with cookie stored block id ! // ! if ( empty($block_id) && !$mx_request_vars->is_request('function_id') ) { $cookie_tmp = $board_config['cookie_name'].'_adminBlockCP_block_id'; $block_id = !empty($HTTP_COOKIE_VARS[$cookie_tmp]) ? $HTTP_COOKIE_VARS[$cookie_tmp] : 1; } + else if ( empty($block_id) && $mx_request_vars->is_request('function_id') ) + { + $block_id = 'noBlock'; // blockCP, functions with no blocks // This should NEVER happen when in blockCP (not adminCP) mode + } + else + { + setcookie($board_config['cookie_name'] . '_adminBlockCP_block_id', $block_id, time() + 10000000, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']); + } ! // ! // Init the User BlockCP ! // ! if (is_numeric($block_id)) ! { ! $mx_blockcp->init($block_id, true); ! } // *************** *** 233,237 **** $mx_blockcp->blockcp_mode = 'mx_blockcp'; ! $mx_blockcp->generate_cp($block_id, $new_block); $mx_page->page_title = $lang['Block_admin']; --- 248,252 ---- $mx_blockcp->blockcp_mode = 'mx_blockcp'; ! $mx_blockcp->generate_cp($block_id); $mx_page->page_title = $lang['Block_admin']; |