|
From: Florin C B. <ory...@us...> - 2013-06-18 21:05:07
|
Update of /cvsroot/mxbb/core/includes In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv19941 Modified Files: mx_functions_core.php Log Message: Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.130 retrieving revision 1.131 diff -C2 -d -r1.130 -r1.131 *** mx_functions_core.php 16 Jun 2013 23:36:08 -0000 1.130 --- mx_functions_core.php 18 Jun 2013 21:05:04 -0000 1.131 *************** *** 233,241 **** function load_file($file = '', $force_shared = false) { ! global $mx_root_path, $phpbb_root_path, $phpEx, $mx_page; ! // ! // Remember loaded files ! // if (in_array(($file . (is_string($force_shared) ? $force_shared : '')), $mx_page->loaded_files)) { --- 233,241 ---- function load_file($file = '', $force_shared = false) { ! global $mx_root_path, $phpbb_root_path, $phpEx, $mx_page, $mx_backend; ! /* ! * Remember loaded files ! */ if (in_array(($file . (is_string($force_shared) ? $force_shared : '')), $mx_page->loaded_files)) { *************** *** 245,249 **** $mx_page->loaded_files[] = $file . (is_string($force_shared) ? $force_shared : ''); ! $path = mx_backend::load_file($force_shared); if (file_exists($path . $file.'.'.$phpEx)) --- 245,249 ---- $mx_page->loaded_files[] = $file . (is_string($force_shared) ? $force_shared : ''); ! $path = $mx_backend->load_file($force_shared); if (file_exists($path . $file.'.'.$phpEx)) *************** *** 351,362 **** $this->block_config = array(); - // // If this block doesn't have any parameters, we need this additional query :( - // $sql_block = !empty($id) ? " AND block_id = " . $id : ''; - // // Generate block parameter data - // $sql = "SELECT blk.*, mdl.module_path, --- 351,358 ---- *************** *** 376,380 **** } ! while ( $row = $db->sql_fetchrow( $result ) ) { $block_id = $row['block_id']; --- 372,376 ---- } ! while ($row = $db->sql_fetchrow($result)) { $block_id = $row['block_id']; *************** *** 407,417 **** $sql_sub = !empty( $sub_id ) ? ' AND sys.sub_id = ' . $sub_id : ' AND sys.sub_id = 0'; - // // Generate block parameter data - // $sql = "SELECT blk.*, sys.parameter_id, sys.parameter_value, sys.parameter_opt, par.parameter_name, par.parameter_type, par.parameter_auth, par.parameter_function, par.parameter_default, par.parameter_order, mdl.module_path, fnc.function_file, fnc.function_id, fnc.function_admin FROM " . BLOCK_SYSTEM_PARAMETER_TABLE . " sys, --- 403,412 ---- $sql_sub = !empty( $sub_id ) ? ' AND sys.sub_id = ' . $sub_id : ' AND sys.sub_id = 0'; // Generate block parameter data $sql = "SELECT blk.*, sys.parameter_id, sys.parameter_value, sys.parameter_opt, par.parameter_name, par.parameter_type, par.parameter_auth, par.parameter_function, par.parameter_default, par.parameter_order, mdl.module_path, + bct.column_id, fnc.function_file, fnc.function_id, fnc.function_admin FROM " . BLOCK_SYSTEM_PARAMETER_TABLE . " sys, *************** *** 419,425 **** " . BLOCK_TABLE . " blk, " . FUNCTION_TABLE . " fnc, ! " . MODULE_TABLE . " mdl ! WHERE sys.parameter_id = par.parameter_id ! AND sys.block_id = blk.block_id AND blk.function_id = fnc.function_id AND fnc.module_id = mdl.module_id"; --- 414,422 ---- " . BLOCK_TABLE . " blk, " . FUNCTION_TABLE . " fnc, ! " . MODULE_TABLE . " mdl, ! " . COLUMN_BLOCK_TABLE . " bct ! WHERE sys.parameter_id = par.parameter_id ! AND sys.block_id = blk.block_id ! AND blk.function_id = fnc.function_id AND fnc.module_id = mdl.module_id"; *************** *** 429,433 **** $sql .= " ORDER BY sys.block_id, par.parameter_order"; ! if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Could not obtain block data information', '', __LINE__, __FILE__, $sql ); --- 426,430 ---- $sql .= " ORDER BY sys.block_id, par.parameter_order"; ! if (!($result = $db->sql_query($sql))) { mx_message_die( GENERAL_ERROR, 'Could not obtain block data information', '', __LINE__, __FILE__, $sql ); *************** *** 551,565 **** } $page_id = 0; while ($row = $db->sql_fetchrow($result)) { ! $page_id = isset($page_id) ? $page_id : $row['page_id']; ! $column_id = isset($column_id) ? $column_id : $row['column_id']; ! ! $next_page = ($page_id != $row['page_id']) ? true : false; ! $next_column = ($column_id != $row['column_id']) ? true : false; ! $page_id = $row['page_id']; $column_id = $row['column_id']; $page_row = array( "page_id" => $row['page_id'], --- 548,560 ---- } $page_id = 0; + $column_id = 0; while ($row = $db->sql_fetchrow($result)) { ! $next_page = ($row['page_id'] != $page_id) ? true : false; ! $next_column = ($row['column_id'] != $column_id) ? true : false; $page_id = $row['page_id']; $column_id = $row['column_id']; + $page_row = array( "page_id" => $row['page_id'], |