|
From: Jon O. <jon...@us...> - 2005-04-21 19:36:55
|
Update of /cvsroot/mxbb/mx_kb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17718/modules/mx_kb Modified Files: db_upgrade.php install.txt kb_article_reader.php upgrade_kb_tables.php Log Message: final fix before 2.0.2 release Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_upgrade.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** db_upgrade.php 20 Apr 2005 19:30:19 -0000 1.23 --- db_upgrade.php 21 Apr 2005 19:36:16 -0000 1.24 *************** *** 72,76 **** $upgrade_200 = 0; $upgrade_201 = 0; ! $upgrade_202 = 1; $message = "<b>Upgrading!</b><br/><br/>"; --- 72,76 ---- $upgrade_200 = 0; $upgrade_201 = 0; ! $upgrade_202 = 0; $message = "<b>Upgrading!</b><br/><br/>"; *************** *** 152,155 **** --- 152,158 ---- } + $upgrade_202 = 1; + $message .= "<b>Upgrading to v. 2.02...ok</b><br/><br/>"; + // ------------------------------------------------------------------------------------------------------ if ( $upgrade_105 == 1 ) Index: install.txt =================================================================== RCS file: /cvsroot/mxbb/mx_kb/install.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** install.txt 12 Apr 2005 19:30:42 -0000 1.3 --- install.txt 21 Apr 2005 19:36:16 -0000 1.4 *************** *** 41,44 **** --- 41,48 ---- ## - All patches 2.0.1a-e summarized in new version 2.0.2 ## - Minor fixes "forgotten" in version 2.0.1e + ## - tpl bug fixed for custom fields adminCP + ## - Number of articles in cat (subcat) fixed + ## - Hopefully the MAIL notification now works ;) + ## - "All" reported bugs/fixes/addons in dev thread fixed (implemented) ## 2005/04/09 - Version KB MOD 2.0.1e. Index: kb_article_reader.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb_article_reader.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** kb_article_reader.php 9 Apr 2005 21:41:28 -0000 1.5 --- kb_article_reader.php 21 Apr 2005 19:36:16 -0000 1.6 *************** *** 20,78 **** * (at your option) any later version. */ ! // MX ! if ( !function_exists( 'read_block_config' ) ) { define( 'IN_PORTAL', true ); ! $mx_root_path = '../../'; ! include_once( $mx_root_path . 'extension.inc' ); ! include_once( $mx_root_path . 'common.' . $phpEx ); // Start session management ! $userdata = session_pagestart( $user_ip, PAGE_INDEX ); ! mx_init_userprefs( $userdata ); // End session management ! $block_id = ( !empty( $HTTP_GET_VARS['block_id'] ) ) ? $HTTP_GET_VARS['block_id'] : $HTTP_POST_VARS['id']; ! if ( empty( $block_id ) ) { ! $sql = "SELECT * FROM " . BLOCK_TABLE . " WHERE block_title = 'KB' LIMIT 1"; ! if ( !$result = $db->sql_query( $sql ) ) { ! message_die( GENERAL_ERROR, "Could not query Smartor_Album module information", "", __LINE__, __FILE__, $sql ); } ! $tmp_row = $db->sql_fetchrow( $result ); ! $block_id = $tmp_row['block_id']; } ! $is_block = false; ! } ! else ! { ! // Read block Configuration ! $block_config = read_block_config( $block_id ); ! $title = $block_config[$block_id]['block_title']; ! $desc = $block_config[$block_id]['block_desc']; ! $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); - $is_block = true; - global $images; - } - // Extract 'what posts to view info', the cool Array ;) - $kb_type_select_data = array(); - $kb_type_select_temp = $block_config[$block_id][kb_type_select]['parameter_value']; - $kb_type_select_temp = stripslashes( $kb_type_select_temp ); - $kb_type_select_data = eval( "return " . $kb_type_select_temp . ";" ); ! $default_article_id = $block_config[$block_id][default_article_id]['parameter_value']; ! include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); ! include( $module_root_path . 'includes/kb_constants.' . $phpEx ); ! include_once( $module_root_path . 'includes/functions_kb.' . $phpEx ); ! include_once( $module_root_path . 'includes/functions_kb_auth.' . $phpEx ); ! include_once( $module_root_path . 'includes/functions_kb_field.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); ! // echo(var_export($_SESSION['newssuite_'.$page_id]['testar'])); // Instanciate custom fields --- 20,122 ---- * (at your option) any later version. */ ! ! // Switch for making this run as a phpBB MOD or mxBB module ! ! if ( file_exists( './viewtopic.php' ) ) // -------------------------------------------- phpBB MOD MODE { + define( 'MXBB_MODULE', false ); + define( 'IN_PHPBB', true ); define( 'IN_PORTAL', true ); ! ! // When run as a phpBB mod these paths are identical ;) ! $phpbb_root_path = $module_root_path = $mx_root_path = './'; ! ! include( $phpbb_root_path . 'extension.inc' ); ! include( $phpbb_root_path . 'common.' . $phpEx ); ! ! define( 'PAGE_KB', -500 ); // If this id generates a conflict with other mods, change it ;) // Start session management ! $userdata = session_pagestart( $user_ip, PAGE_KB ); ! init_userprefs( $userdata ); // End session management ! include( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); ! include( $phpbb_root_path . 'includes/kb_constants.' . $phpEx ); ! include( $phpbb_root_path . 'includes/functions_kb.' . $phpEx ); ! include( $phpbb_root_path . 'includes/functions_kb_auth.' . $phpEx ); ! include( $phpbb_root_path . 'includes/functions_kb_field.' . $phpEx ); ! include( $phpbb_root_path . 'includes/functions_kb_mx.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/bbcode.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); ! } ! else // --------------------------------------------------------------------------------- mxBB Module MODE ! { ! define( 'MXBB_MODULE', true ); ! ! if ( !function_exists( 'read_block_config' ) ) { ! define( 'IN_PORTAL', true ); ! $mx_root_path = './../../'; ! ! include_once( $mx_root_path . 'extension.inc' ); ! include_once( $mx_root_path . 'common.' . $phpEx ); ! ! // Start session management ! ! $userdata = session_pagestart( $user_ip, PAGE_INDEX ); ! mx_init_userprefs( $userdata ); ! ! // End session management ! ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); ! ! $block_id = ( !empty( $HTTP_GET_VARS['block_id'] ) ) ? $HTTP_GET_VARS['block_id'] : $HTTP_POST_VARS['id']; ! if ( empty( $block_id ) ) { ! $sql = "SELECT * FROM " . BLOCK_TABLE . " WHERE block_title = 'KB' LIMIT 1"; ! if ( !$result = $db->sql_query( $sql ) ) ! { ! message_die( GENERAL_ERROR, "Could not query Smartor_Album module information", "", __LINE__, __FILE__, $sql ); ! } ! $tmp_row = $db->sql_fetchrow( $result ); ! $block_id = $tmp_row['block_id']; } ! $is_block = false; } ! else ! { ! // Read block Configuration ! ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); ! ! $block_config = read_block_config( $block_id ); ! $title = $block_config[$block_id]['block_title']; ! $desc = $block_config[$block_id]['block_desc']; ! $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); ! $is_block = true; ! global $images; ! } ! // Extract 'what posts to view info', the cool Array ;) ! $kb_type_select_data = array(); ! $kb_type_select_temp = $block_config[$block_id][kb_type_select]['parameter_value']; ! $kb_type_select_temp = stripslashes( $kb_type_select_temp ); ! $kb_type_select_data = eval( "return " . $kb_type_select_temp . ";" ); ! ! $default_article_id = $block_config[$block_id][default_article_id]['parameter_value']; ! include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); ! include( $module_root_path . 'includes/kb_constants.' . $phpEx ); ! include_once( $module_root_path . 'includes/functions_kb.' . $phpEx ); ! include_once( $module_root_path . 'includes/functions_kb_auth.' . $phpEx ); ! include_once( $module_root_path . 'includes/functions_kb_field.' . $phpEx ); ! include_once( $module_root_path . 'includes/functions_kb_mx.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); ! } // Instanciate custom fields *************** *** 146,172 **** } } - // Newssuite operation mode? - //------------------------------------------------------------------------- - $total_blockk = count( $HTTP_SESSION_VARS['mx_pages']['page_' . $page_id]['blocks'] ); ! $kb_config['news_operate_mode'] = ''; ! for( $blockk = 0; $blockk < $total_blockk; $blockk++ ) { ! if ( $HTTP_SESSION_VARS['block_' . $block_rows[$blockk]['block_id']]['news_source_switch']['parameter_value'] == 'kb' && $HTTP_SESSION_VARS['block_' . $block_rows[$blockk]['block_id']]['news_mode_operate']['parameter_value'] == 'Source' ) ! { ! $newssuite_select_par = $HTTP_SESSION_VARS['block_' . $block_rows[$blockk]['block_id']]['news_type_select']['parameter_value']; ! // Extract 'what posts to view info', the cool Array ;) ! $news_type_select_data = array(); ! $news_type_select_temp = $newssuite_select_par; ! $news_type_select_temp = stripslashes( $news_type_select_temp ); ! $news_type_select_data = eval( "return " . $news_type_select_temp . ";" ); ! $kb_config['news_operate_mode'] = true; ! } ! else { ! $kb_config['news_operate_mode'] = ''; ! } ! } ! // ------------------------------------------------------------------------- // $is_admin = ( ( $userdata['user_level'] == ADMIN || is_group_member( $kb_config['mod_group'], $userdata['user_id'] ) ) && $userdata['session_logged_in'] ) ? true : 0; --- 190,220 ---- } } ! if ( MXBB_MODULE ) { ! // Newssuite operation mode? ! //------------------------------------------------------------------------- ! $total_blockk = count( $HTTP_SESSION_VARS['mx_pages']['page_' . $page_id]['blocks'] ); ! ! $kb_config['news_operate_mode'] = ''; ! for( $blockk = 0; $blockk < $total_blockk; $blockk++ ) { ! if ( $HTTP_SESSION_VARS['block_' . $block_rows[$blockk]['block_id']]['news_source_switch']['parameter_value'] == 'kb' && $HTTP_SESSION_VARS['block_' . $block_rows[$blockk]['block_id']]['news_mode_operate']['parameter_value'] == 'Source' ) ! { ! $newssuite_select_par = $HTTP_SESSION_VARS['block_' . $block_rows[$blockk]['block_id']]['news_type_select']['parameter_value']; ! // Extract 'what posts to view info', the cool Array ;) ! $news_type_select_data = array(); ! $news_type_select_temp = $newssuite_select_par; ! $news_type_select_temp = stripslashes( $news_type_select_temp ); ! $news_type_select_data = eval( "return " . $news_type_select_temp . ";" ); ! $kb_config['news_operate_mode'] = true; ! } ! else ! { ! $kb_config['news_operate_mode'] = ''; ! } ! } ! // ------------------------------------------------------------------------- ! } // $is_admin = ( ( $userdata['user_level'] == ADMIN || is_group_member( $kb_config['mod_group'], $userdata['user_id'] ) ) && $userdata['session_logged_in'] ) ? true : 0; Index: upgrade_kb_tables.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/upgrade_kb_tables.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** upgrade_kb_tables.php 12 Apr 2005 19:30:42 -0000 1.2 --- upgrade_kb_tables.php 21 Apr 2005 19:36:16 -0000 1.3 *************** *** 131,135 **** $upgrade_200 = 0; $upgrade_201 = 0; ! $upgrade_202 = 1; // validate before 1.01 --- 131,135 ---- $upgrade_200 = 0; $upgrade_201 = 0; ! $upgrade_202 = 0; // validate before 1.01 *************** *** 191,194 **** --- 191,197 ---- } + $upgrade_202 = 1; + $res_message .= "Upgrading to v. 2.02...<br />"; + if ( $submit ) { |