|
From: Jon O. <jon...@us...> - 2005-04-02 22:02:51
|
Update of /cvsroot/mxbb/kb_076_mxaddon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11840/modules/kb_076_mxaddon Modified Files: install_kb_tables.php install_upgrade_readme.txt upgrade_kb_tables.php Log Message: final fix before release Index: install_upgrade_readme.txt =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/install_upgrade_readme.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** install_upgrade_readme.txt 30 Mar 2005 09:28:11 -0000 1.3 --- install_upgrade_readme.txt 2 Apr 2005 22:02:29 -0000 1.4 *************** *** 4,8 **** ## MOD Addon Author: Haplo < jon...@ho... > (Jon Ohlsson) http://www.mx-system.com ## MOD Description: This mod adds a Knowledge Base manager to your board ! ## MOD Version: KB MOD 2.0.1 ## ## Installation Level: easy --- 4,8 ---- ## MOD Addon Author: Haplo < jon...@ho... > (Jon Ohlsson) http://www.mx-system.com ## MOD Description: This mod adds a Knowledge Base manager to your board ! ## MOD Version: KB MOD 2.0.1(abc...) ## ## Installation Level: easy *************** *** 33,49 **** ## in our MOD-Database, located at: http://www.phpbb.com/mods/ ############################################################## - ## Author Notes: - ## After installing please go into your ACP and change all - ## of the setting to how you want them. Also add categories - ## and types - ## - ## Putting [page] in your article will add pages to it. Putting [toc] will add entry to table of contents ## - ############################################################## ## ## MOD History: ## ! ## 2005/03/29 - Version KB MOD 2.0.1 ## - Name changed, since much (most) is rewritten ;) ## - Updated with latest phpBB security patches --- 33,42 ---- ## in our MOD-Database, located at: http://www.phpbb.com/mods/ ############################################################## ## ## ## MOD History: ## ! ## 2005/03/29 - Version KB MOD 2.0.1abc... ## - Name changed, since much (most) is rewritten ;) ## - Updated with latest phpBB security patches *************** *** 56,61 **** ## - Rewritten BBcode/html handling (once more yes) ## - Custom fields added ! ## - wysiwyg feature (tinymce) ! ## - All reported bugs in dev thread fixed ## 2004/09/14 - Version 0.7.6 + MX Addon 1.03 --- 49,55 ---- ## - Rewritten BBcode/html handling (once more yes) ## - Custom fields added ! ## - wysiwyg feature (tinymce), ! ## you can simply download latest version from http://tinymce.moxiecode.com/ and upload into phpbbroot/modules/ ! ## - All reported bugs/fixes/addons in dev thread fixed (implemented) ## 2004/09/14 - Version 0.7.6 + MX Addon 1.03 *************** *** 176,180 **** ## 3) Prepare the database by running the included install/upgrade-*.php file. ## - use install_kb_tables.php for a fresh installation, ! ## and upgrade_kb_tables.php if upgrading (even if from original kb 0.76) ## ############################################################## --- 170,175 ---- ## 3) Prepare the database by running the included install/upgrade-*.php file. ## - use install_kb_tables.php for a fresh installation, ! ## and upgrade_kb_tables.php if upgrading (even if from original kb 0.76 - works! ) ! ## 4) Delete install/upgrade files ## ############################################################## Index: install_kb_tables.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/install_kb_tables.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** install_kb_tables.php 1 Apr 2005 14:12:24 -0000 1.6 --- install_kb_tables.php 2 Apr 2005 22:02:29 -0000 1.7 *************** *** 223,229 **** --- 223,231 ---- $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("wysiwyg", "0");'; + $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("wysiwyg_path", "modules/");'; $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allow_html", "1");'; $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allow_bbcode", "1");'; $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allow_smilies", "1");'; + $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("formatting_fixup", "0");'; $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allowed_html_tags", "b,i,u,a");'; Index: upgrade_kb_tables.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/upgrade_kb_tables.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** upgrade_kb_tables.php 1 Apr 2005 14:12:27 -0000 1.5 --- upgrade_kb_tables.php 2 Apr 2005 22:02:29 -0000 1.6 *************** *** 133,136 **** --- 133,137 ---- $upgrade_103 = 0; $upgrade_200 = 0; + $upgrade_201 = 0; // validate before 1.01 if( !$result = $db->sql_query("SELECT article_rating from ".KB_ARTICLES_TABLE)) *************** *** 179,182 **** --- 180,195 ---- } + // validate before 2.01 + $result = $db->sql_query( "SELECT config_value from " . KB_CONFIG_TABLE . " WHERE config_name = 'wysiwyg_path'" ); + if( $db->sql_numrows( $result ) == 0 ) + { + $upgrade_201 = 1; + $res_message .= "Upgrading to v. 2.01...<br />"; + } + else + { + $res_message .= "v. 2.01 : installed <br />"; + } + if ( $submit ) { *************** *** 283,288 **** } ! $sql[] = 'ALTER TABLE ' . KB_ARTICLES_TABLE . ' MODIFY article_author_id mediumint(8) NOT NULL ;'; ! break; --- 296,305 ---- } ! if ( $upgrade_201 == 1 ) ! { ! $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("wysiwyg_path", "modules/");'; ! $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("formatting_fixup", "0");'; ! $sql[] = 'ALTER TABLE ' . KB_ARTICLES_TABLE . ' MODIFY article_author_id mediumint(8) NOT NULL ;'; ! } break; |