Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands
In directory usw-pr-cvs1:/tmp/cvs-serv12055/chat/lib/commands
Modified Files:
join.cmd.php3 save.cmd.php3
Log Message:
added m_id in the pmc_messages table to fix messages loss in the message frame
Index: join.cmd.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands/join.cmd.php3,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** join.cmd.php3 2001/06/30 20:42:31 1.11
--- join.cmd.php3 2001/11/26 20:22:15 1.12
***************
*** 219,223 ****
// m_time and rooms aren't null to enforce the use of existing indexes)
$queries[] = 'DELETE FROM ' . C_MSG_TBL . ' '
! . "WHERE m_time != '' AND room != '' AND address = '$slashedNick' AND username = 'SYS welcome'";
$queries[] = 'INSERT INTO ' . C_MSG_TBL . ' '
. '(room, username, m_time, address, color, msg_original, msg_enhanced) '
--- 219,223 ----
// m_time and rooms aren't null to enforce the use of existing indexes)
$queries[] = 'DELETE FROM ' . C_MSG_TBL . ' '
! . "WHERE m_id > 0 AND room > '' AND address = '$slashedNick' AND username = 'SYS welcome'";
$queries[] = 'INSERT INTO ' . C_MSG_TBL . ' '
. '(room, username, m_time, address, color, msg_original, msg_enhanced) '
***************
*** 233,237 ****
// Delete invitations sent to the current user (check if m_time isn't null
// to enforce the use of existing indexes)
! $dbLink->query("DELETE FROM " . C_MSG_TBL . " WHERE m_time != '' AND room = '\\\*\\\' AND address = '$slashedNick' AND username = 'SYS inviteTo'");
// 2. Rooms table
--- 233,237 ----
// Delete invitations sent to the current user (check if m_time isn't null
// to enforce the use of existing indexes)
! $dbLink->query("DELETE FROM " . C_MSG_TBL . " WHERE m_id > 0 AND room = '\\\*\\\' AND address = '$slashedNick' AND username = 'SYS inviteTo'");
// 2. Rooms table
Index: save.cmd.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands/save.cmd.php3,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** save.cmd.php3 2001/06/10 14:57:48 1.6
--- save.cmd.php3 2001/11/26 20:22:16 1.7
***************
*** 54,60 ****
$getMessagesQuery = 'SELECT COUNT(*) FROM ' . C_MSG_TBL . ' '
. 'WHERE '
. "room IN ('$slashedCurrentRoomName', '\\\*\\\') AND "
. '('
! . "(address != '' AND username = '$slashedNick') OR "
. "((address = '' OR address = '$slashedNick')$ignoredSendersList)"
. ') '
--- 54,61 ----
$getMessagesQuery = 'SELECT COUNT(*) FROM ' . C_MSG_TBL . ' '
. 'WHERE '
+ . "m_id > 0 AND "
. "room IN ('$slashedCurrentRoomName', '\\\*\\\') AND "
. '('
! . "(address > '' AND username = '$slashedNick') OR "
. "((address = '' OR address = '$slashedNick')$ignoredSendersList)"
. ') '
|