|
From: Florin C B. <ory...@us...> - 2013-06-16 01:10:16
|
Update of /cvsroot/mxbb/core/includes In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv29054 Modified Files: mx_functions_core.php mx_functions_style.php page_tail.php template.php Log Message: Index: template.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/template.php,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** template.php 23 Apr 2010 19:39:53 -0000 1.39 --- template.php 16 Jun 2013 01:10:13 -0000 1.40 *************** *** 920,926 **** * includes file or executes code */ ! function execute($filename, $code, $handle) { ! global $lang, $theme, $board_config; global $admin_script; --- 920,926 ---- * includes file or executes code */ ! function execute($filename, $code, $handle, $include_once = false) { ! global $lang, $theme, $board_config, $mx_user; global $admin_script; *************** *** 941,952 **** echo '<!-- template ', $this->files[$handle], ' start -->'; } ! if ($filename) { ! ($include_once) ? @include_once($filename) : @include($filename); } elseif ($admin_script) { ! ($include_once) ? @include_once($admin_script) : @include($admin_script); // See note above } else --- 941,952 ---- echo '<!-- template ', $this->files[$handle], ' start -->'; } ! //inlcude_once() only includes one block per module if ($filename) { ! ($include_once) ? @include_once($filename) : @require($filename); } elseif ($admin_script) { ! ($include_once) ? @include_once($admin_script) : @require($admin_script); // See note above } else Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.125 retrieving revision 1.126 diff -C2 -d -r1.125 -r1.126 *** mx_functions_core.php 5 Apr 2013 06:21:58 -0000 1.125 --- mx_functions_core.php 16 Jun 2013 01:10:13 -0000 1.126 *************** *** 287,291 **** * @return unknown */ ! function _read_config( $id, $sub_id = 0, $type, $force_query = false ) { global $portal_config, $mx_root_path; --- 287,291 ---- * @return unknown */ ! function _read_config($id = 1, $sub_id = 0, $type, $force_query = false) { global $portal_config, $mx_root_path; *************** *** 345,349 **** * @return unknown */ ! function _get_block_config( $id = '', $sub_id = 0 ) { global $db; --- 345,349 ---- * @return unknown */ ! function _get_block_config($id = '', $sub_id = 0) { global $db; *************** *** 498,513 **** * @return unknown */ ! function _get_page_config( $id = '' ) { global $db; $this->pages_config = array(); ! $sql_page = !empty($id) ? " AND col.page_id = '" . $id . "'" : ""; ! ! // // Get page_blocks data - // $sql = "SELECT col.page_id, pag.page_name, pag.page_desc, --- 498,514 ---- * @return unknown */ ! function _get_page_config($id = '') { global $db; $this->pages_config = array(); ! $temp_row = $page_row = $column_row = $block_row = array(); $sql_page = !empty($id) ? " AND col.page_id = '" . $id . "'" : ""; ! // Get page_blocks data $sql = "SELECT col.page_id, + col.column_title, + col.column_order, + col.column_size, pag.page_name, pag.page_desc, *************** *** 528,534 **** pag.phpbb_stats, bct.column_id, - col.column_title, - col.column_order, - col.column_size, blk.block_id, fnc.function_file --- 529,532 ---- *************** *** 547,563 **** $sql .= " ORDER BY col.page_id, column_order, block_order"; ! if ( !$result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Could not query page information", "", __LINE__, __FILE__, $sql ); } - $page_id = 0; ! while ( $row = $db->sql_fetchrow( $result ) ) { - $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'], --- 545,562 ---- $sql .= " ORDER BY col.page_id, column_order, block_order"; ! if (!$result = $db->sql_query($sql)) { ! mx_message_die(GENERAL_ERROR, "Could not query page information", "", __LINE__, __FILE__, $sql); } $page_id = 0; ! ! while ($row = $db->sql_fetchrow($result)) { $page_id = $row['page_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_row = array( "page_id" => $row['page_id'], *************** *** 591,606 **** "block_id" => $row['block_id'], "column_id" => $row['column_id'], ! //"module_path" => $row['module_path'], ! //"function_file" => $row['function_file'], ! //"function_admin" => $row['function_admin'] ); ! if ( $next_page ) { ! $temp_row = array(); ! $temp_row = array( 'page_info' => $page_row ); } ! if ( $next_column ) { $temp_row['columns'][] = $column_row; --- 590,604 ---- "block_id" => $row['block_id'], "column_id" => $row['column_id'], ! "module_path" => $row['module_path'], ! "function_file" => $row['function_file'], ! "function_admin" => $row['function_admin'] ); ! if ($next_page) { ! $temp_row = array('page_info' => $page_row); } ! if ($next_column) { $temp_row['columns'][] = $column_row; *************** *** 3059,3063 **** { global $db, $userdata, $debug, $portal_config, $mx_cache, $lang; ! unset($this->page_rowset); unset($this->subpage_rowset); --- 3057,3061 ---- { global $db, $userdata, $debug, $portal_config, $mx_cache, $lang; ! static $result; unset($this->page_rowset); unset($this->subpage_rowset); *************** *** 3068,3076 **** //display an error debuging message only if the portal is installed/upgraded ! if(!@$db->sql_query($sql) && @!file_exists('install')) { mx_message_die(GENERAL_ERROR, 'Couldnt Query pages info', '', __LINE__, __FILE__, $sql); } ! elseif(!@$db->sql_query($sql) && @file_exists('install')) { mx_message_die(GENERAL_ERROR, "Couldnt Query pages info"."<br />Please finish installin/upgrading the database. <br />".$lang['Please_remove_install_contrib'], "",__LINE__, __FILE__, $sql); --- 3066,3074 ---- //display an error debuging message only if the portal is installed/upgraded ! if((!$result = @$db->sql_query($sql)) && @!file_exists('install')) { mx_message_die(GENERAL_ERROR, 'Couldnt Query pages info', '', __LINE__, __FILE__, $sql); } ! elseif((!$result = @$db->sql_query($sql)) && @file_exists('install')) { mx_message_die(GENERAL_ERROR, "Couldnt Query pages info"."<br />Please finish installin/upgrading the database. <br />".$lang['Please_remove_install_contrib'], "",__LINE__, __FILE__, $sql); *************** *** 3088,3094 **** } - // // Load page data - // $this->page_id = $page_id; $this->page_config = $mx_cache->read( $this->page_id, MX_CACHE_PAGE_TYPE, $force_query ); --- 3086,3090 ---- Index: mx_functions_style.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_style.php,v retrieving revision 1.128 retrieving revision 1.129 diff -C2 -d -r1.128 -r1.129 *** mx_functions_style.php 5 Jun 2013 14:05:58 -0000 1.128 --- mx_functions_style.php 16 Jun 2013 01:10:13 -0000 1.129 *************** *** 1217,1221 **** function _load_phpbb_images() { ! global $images, $board_config, $template, $phpbb_root_path, $mx_root_path; unset($GLOBALS['TEMPLATE_CONFIG']); --- 1217,1221 ---- function _load_phpbb_images() { ! global $images, $board_config, $template, $phpbb_root_path, $mx_root_path, $phpEx; unset($GLOBALS['TEMPLATE_CONFIG']); *************** *** 1339,1343 **** $current_template_phpbb_images = @file_exists($phpbb_root_path . $current_style_phpbb_path . "/imageset") ? $current_style_phpbb_path. "/imageset" : (@file_exists($phpbb_root_path . $this->default_style2_name . "/imageset") ? $phpbb_root_path . $this->default_style2_name . "/imageset" : $phpbb_root_path . $this->default_template_name . "/imageset"); //@include($phpbb_root_path . $current_template_phpbb_images . '/imageset.cfg'); ! define('TEMPLATE_CONFIG', true); } // --- 1339,1343 ---- $current_template_phpbb_images = @file_exists($phpbb_root_path . $current_style_phpbb_path . "/imageset") ? $current_style_phpbb_path. "/imageset" : (@file_exists($phpbb_root_path . $this->default_style2_name . "/imageset") ? $phpbb_root_path . $this->default_style2_name . "/imageset" : $phpbb_root_path . $this->default_template_name . "/imageset"); //@include($phpbb_root_path . $current_template_phpbb_images . '/imageset.cfg'); ! @define('TEMPLATE_CONFIG', true); } // *************** *** 1477,1481 **** { global $images, $board_config, $template, $phpbb_root_path, $mx_root_path, $theme, $current_module_images; ! global $mx_block, $mx_user; //This will keep loaded images --- 1477,1481 ---- { global $images, $board_config, $template, $phpbb_root_path, $mx_root_path, $theme, $current_module_images; ! global $mx_block, $mx_user, $phpEx; //This will keep loaded images Index: page_tail.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_tail.php,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** page_tail.php 6 Nov 2008 00:57:21 -0000 1.44 --- page_tail.php 16 Jun 2013 01:10:13 -0000 1.45 *************** *** 60,70 **** $mxbb_footer_text_url = PORTAL_URL . 'index.' . $phpEx . '?sid=' . $userdata['session_id'] . '&mx_copy=true'; - // // Generate debug stats // - from Olympus if (defined('DEBUG') && $userdata['user_level'] == ADMIN) { - $debug_output = '<div align="center"><span class="copyright">'; - $mtime = explode(' ', microtime()); $totaltime = $mtime[0] + $mtime[1] - $mx_starttime; --- 60,68 ---- $mxbb_footer_text_url = PORTAL_URL . 'index.' . $phpEx . '?sid=' . $userdata['session_id'] . '&mx_copy=true'; // Generate debug stats // - from Olympus + $debug_output = '<div align="center"><span class="copyright">'; if (defined('DEBUG') && $userdata['user_level'] == ADMIN) { $mtime = explode(' ', microtime()); $totaltime = $mtime[0] + $mtime[1] - $mx_starttime; *************** *** 89,98 **** } } - $debug_output .= ' | <a href="' . (($_SERVER['REQUEST_URI']) ? htmlspecialchars($_SERVER['REQUEST_URI']) : "index.$phpEx$SID") . ((strpos($_SERVER['REQUEST_URI'], '?') !== false) ? '&' : '?') . 'explain=1">Explain</a>'; } - $debug_output .= '</span></div>'; } ! // // Generate additional footer code (defined by modules) --- 87,94 ---- } } $debug_output .= ' | <a href="' . (($_SERVER['REQUEST_URI']) ? htmlspecialchars($_SERVER['REQUEST_URI']) : "index.$phpEx$SID") . ((strpos($_SERVER['REQUEST_URI'], '?') !== false) ? '&' : '?') . 'explain=1">Explain</a>'; } } ! $debug_output .= '</span></div>'; // // Generate additional footer code (defined by modules) |