|
From: FlorinCB <ory...@us...> - 2009-06-18 21:39:03
|
Update of /cvsroot/mxbb/core/includes In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv19000/includes Modified Files: mx_functions_admincp.php template.php Log Message: Fixes releated to BlockCP Index: template.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/template.php,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** template.php 6 Nov 2008 00:05:43 -0000 1.36 --- template.php 18 Jun 2009 21:38:58 -0000 1.37 *************** *** 817,821 **** foreach($filename_array as $handle => $filename) ! { $this->set_filename($handle, $filename); } --- 817,822 ---- foreach($filename_array as $handle => $filename) ! { ! $this->set_filename($handle, $filename); } *************** *** 830,834 **** function set_filename($handle, $filename, $xs_include = false, $quiet = false) { ! global $board_config; $can_cache = $this->use_cache; if(strpos($filename, '..') !== false) --- 831,835 ---- function set_filename($handle, $filename, $xs_include = false, $quiet = false) { ! global $board_config, $module_root_path, $mx_root_path, $phpbb_root_path, $theme, $mx_user, $mx_block; $can_cache = $this->use_cache; if(strpos($filename, '..') !== false) *************** *** 856,860 **** } } ! // creating cache filename if($can_cache != '') --- 857,861 ---- } } ! // creating cache filename if($can_cache != '') *************** *** 919,925 **** * includes file or executes code */ ! function execute($filename, $code, $handle, $include_once = true) { ! global $lang, $theme, $board_config, $mx_user; global $admin_script; --- 920,926 ---- * includes file or executes code */ ! function execute($filename, $code, $handle) { ! global $lang, $theme, $board_config; global $admin_script; *************** *** 939,943 **** { echo '<!-- template ', $this->files[$handle], ' start -->'; ! } if ($filename) --- 940,944 ---- { echo '<!-- template ', $this->files[$handle], ' start -->'; ! } if ($filename) *************** *** 993,998 **** } $this->xs_startup(); ! $force_recompile = empty($this->uncompiled_code[$handle]) ? false : true; ! // checking if php file exists. if (!empty($this->files_cache[$handle]) && !$force_recompile) --- 994,999 ---- } $this->xs_startup(); ! $force_recompile = empty($this->uncompiled_code[$handle]) ? false : true; ! // checking if php file exists. if (!empty($this->files_cache[$handle]) && !$force_recompile) *************** *** 1018,1023 **** $this->compiled_code[$handle] = $this->compile2($this->uncompiled_code[$handle], '', ''); } ! } ! // Run the compiled code. if (empty($this->files_cache[$handle]) || $force_recompile) --- 1019,1024 ---- $this->compiled_code[$handle] = $this->compile2($this->uncompiled_code[$handle], '', ''); } ! } ! // Run the compiled code. if (empty($this->files_cache[$handle]) || $force_recompile) *************** *** 1029,1033 **** $this->execute($this->files_cache[$handle], '', $handle); } ! return true; } --- 1030,1034 ---- $this->execute($this->files_cache[$handle], '', $handle); } ! return true; } *************** *** 1077,1081 **** } } ! //if ($filename = $this->_tpl_load($handle)) --- 1078,1082 ---- } } ! //if ($filename = $this->_tpl_load($handle)) Index: mx_functions_admincp.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_admincp.php,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** mx_functions_admincp.php 27 Feb 2009 10:12:43 -0000 1.65 --- mx_functions_admincp.php 18 Jun 2009 21:38:58 -0000 1.66 *************** *** 3645,3652 **** if ($row[$j]['function_file'] == 'mx_multiple_blocks.php' || $row[$j]['function_file'] == 'mx_dynamic.php' || $row[$j]['function_file'] == 'mx_virtual.php') { ! //continue; } ! if( $row[$j]['module_id'] != $row[$j-1]['module_id'] ) { $module_desc_tmp = str_replace("\n", '', $row[$j]['module_desc']); --- 3645,3654 ---- if ($row[$j]['function_file'] == 'mx_multiple_blocks.php' || $row[$j]['function_file'] == 'mx_dynamic.php' || $row[$j]['function_file'] == 'mx_virtual.php') { ! continue; } ! $k = $j - 1; ! ! if( $row[$j]['module_id'] != $row[$k]['module_id'] ) { $module_desc_tmp = str_replace("\n", '', $row[$j]['module_desc']); *************** *** 3654,3659 **** $module_id = $row[$j]['module_id']; ! $module_title = !empty($row[$j]['module_name']) ? addslashes(strip_tags(trim($row[$j]['module_name']))) : ''; ! $module_desc = !empty($row[$j]['module_desc']) ? addslashes(strip_tags(trim($module_desc_tmp))) : ''; $this->_addModule($module_id, $module_title, $module_desc); --- 3656,3661 ---- $module_id = $row[$j]['module_id']; ! $module_title = ($row[$j]['module_name']) ? addslashes(strip_tags(trim($row[$j]['module_name']))) : ''; ! $module_desc = ($row[$j]['module_desc']) ? addslashes(strip_tags(trim($module_desc_tmp))) : ''; $this->_addModule($module_id, $module_title, $module_desc); *************** *** 3664,3669 **** $function_id = $row[$j]['function_id']; ! $function_title = !empty($row[$j]['function_name']) ? addslashes(strip_tags(trim($row[$j]['function_name']))) : ''; ! $function_desc = !empty($function_desc_tmp) ? addslashes(strip_tags(trim($function_desc_tmp))) : ''; $this->_addFunction($module_id, $function_id, $function_title, $function_desc); --- 3666,3671 ---- $function_id = $row[$j]['function_id']; ! $function_title = ($row[$j]['function_name']) ? addslashes(strip_tags(trim($row[$j]['function_name']))) : ''; ! $function_desc = ($function_desc_tmp) ? addslashes(strip_tags(trim($function_desc_tmp))) : ''; $this->_addFunction($module_id, $function_id, $function_title, $function_desc); *************** *** 3680,3685 **** $block_id = $block_row['block_id']; ! $block_title = !empty($block_row['block_title']) ? substr(addslashes(strip_tags(trim($block_row['block_title']))), 0, 25 ) : ''; ! $block_desc = !empty($block_desc_tmp) ? ' (' . substr(addslashes(strip_tags(trim($block_desc_tmp))), 0, 25 ) . ')' : ''; $this->_addBlock($module_id, $function_id, $block_id, $block_title, $block_desc); --- 3682,3687 ---- $block_id = $block_row['block_id']; ! $block_title = ($block_row['block_title']) ? substr(addslashes(strip_tags(trim($block_row['block_title']))), 0, 25 ) : ''; ! $block_desc = ($block_desc_tmp) ? ' (' . substr(addslashes(strip_tags(trim($block_desc_tmp))), 0, 25 ) . ')' : ''; $this->_addBlock($module_id, $function_id, $block_id, $block_title, $block_desc); *************** *** 3688,3696 **** } unset($row); - } else { $is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? TRUE : 0; if (!$is_admin) { --- 3690,3698 ---- } unset($row); } else { $is_admin = ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? TRUE : 0; + if (!$is_admin) { |