Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands
In directory usw-pr-cvs1:/tmp/cvs-serv32521/chat/lib/commands
Modified Files:
banish.cmd.php3
Log Message:
Fix some bugs if rooms' names contain slash character
Index: banish.cmd.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/commands/banish.cmd.php3,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** banish.cmd.php3 2001/04/19 21:05:04 1.7
--- banish.cmd.php3 2001/04/21 19:35:33 1.8
***************
*** 79,84 ****
else
{
if ($cmd[1] == '* ' && $dbSessionVars['status'] != 'a')
! $cmd[1] = '';
// Define the duration of the banishment
--- 79,85 ----
else
{
+ $targetCurrentRoom = pmcHandleMagicQuotes($targetCurrentRoom, '', 1, 'del');
if ($cmd[1] == '* ' && $dbSessionVars['status'] != 'a')
! $cmd[1] = '';
// Define the duration of the banishment
***************
*** 104,108 ****
else
{
- $targetCurrentRoom = pmcHandleMagicQuotes($targetCurrentRoom, '', 1, 'del');
$targetOldBanRooms = pmcHandleMagicQuotes($targetOldBanRooms, '', 1, 'del');
$slashedOldBanRooms = pmcSlashSingleQuotes($targetOldBanRooms);
--- 105,108 ----
***************
*** 128,133 ****
$targetNewBanRooms = ($cmd[1] == '* ')
? '*'
! : $slashedCurrentRoomName;
! $dbLink->query("INSERT INTO " . C_BAN_TBL . " VALUES ('$slashedTarget', $targetLatin1, '$targetIp', '$targetNewBanRooms', '$banUntil')");
} // end of 'first banishment for the target user'
--- 128,133 ----
$targetNewBanRooms = ($cmd[1] == '* ')
? '*'
! : pmcSlashSingleQuotes($targetCurrentRoom);
! $dbLink->query("INSERT INTO " . C_BAN_TBL . " (username, latin1, ip, rooms, ban_until) VALUES ('$slashedTarget', $targetLatin1, '$targetIp', '$targetNewBanRooms', '$banUntil')");
} // end of 'first banishment for the target user'
***************
*** 137,141 ****
// banishment confirmation message when an user has been banished
// from an other room than the current one
- $targetCurrentRoom = pmcHandleMagicQuotes($targetCurrentRoom, '', 1, 'del');
if ($targetCurrentRoom != $dbSessionVars['currentRoom'])
$error = sprintf(L_BANISHED, $cmd[2]);
--- 137,140 ----
|