|
From: Jon O. <jon...@us...> - 2005-09-06 18:52:04
|
Update of /cvsroot/mxbb/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4716 Modified Files: common.php index.php Log Message: Finalizing core 2.8 ;) Index: common.php =================================================================== RCS file: /cvsroot/mxbb/core/common.php,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** common.php 20 Aug 2005 18:19:11 -0000 1.35 --- common.php 6 Sep 2005 18:51:56 -0000 1.36 *************** *** 232,238 **** $mx_request_vars = new mx_request_vars(); ! // instatiate the mx_cache class ! $mx_cache = new mx_cache(); --- 232,238 ---- $mx_request_vars = new mx_request_vars(); ! // // instatiate the mx_cache class ! // $mx_cache = new mx_cache(); Index: index.php =================================================================== RCS file: /cvsroot/mxbb/core/index.php,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** index.php 20 Aug 2005 18:19:11 -0000 1.38 --- index.php 6 Sep 2005 18:51:56 -0000 1.39 *************** *** 35,39 **** // Page selector // - $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); --- 35,38 ---- *************** *** 41,45 **** // Start session management // - $userdata = session_pagestart($user_ip, - ( 1000 + $page_id )); mx_init_userprefs($userdata); --- 40,43 ---- *************** *** 48,52 **** // End session management // - if ( $mx_request_vars->is_request('mx_copy') ) { --- 46,49 ---- *************** *** 57,64 **** // Load page and block classes // - $mx_page = new mx_page(); $mx_page->init( $page_id ); - $mx_block = new mx_block(); --- 54,59 ---- *************** *** 66,70 **** // ...and define some basic vars // - $page_title .= $mx_page->info['page_name']; $page_icon = $mx_page->info['page_icon']; --- 61,64 ---- *************** *** 74,78 **** // Page auth // - if ( !$mx_page->auth_view && $userdata['session_logged_in'] ) { --- 68,71 ---- *************** *** 88,92 **** // Output header // - include( $mx_root_path . 'includes/page_header.' . $phpEx ); --- 81,84 ---- *************** *** 94,98 **** // Initialize template // - $layouttemplate = new mx_Template( $template->root, $board_config, $db ); --- 86,89 ---- *************** *** 104,108 **** // Generate the fold/unfold menu navigation switches (cookie based) // - if ( !empty($HTTP_COOKIE_VARS['phpbbEdit_Blocks']) ) { --- 95,98 ---- *************** *** 126,130 **** // Page columns - loop through each column // - for( $column = 0; $column < $mx_page->total_column; $column++ ) { --- 116,119 ---- *************** *** 132,136 **** // Pass column data // - $mx_page->output_column( $column ); --- 121,124 ---- *************** *** 138,142 **** // Column blocks - loop through column blocks // - $column_contents = array(); --- 126,129 ---- *************** *** 146,150 **** // Validate this block is visible and exists for the column // - if ( $mx_page->columns[$column]['column_id'] == $mx_page->blocks[$block]['column_id'] ) { --- 133,136 ---- *************** *** 156,160 **** // Toggle mode: default, dynamic, sub // - if ( $mx_block->is_dynamic ) { --- 142,145 ---- *************** *** 182,186 **** // Additional loop for subblocks - split block // - for( $subblock = 0; $subblock < $total_subs; $subblock++ ) { --- 167,170 ---- *************** *** 194,198 **** // View Auth ------------------------------------------------------------------------------- START // - if ( ( $mx_block->auth_view && $mx_block->show_block ) || $mx_block->auth_mod ) { --- 178,181 ---- *************** *** 202,206 **** // Define $module_root_path, to be used within blocks // - $module_root_path = $mx_block->module_root_path; --- 185,188 ---- *************** *** 208,212 **** // Include block file and cache output // - ob_start(); include($module_root_path . $mx_block->block_file); --- 190,193 ---- *************** *** 217,221 **** // Pass block data // - if ( $mx_block->show_block || $mx_block->auth_mod ) { --- 198,201 ---- *************** *** 223,227 **** // Output Block contents // - $mx_block->output( $column_contents[$column] ); --- 203,206 ---- *************** *** 229,233 **** // Switch: Block border graphics? // - if ( $mx_page->block_border_graphics ) { --- 208,211 ---- *************** *** 238,242 **** // Output Block stats // - $mx_block->output_stats(); } --- 216,219 ---- *************** *** 250,260 **** // Edit Auth --------------------------------------------------------------------------------- START // ! ! if ( ( ( $mx_block->auth_edit && $mx_block->show_block ) || $mx_block->auth_mod ) ) { // // Now use the editCP on/off switch // - $mx_page->show_editcp_switch(); --- 227,235 ---- // Edit Auth --------------------------------------------------------------------------------- START // ! if ( ( ( $mx_block->auth_view && $mx_block->auth_edit && $mx_block->show_block ) || $mx_block->auth_mod ) ) { // // Now use the editCP on/off switch // $mx_page->show_editcp_switch(); *************** *** 262,271 **** // Output editcp controls/buttons // ! ! if ( $mx_dynamic_block->dynamic_block_id > 0 ) { $mx_dynamic_block->output_cp_button( $edit_on ); } $mx_block->output_cp_button( $edit_on ); --- 237,250 ---- // Output editcp controls/buttons // ! if ( $mx_dynamic_block->dynamic_block_id > 0 && $subblock == $total_subs - 1) { $mx_dynamic_block->output_cp_button( $edit_on ); } + if ( is_object($mx_parent_block) && $subblock == $total_subs - 1) + { + $mx_parent_block->output_cp_button( $edit_on ); + } + $mx_block->output_cp_button( $edit_on ); *************** *** 273,278 **** // Is the Block hidden ? Output 'hidden' indicator // ! ! if ( !$mx_block->show_block ) { $mx_block->output_hidden_indicator(); --- 252,256 ---- // Is the Block hidden ? Output 'hidden' indicator // ! if ( !$mx_block->show_block || !$mx_block->auth_view) { $mx_block->output_hidden_indicator(); *************** *** 287,292 **** // Block header -------------------------------------------------------------------------------- START // ! ! if ( $mx_block->show_block && ( $mx_page->editcp_switch || $mx_block->show_title ) || $mx_block->auth_mod ) { $layouttemplate->assign_block_vars('layout_column.blocks.block_header', array()); --- 265,269 ---- // Block header -------------------------------------------------------------------------------- START // ! if ( $mx_block->auth_view && $mx_block->show_block && ( $mx_page->editcp_switch || $mx_block->show_title ) || $mx_block->auth_mod ) { $layouttemplate->assign_block_vars('layout_column.blocks.block_header', array()); *************** *** 295,299 **** // Switch: show title ------------------- // - if ( $mx_block->show_title || $mx_block->auth_mod ) { --- 272,275 ---- *************** *** 309,313 **** // Output some subblock wrappers // - if ( $mx_parent_block->is_sub ) { --- 285,288 ---- *************** *** 339,347 **** // Destroy parent block data // - if ( $mx_parent_block->is_sub ) { ! $mx_parent_block->kill_me(); } } --- 314,328 ---- // Destroy parent block data // if ( $mx_parent_block->is_sub ) { ! unset( $mx_parent_block ); } + + if ( is_object($mx_dynamic_block) ) + { + unset( $mx_dynamic_block ); + } + + $mx_block->kill_me(); } *************** *** 353,357 **** // Output page // - $layouttemplate->pparse('mx_main_layout'); --- 334,337 ---- *************** *** 359,364 **** // Output footer // - include($mx_root_path . 'includes/page_tail.' . $phpEx); - ?> \ No newline at end of file --- 339,342 ---- |