dirroot/mod/chat/lib.php"); chat_refresh_events(); } if ($oldversion < 2004043000) { modify_database("", "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('chat', 'talk', 'chat', 'name');"); } if ($oldversion < 2004111200) { execute_sql("ALTER TABLE {$CFG->prefix}chat DROP INDEX `course`;",false); execute_sql("ALTER TABLE {$CFG->prefix}chat_messages DROP INDEX `chatid`;",false); execute_sql("ALTER TABLE {$CFG->prefix}chat_messages DROP INDEX `userid`;",false); execute_sql("ALTER TABLE {$CFG->prefix}chat_messages DROP INDEX `groupid`;",false); execute_sql("ALTER TABLE {$CFG->prefix}chat_users DROP INDEX `chatid`;",false); execute_sql("ALTER TABLE {$CFG->prefix}chat_users DROP INDEX `groupid`;",false); modify_database('','ALTER TABLE prefix_chat ADD INDEX `course` (`course`);'); modify_database('','ALTER TABLE prefix_chat_messages ADD INDEX `chatid` (`chatid`);'); modify_database('','ALTER TABLE prefix_chat_messages ADD INDEX `userid` (`userid`);'); modify_database('','ALTER TABLE prefix_chat_messages ADD INDEX `groupid` (`groupid`);'); modify_database('','ALTER TABLE prefix_chat_users ADD INDEX `chatid` (`chatid`);'); modify_database('','ALTER TABLE prefix_chat_users ADD INDEX `groupid` (`groupid`);'); } if ($oldversion < 2005020300) { table_column('chat_users', '', 'course', 'integer', '10', 'unsigned', '0', 'not null', ''); table_column('chat_users', '', 'lang' , 'varchar', '10', '' , '' , 'not null', ''); } ////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions. return true; } ?>