Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3060 Modified Files: Tag: core28x mx_functions_core.php mx_functions_style.php mx_functions_tools.php page_header.php page_tail.php Log Message: For new site -> 2.8.3 Mainly bugfixes... Index: page_header.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_header.php,v retrieving revision 1.45.2.5 retrieving revision 1.45.2.6 diff -C2 -d -r1.45.2.5 -r1.45.2.6 *** page_header.php 3 Feb 2008 19:22:18 -0000 1.45.2.5 --- page_header.php 14 Feb 2008 21:22:36 -0000 1.45.2.6 *************** *** 303,306 **** --- 303,309 ---- 'U_GROUP_CP' => append_sid(PHPBB_URL . 'groupcp.'.$phpEx), + 'LOGO' => $images['mx_logo'], + 'THEME_GRAPHICS' => $images['theme_graphics'], + 'NAV_IMAGES_HOME' => $images['mx_nav_home'], 'NAV_IMAGES_FORUM' => $images['mx_nav_forum'], Index: mx_functions_style.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_style.php,v retrieving revision 1.17.2.10 retrieving revision 1.17.2.11 diff -C2 -d -r1.17.2.10 -r1.17.2.11 *** mx_functions_style.php 10 Feb 2008 21:17:54 -0000 1.17.2.10 --- mx_functions_style.php 14 Feb 2008 21:22:35 -0000 1.17.2.11 *************** *** 67,71 **** $style_path = $theme['template_name'] . '/'; ! // // Look at mxBB-Module folder.........................................................................mxBB-module --- 67,74 ---- $style_path = $theme['template_name'] . '/'; ! if($filename=='index_body.tpl') ! { ! //die('hurra'); ! } // // Look at mxBB-Module folder.........................................................................mxBB-module *************** *** 160,163 **** --- 163,173 ---- $filename = $phpbb_root_path . 'templates/' . $mx_user->cloned_template_name . '/' . $filename; } + else if( file_exists($phpbb_root_path . 'templates/' . $mx_user->default_template_name . '/' . $filename) && !empty($mx_user->default_template_name)) + { + // + // Then check Default + // + $filename = $phpbb_root_path . 'templates/' . $mx_user->default_template_name . '/' . $filename; + } else if( file_exists($phpbb_root_path . $this->root . '/' . $filename) ) { Index: page_tail.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_tail.php,v retrieving revision 1.32.2.3 retrieving revision 1.32.2.4 diff -C2 -d -r1.32.2.3 -r1.32.2.4 *** page_tail.php 3 Feb 2008 19:22:18 -0000 1.32.2.3 --- page_tail.php 14 Feb 2008 21:22:36 -0000 1.32.2.4 *************** *** 58,62 **** } ! $debug_output .= sprintf('Time : %.3fs | ' . $db->sql_num_queries() . ' Queries | GZIP : ' . (($board_config['gzip_compress']) ? 'On' : 'Off' ) . ' | Load : ' . (($user->load) ? $user->load : 'N/A'), $totaltime); if (defined('DEBUG_EXTRA')) --- 58,62 ---- } ! $debug_output .= sprintf('Time : %.3fs | ' . $db->num_queries . ' Queries | GZIP : ' . (($board_config['gzip_compress']) ? 'On' : 'Off' ) . ' | Load : ' . (($user->load) ? $user->load : 'N/A'), $totaltime); if (defined('DEBUG_EXTRA')) Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.52.2.5 retrieving revision 1.52.2.6 diff -C2 -d -r1.52.2.5 -r1.52.2.6 *** mx_functions_core.php 10 Feb 2008 21:17:54 -0000 1.52.2.5 --- mx_functions_core.php 14 Feb 2008 21:22:34 -0000 1.52.2.6 *************** *** 100,108 **** * @return unknown */ ! function obtain_mxbb_config() { global $db; ! if ($config = $this->get('mxbb_config')) { return $config; --- 100,108 ---- * @return unknown */ ! function obtain_mxbb_config($use_cache = true) { global $db; ! if ( ($config = $this->get('mxbb_config')) && ($use_cache) ) { return $config; *************** *** 593,602 **** function trash($type = 'all') { - global $phpEx; - $dir = opendir($this->cache_dir); while (($entry = readdir($dir)) !== false) { ! if ($type = 'all') { if (preg_match('/^(sql_|_block_|_page_|data_(?!global))/', $entry)) --- 593,600 ---- function trash($type = 'all') { $dir = opendir($this->cache_dir); while (($entry = readdir($dir)) !== false) { ! if ($type == 'all') { if (preg_match('/^(sql_|_block_|_page_|data_(?!global))/', $entry)) *************** *** 605,609 **** } } ! else if ($type = 'blocks') { if (preg_match('/^(_block_)/', $entry)) --- 603,607 ---- } } ! else if ($type == 'blocks') { if (preg_match('/^(_block_)/', $entry)) *************** *** 613,617 **** } ! else if ($type = 'pages') { if (preg_match('/^(_page_|_pagemap_)/', $entry)) --- 611,615 ---- } ! else if ($type == 'pages') { if (preg_match('/^(_page_|_pagemap_)/', $entry)) *************** *** 621,624 **** --- 619,629 ---- } + else if ($type == 'install') + { + if (preg_match('/^(tpl2_|tpl_|_block_|_page_|data_(?!global))/', $entry)) // Cannot remove tpl cache files currently in use ;) + { + unlink($this->cache_dir . $entry); + } + } } @closedir($dir); *************** *** 2390,2399 **** { $selected = ''; ! foreach( $data as $field_value ) { ! if ( $field_value == $value ) { ! $selected = ' selected="selected"'; ! break; } } --- 2395,2407 ---- { $selected = ''; ! if (is_array($data)) { ! foreach( $data as $field_value ) { ! if ( $field_value == $value ) ! { ! $selected = ' selected="selected"'; ! break; ! } } } *************** *** 2440,2449 **** { $checked = ''; ! foreach( $data as $field_value ) { ! if ( $field_value == $value ) { ! $checked = ' checked'; ! break; } } --- 2448,2460 ---- { $checked = ''; ! if (is_array($data)) { ! foreach( $data as $field_value ) { ! if ( $field_value == $value ) ! { ! $checked = ' checked'; ! break; ! } } } *************** *** 2990,2993 **** --- 3001,3005 ---- $data = file_get_contents($mx_block->module_root_path . $text); + // Substitute theme variables foreach ($theme as $key => $value) { *************** *** 2995,2998 **** --- 3007,3011 ---- } + // Substitute block data foreach ($mx_block->block_info as $key => $value) { Index: mx_functions_tools.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_tools.php,v retrieving revision 1.15.2.4 retrieving revision 1.15.2.5 diff -C2 -d -r1.15.2.4 -r1.15.2.5 *** mx_functions_tools.php 10 Feb 2008 21:17:54 -0000 1.15.2.4 --- mx_functions_tools.php 14 Feb 2008 21:22:35 -0000 1.15.2.5 *************** *** 1769,1773 **** //get 'to user's info // ! $sql = "SELECT user_id, user_notify_pm, user_email, user_lang, user_active FROM " . USERS_TABLE . " WHERE user_id = '" . $this->to_id . "' --- 1769,1773 ---- //get 'to user's info // ! $sql = "SELECT user_id, user_email FROM " . USERS_TABLE . " [...1412 lines suppressed...] ! { ! echo "<b>Length</b>: ".strlen($var)."\r\n"; ! } ! if (is_array($var)) ! { ! echo "<b>Length</b>: ".count($var)."\r\n"; ! } echo '<b>Value</b>: '; ! if (is_string($var)) ! { ! echo htmlspecialchars($var); ! } ! else ! { $print_r = print_r($var, true); // str_contains < or > ! if ((strstr($print_r, '<') !== false) || (strstr($print_r, '>') !== false)) ! { $print_r = htmlspecialchars($print_r); } |