Update of /cvsroot/mxbb/mx_kb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8515/modules/mx_kb Modified Files: db_install.php db_uninstall.php db_upgrade.php kb.php Added Files: KnowledgeBase (core 27x).pak Kopia av KnowledgeBase (core 28).pak Removed Files: KnowledgeBase.pak Log Message: for compatibility with 2.7.5 Index: kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** kb.php 28 Mar 2005 20:22:45 -0000 1.15 --- kb.php 1 Apr 2005 23:33:52 -0000 1.16 *************** *** 120,123 **** --- 120,125 ---- } + define('MXBB_27x', true); + // Extract 'what posts to view info', the cool Array ;) $kb_type_select_data = array(); *************** *** 131,134 **** --- 133,137 ---- 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 ); --- NEW FILE: KnowledgeBase (core 27x).pak --- module=+:41=+:Knowledge Base=+:modules/mx_kb/=+:Knowledge Base module=+:1 function=+:41=+:42=+:KB=+:Knowledge Base Module=+:kb.php=+:modules/mx_kb/admin/kb_config.php parameter=+:42=+:79=+:kb_type_select=+:Text=+:array('init'=>'1')=+: block=+:=+:Demo - KB=+:Demo block=+:42=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 function=+:41=+:96=+:Article_reader=+:Block to display articles only. No category navigation. To be used with newssuite.=+:kb_article_reader.php=+:modules/mx_kb/admin/kb_config.php parameter=+:96=+:302=+:default_article_id=+:Text=+:1=+: parameter=+:96=+:301=+:kb_type_select=+:Text=+:array('init'=>'1')=+: block=+:=+:Demo - Article_reader=+:Demo block=+:96=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_install.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** db_install.php 30 Mar 2005 09:53:54 -0000 1.24 --- db_install.php 1 Apr 2005 23:33:52 -0000 1.25 *************** *** 21,24 **** --- 21,79 ---- */ + if ( !function_exists(mx_do_install_upgrade) ) + { + // Generating output + + function mx_do_install_upgrade( $sql = '', $main_install = false ) + { + global $table_prefix, $mx_table_prefix, $userdata, $phpEx, $template, $lang, $db, $board_config, $HTTP_POST_VARS; + + $inst_error = false; + $n = 0; + $message = "<b>This is the result list of the SQL queries needed for the install/upgrade</b><br /><br />"; + + while ( $sql[$n] ) + { + if ( !$result = $db->sql_query( $sql[$n] ) ) + { + $message .= '<b><font color=#FF0000>[Error or Already added]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; + $inst_error = true; + } + else + { + $message .= '<b><font color=#0000fF>[Added/Updated]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; + } + $n++; + } + $message .= '<br /> If you get some Errors, Already Added or Updated messages, relax, this is normal when updating modules'; + + if ( $main_install ) + { + if ( !$inst_error ) + { + $message .= '-> no db errors :-)<br /><br /><b>Portal installed successfully! </b><hr><br /><br />'; + $message .= '1) Now, delete the /install and /contrib folders!!!<br /><br />'; + $message .= '2) If you haven\'t already done a db backup, now is the time ;)<br /><br />'; + $message .= '3) Then (after step 1), you HAVE to configure MX core and its modules from within the adminCP, simply \'upgrade\' MX portal Core and all modules in use!!!<br /><br />'; + + $message .= 'Click <a href=../admin/admin_mx_module.php>Here</a> to administer/upgrade the portal/modules. You will be promted for an admin username and pass. The upgrade process provide informative output...'; + } + else + { + $message .= '<br /><br /><b>Portal installed successfully (with some warnings)! </b><hr><br /><br />'; + $message .= '1) Now, delete the /install and /contrib folders!!!<br /><br />'; + $message .= '2) If you haven\'t already done a db backup, now is the time ;)<br /><br />'; + $message .= '3) Now (after step 1), you HAVE to configure MX core and its modules from within the adminCP, simply \'upgrade\' MX portal Core and all modules in use!!!<br /><br />'; + + $message .= 'Click <a href=../admin/admin_mx_module.php>Here</a> to administer/upgrade the portal/modules. You will be promted for an admin username and pass. The upgrade process provide informative output...'; + } + } + return $message; + } + + define('MXBB_27x', true); + + } + define( 'IN_PORTAL', true ); *************** *** 46,49 **** --- 101,105 ---- // End session management } + // If fresh install if ( !$result = $db->sql_query( "SELECT config_name from " . $mx_table_prefix . "kb_config" ) ) *************** *** 211,218 **** ); ! $sql[] = "UPDATE " . $mx_table_prefix . "module" . " SET module_version = '" . $mx_module_version . "', module_copy = '" . $mx_module_copy . "' WHERE module_id = '" . $mx_module_id . "'"; $message .= mx_do_install_upgrade( $sql ); --- 267,277 ---- ); ! if ( !MXBB_27x ) ! { ! $sql[] = "UPDATE " . $mx_table_prefix . "module" . " SET module_version = '" . $mx_module_version . "', module_copy = '" . $mx_module_copy . "' WHERE module_id = '" . $mx_module_id . "'"; + } $message .= mx_do_install_upgrade( $sql ); Index: db_uninstall.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_uninstall.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** db_uninstall.php 16 Jan 2005 01:02:41 -0000 1.7 --- db_uninstall.php 1 Apr 2005 23:33:52 -0000 1.8 *************** *** 21,25 **** --- 21,81 ---- */ + if ( !function_exists(mx_do_install_upgrade) ) + { + // Generating output + + function mx_do_install_upgrade( $sql = '', $main_install = false ) + { + global $table_prefix, $mx_table_prefix, $userdata, $phpEx, $template, $lang, $db, $board_config, $HTTP_POST_VARS; + + $inst_error = false; + $n = 0; + $message = "<b>This is the result list of the SQL queries needed for the install/upgrade</b><br /><br />"; + + while ( $sql[$n] ) + { + if ( !$result = $db->sql_query( $sql[$n] ) ) + { + $message .= '<b><font color=#FF0000>[Error or Already added]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; + $inst_error = true; + } + else + { + $message .= '<b><font color=#0000fF>[Added/Updated]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; + } + $n++; + } + $message .= '<br /> If you get some Errors, Already Added or Updated messages, relax, this is normal when updating modules'; + + if ( $main_install ) + { + if ( !$inst_error ) + { + $message .= '-> no db errors :-)<br /><br /><b>Portal installed successfully! </b><hr><br /><br />'; + $message .= '1) Now, delete the /install and /contrib folders!!!<br /><br />'; + $message .= '2) If you haven\'t already done a db backup, now is the time ;)<br /><br />'; + $message .= '3) Then (after step 1), you HAVE to configure MX core and its modules from within the adminCP, simply \'upgrade\' MX portal Core and all modules in use!!!<br /><br />'; + + $message .= 'Click <a href=../admin/admin_mx_module.php>Here</a> to administer/upgrade the portal/modules. You will be promted for an admin username and pass. The upgrade process provide informative output...'; + } + else + { + $message .= '<br /><br /><b>Portal installed successfully (with some warnings)! </b><hr><br /><br />'; + $message .= '1) Now, delete the /install and /contrib folders!!!<br /><br />'; + $message .= '2) If you haven\'t already done a db backup, now is the time ;)<br /><br />'; + $message .= '3) Now (after step 1), you HAVE to configure MX core and its modules from within the adminCP, simply \'upgrade\' MX portal Core and all modules in use!!!<br /><br />'; + + $message .= 'Click <a href=../admin/admin_mx_module.php>Here</a> to administer/upgrade the portal/modules. You will be promted for an admin username and pass. The upgrade process provide informative output...'; + } + } + return $message; + } + + define('MXBB_27x', true); + + } + define( 'IN_PORTAL', true ); + if ( !defined( 'IN_ADMIN' ) ) { *************** *** 42,45 **** --- 98,102 ---- // End session management } + $sql = array( "DROP TABLE " . $mx_table_prefix . "kb_articles ", --- KnowledgeBase.pak DELETED --- Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_upgrade.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** db_upgrade.php 30 Mar 2005 09:53:54 -0000 1.17 --- db_upgrade.php 1 Apr 2005 23:33:52 -0000 1.18 *************** *** 20,23 **** --- 20,77 ---- * (at your option) any later version. */ + if ( !function_exists(mx_do_install_upgrade) ) + { + // Generating output + + function mx_do_install_upgrade( $sql = '', $main_install = false ) + { + global $table_prefix, $mx_table_prefix, $userdata, $phpEx, $template, $lang, $db, $board_config, $HTTP_POST_VARS; + + $inst_error = false; + $n = 0; + $message = "<b>This is the result list of the SQL queries needed for the install/upgrade</b><br /><br />"; + + while ( $sql[$n] ) + { + if ( !$result = $db->sql_query( $sql[$n] ) ) + { + $message .= '<b><font color=#FF0000>[Error or Already added]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; + $inst_error = true; + } + else + { + $message .= '<b><font color=#0000fF>[Added/Updated]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; + } + $n++; + } + $message .= '<br /> If you get some Errors, Already Added or Updated messages, relax, this is normal when updating modules'; + + if ( $main_install ) + { + if ( !$inst_error ) + { + $message .= '-> no db errors :-)<br /><br /><b>Portal installed successfully! </b><hr><br /><br />'; + $message .= '1) Now, delete the /install and /contrib folders!!!<br /><br />'; + $message .= '2) If you haven\'t already done a db backup, now is the time ;)<br /><br />'; + $message .= '3) Then (after step 1), you HAVE to configure MX core and its modules from within the adminCP, simply \'upgrade\' MX portal Core and all modules in use!!!<br /><br />'; + + $message .= 'Click <a href=../admin/admin_mx_module.php>Here</a> to administer/upgrade the portal/modules. You will be promted for an admin username and pass. The upgrade process provide informative output...'; + } + else + { + $message .= '<br /><br /><b>Portal installed successfully (with some warnings)! </b><hr><br /><br />'; + $message .= '1) Now, delete the /install and /contrib folders!!!<br /><br />'; + $message .= '2) If you haven\'t already done a db backup, now is the time ;)<br /><br />'; + $message .= '3) Now (after step 1), you HAVE to configure MX core and its modules from within the adminCP, simply \'upgrade\' MX portal Core and all modules in use!!!<br /><br />'; + + $message .= 'Click <a href=../admin/admin_mx_module.php>Here</a> to administer/upgrade the portal/modules. You will be promted for an admin username and pass. The upgrade process provide informative output...'; + } + } + return $message; + } + + define('MXBB_27x', 1); + + } define( 'IN_PORTAL', true ); *************** *** 241,250 **** $message .= "<b>Nothing to upgrade...</b><br/><br/>"; } ! ! $sql[] = "UPDATE " . $mx_table_prefix . "module" . " SET module_version = '" . $mx_module_version . "', module_copy = '" . $mx_module_copy . "' WHERE module_id = '" . $mx_module_id . "'"; ! $message .= mx_do_install_upgrade( $sql ); } --- 295,307 ---- $message .= "<b>Nothing to upgrade...</b><br/><br/>"; } ! ! if ( !MXBB_27x ) ! { ! $sql[] = "UPDATE " . $mx_table_prefix . "module" . " SET module_version = '" . $mx_module_version . "', module_copy = '" . $mx_module_copy . "' WHERE module_id = '" . $mx_module_id . "'"; ! } ! $message .= mx_do_install_upgrade( $sql ); } --- NEW FILE: Kopia av KnowledgeBase (core 28).pak --- module=+:41=+:Knowledge Base=+:modules/mx_kb/=+:Knowledge Base module=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 function=+:41=+:42=+:KB=+:Knowledge Base Module=+:kb.php=+:modules/mx_kb/admin/kb_config.php parameter=+:42=+:79=+:kb_type_select=+:Text=+:array('init'=>'1')=+: option=+:0=+:0=+:0=+:endoflist=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 block=+:=+:Demo - KB=+:Demo block=+:42=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 function=+:41=+:96=+:Article_reader=+:Block to display articles only. No category navigation. To be used with newssuite.=+:kb_article_reader.php=+:modules/mx_kb/admin/kb_config.php parameter=+:96=+:302=+:default_article_id=+:Text=+:1=+: option=+:0=+:0=+:0=+:endoflist=+: parameter=+:96=+:301=+:kb_type_select=+:Text=+:array('init'=>'1')=+: option=+:0=+:0=+:0=+:endoflist=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 block=+:=+:Demo - Article_reader=+:Demo block=+:96=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 function=+:0=+:0=+:0=+:endoflist=+:0=+:0 |