Update of /cvsroot/phpmychat/phpMyChat - 0.14/chat/admin
In directory usw-pr-cvs1:/tmp/cvs-serv17388
Modified Files:
admin1.php3
Log Message:
There was a bug when the user's status is modified but not the same rooms list
***** Bogus filespec: -
***** Bogus filespec: 0.14/chat/admin
Index: admin1.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat - 0.14/chat/admin/admin1.php3,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** admin1.php3 2001/02/25 19:10:09 1.2
--- admin1.php3 2001/03/24 13:20:33 1.3
***************
*** 88,115 ****
// Find the changes in moderated rooms list
! $old_rooms_Tab = explode(",",$old_rrr);
! $new_rooms_Tab = explode(",",$rrr);
! $diff_rooms_Tab = array();
!
! for (reset($old_rooms_Tab); $room2Check=current($old_rooms_Tab); next($old_rooms_Tab))
{
! if ($room2Check == "") continue;
! if (!room_in($room2Check, $rrr)) $diff_rooms_Tab[] = $room2Check;
! };
! for (reset($new_rooms_Tab); $room2Check=current($new_rooms_Tab); next($new_rooms_Tab))
{
! if ($room2Check == "") continue;
! if (!room_in($room2Check, $old_rrr)) $diff_rooms_Tab[] = $room2Check;
! };
! unset($old_rooms_Tab);
! unset($new_rooms_Tab);
! if (count($diff_rooms_Tab) > 0) $diff_rooms = str_replace(",,",",",ereg_replace("^,|,$","",implode(",",$diff_rooms_Tab)));
! unset($diff_rooms_Tab);
// Send a message to the user if he chats into one of the 'diff' rooms
if (room_in(addslashes($room), $diff_rooms))
{
! if (room_in(addslashes($room), $rrr)) // user becomes moderator for the room he chats into
{
$status = "m";
--- 88,125 ----
// Find the changes in moderated rooms list
! if ($ppp != $old_ppp)
{
! if ($ppp == 'user')
! $diff_rooms = explode(",", $old_rrr);
! else
! $diff_rooms = explode(",", $rrr);
! }
! else
{
! $old_rooms_Tab = explode(",",$old_rrr);
! $new_rooms_Tab = explode(",",$rrr);
! $diff_rooms_Tab = array();
! for (reset($old_rooms_Tab); $room2Check=current($old_rooms_Tab); next($old_rooms_Tab))
! {
! if ($room2Check == "") continue;
! if (!room_in($room2Check, $rrr)) $diff_rooms_Tab[] = $room2Check;
! }
! for (reset($new_rooms_Tab); $room2Check=current($new_rooms_Tab); next($new_rooms_Tab))
! {
! if ($room2Check == "") continue;
! if (!room_in($room2Check, $old_rrr)) $diff_rooms_Tab[] = $room2Check;
! }
! unset($old_rooms_Tab);
! unset($new_rooms_Tab);
! if (count($diff_rooms_Tab) > 0)
! $diff_rooms = str_replace(",,",",",ereg_replace("^,|,$","",implode(",",$diff_rooms_Tab)));
! unset($diff_rooms_Tab);
! }
// Send a message to the user if he chats into one of the 'diff' rooms
if (room_in(addslashes($room), $diff_rooms))
{
! if ($ppp == 'moderator' && room_in(addslashes($room), $rrr)) // user becomes moderator for the room he chats into
{
$status = "m";
|