Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs
In directory usw-pr-cvs1:/tmp/cvs-serv28962/chat/lib/index_libs
Modified Files:
main_index.lib.php3 index_validation.lib.php3
Log Message:
Optimization of control structures
Index: main_index.lib.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs/main_index.lib.php3,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** main_index.lib.php3 2001/04/13 19:30:55 1.13
--- main_index.lib.php3 2001/04/14 16:05:06 1.14
***************
*** 717,721 ****
echo("\n");
! for ($i = 0; $i < count($defaultChatRooms); $i++)
{
$tmpRoom = stripslashes($defaultChatRooms[$i]);
--- 717,723 ----
echo("\n");
! $arrayCnt = count($defaultChatRooms);
! reset($defaultChatRooms);
! for ($i = 0; $i < $arrayCnt; $i++)
{
$tmpRoom = stripslashes($defaultChatRooms[$i]);
Index: index_validation.lib.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs/index_validation.lib.php3,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** index_validation.lib.php3 2001/04/13 19:30:55 1.6
--- index_validation.lib.php3 2001/04/14 16:05:06 1.7
***************
*** 294,298 ****
$otherModeratedRooms = pmcHandleMagicQuotes($otherModeratedRooms, '', 1, 'del');
$rooms = explode(',', $otherModeratedRooms);
! for ($i = 0; $i < count($rooms); $i++)
{
if (strcasecmp($createRoomName, $rooms[$i]) == 0)
--- 294,300 ----
$otherModeratedRooms = pmcHandleMagicQuotes($otherModeratedRooms, '', 1, 'del');
$rooms = explode(',', $otherModeratedRooms);
! $arrayCnt = count($rooms);
! reset($rooms);
! for ($i = 0; $i < $arrayCnt; $i++)
{
if (strcasecmp($createRoomName, $rooms[$i]) == 0)
|