|
From: Jon O. <jon...@us...> - 2005-04-12 19:31:39
|
Update of /cvsroot/mxbb/mx_kb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4087/modules/mx_kb Modified Files: db_install.php db_upgrade.php install.txt install_kb_tables.php mx_install_readme.htm upgrade_kb_tables.php Log Message: renamed lang_kb to lang_main updated install/upgrade -> 2.0.2 Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_upgrade.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** db_upgrade.php 11 Apr 2005 20:07:56 -0000 1.21 --- db_upgrade.php 12 Apr 2005 19:30:42 -0000 1.22 *************** *** 24,28 **** $mx_root_path = './../'; ! $mx_module_version = 'mxBB Knowledge Base Module v. 2.0.1c'; $mx_module_copy = 'Based on phpBB mod by <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=89202" target="_phpbb" >wGEric/Jon</a>'; --- 24,28 ---- $mx_root_path = './../'; ! $mx_module_version = 'mxBB Knowledge Base Module v. 2.0.2'; $mx_module_copy = 'Based on phpBB mod by <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=89202" target="_phpbb" >wGEric/Jon</a>'; *************** *** 72,75 **** --- 72,76 ---- $upgrade_200 = 0; $upgrade_201 = 0; + $upgrade_202 = 1; $message = "<b>Upgrading!</b><br/><br/>"; *************** *** 261,269 **** $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('formatting_fixup', '0')"; $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_articles MODIFY article_author_id mediumint(8) NOT NULL "; ! // Upgrade the config table to avoid duplicate entries ! //$sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_config MODIFY config_name VARCHAR(255) NOT NULL default '' "; ! //$sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_config MODIFY config_value VARCHAR(255) NOT NULL default '' "; ! //$sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_config DROP PRIMARY KEY, ADD PRIMARY KEY (config_name) "; } --- 262,273 ---- $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('formatting_fixup', '0')"; $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_articles MODIFY article_author_id mediumint(8) NOT NULL "; ! } ! ! if ( $upgrade_202 == 1 ) // Old fix for those upgraded from old old version ! { // Upgrade the config table to avoid duplicate entries ! $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_config MODIFY config_name VARCHAR(255) NOT NULL default '' "; ! $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_config MODIFY config_value VARCHAR(255) NOT NULL default '' "; ! $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_config DROP PRIMARY KEY, ADD PRIMARY KEY (config_name) "; } Index: mx_install_readme.htm =================================================================== RCS file: /cvsroot/mxbb/mx_kb/mx_install_readme.htm,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** mx_install_readme.htm 2 Apr 2005 22:03:20 -0000 1.10 --- mx_install_readme.htm 12 Apr 2005 19:30:42 -0000 1.11 *************** *** 221,225 **** <td colspan="2"><p><b><font size="5">mxBB</font><font size="5"> Module - Knowledge Base <br> ! <font size="2">v. 2.0.1</font></font></b></p> <p><span style="font-weight: bold"><span style="font-size: 16px; line-height: normal">Module</span></span> <br /> --- 221,225 ---- <td colspan="2"><p><b><font size="5">mxBB</font><font size="5"> Module - Knowledge Base <br> ! <font size="2">v. 2.0.2</font></font></b></p> <p><span style="font-weight: bold"><span style="font-size: 16px; line-height: normal">Module</span></span> <br /> Index: upgrade_kb_tables.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/upgrade_kb_tables.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** upgrade_kb_tables.php 9 Apr 2005 21:41:28 -0000 1.1 --- upgrade_kb_tables.php 12 Apr 2005 19:30:42 -0000 1.2 *************** *** 53,57 **** } ! define('KB_VERSION','KB MOD 2.0.1e'); ?> --- 53,57 ---- } ! define('KB_VERSION','KB MOD 2.0.2'); ?> *************** *** 131,134 **** --- 131,136 ---- $upgrade_200 = 0; $upgrade_201 = 0; + $upgrade_202 = 1; + // validate before 1.01 if( !$result = $db->sql_query("SELECT article_rating from ".KB_ARTICLES_TABLE)) *************** *** 201,209 **** $sql[] = 'ALTER TABLE ' . KB_ARTICLES_TABLE . ' ADD article_totalvotes int(255) NOT NULL default "0" ;'; - // Upgrade the config table to avoid duplicate entries - $sql[] = 'ALTER TABLE '. KB_CONFIG_TABLE.' MODIFY config_name VARCHAR(255) NOT NULL default "" ;'; - $sql[] = 'ALTER TABLE '. KB_CONFIG_TABLE.' MODIFY config_value VARCHAR(255) NOT NULL default "" ;'; - $sql[] = 'ALTER TABLE '. KB_CONFIG_TABLE.' DROP PRIMARY KEY, ADD PRIMARY KEY (config_name) ;'; - $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allow_rating", "0") ;'; $sql[] = 'INSERT INTO '.KB_CONFIG_TABLE.' (config_name, config_value) VALUES ("allow_anonymos_rating", "0") ;'; --- 203,206 ---- *************** *** 299,302 **** --- 296,308 ---- $sql[] = 'ALTER TABLE ' . KB_ARTICLES_TABLE . ' MODIFY article_author_id mediumint(8) NOT NULL ;'; } + + if ( $upgrade_202 == 1 ) // Old fix for those upgraded from old old version + { + // Upgrade the config table to avoid duplicate entries + $sql[] = 'ALTER TABLE '. KB_CONFIG_TABLE.' MODIFY config_name VARCHAR(255) NOT NULL default "" ;'; + $sql[] = 'ALTER TABLE '. KB_CONFIG_TABLE.' MODIFY config_value VARCHAR(255) NOT NULL default "" ;'; + $sql[] = 'ALTER TABLE '. KB_CONFIG_TABLE.' DROP PRIMARY KEY, ADD PRIMARY KEY (config_name) ;'; + } + break; Index: install.txt =================================================================== RCS file: /cvsroot/mxbb/mx_kb/install.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** install.txt 9 Apr 2005 21:46:20 -0000 1.2 --- install.txt 12 Apr 2005 19:30:42 -0000 1.3 *************** *** 38,41 **** --- 38,45 ---- ## + ## 2005/04/11 - Version KB MOD 2.0.2. + ## - All patches 2.0.1a-e summarized in new version 2.0.2 + ## - Minor fixes "forgotten" in version 2.0.1e + ## 2005/04/09 - Version KB MOD 2.0.1e. ## - Category jumpbox Index: install_kb_tables.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/install_kb_tables.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** install_kb_tables.php 11 Apr 2005 20:07:57 -0000 1.2 --- install_kb_tables.php 12 Apr 2005 19:30:42 -0000 1.3 *************** *** 53,57 **** } ! define('KB_VERSION','KB MOD 2.0.1e'); ?> --- 53,57 ---- } ! define('KB_VERSION','KB MOD 2.0.2'); ?> Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_install.php,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** db_install.php 11 Apr 2005 20:07:56 -0000 1.28 --- db_install.php 12 Apr 2005 19:30:42 -0000 1.29 *************** *** 24,28 **** $mx_root_path = './../'; ! $mx_module_version = 'mxBB Knowledge Base Module v. 2.0.1c'; $mx_module_copy = 'Based on phpBB mod by <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=89202" target="_phpbb" >wGEric/Jon</a>'; --- 24,28 ---- $mx_root_path = './../'; ! $mx_module_version = 'mxBB Knowledge Base Module v. 2.0.2'; $mx_module_copy = 'Based on phpBB mod by <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=89202" target="_phpbb" >wGEric/Jon</a>'; |