plugins/SpecialGroups.php
changeset 541 acb7e23b6ffa
parent 536 218a627eb53e
child 564 a1c450a911a6
equal deleted inserted replaced
540:1e4b759da336 541:acb7e23b6ffa
   221           
   221           
   222           $r = $db->fetchrow();
   222           $r = $db->fetchrow();
   223           $members[] = $r;
   223           $members[] = $r;
   224           $db->free_result();
   224           $db->free_result();
   225           
   225           
       
   226           // just added a user to the group, so regenerate the ranks cache
       
   227           generate_ranks_cache();
       
   228           
   226           break;
   229           break;
   227         case 'del_users':
   230         case 'del_users':
   228           foreach ( $members as $i => $member )
   231           foreach ( $members as $i => $member )
   229           {
   232           {
   230             if ( isset($_POST['del_user'][$member['member_id']]) )
   233             if ( isset($_POST['del_user'][$member['member_id']]) )
   233               if (!$q)
   236               if (!$q)
   234                 $db->_die('SpecialGroups.php, line ' . __LINE__);
   237                 $db->_die('SpecialGroups.php, line ' . __LINE__);
   235               unset($members[$i]);
   238               unset($members[$i]);
   236             }
   239             }
   237           }
   240           }
       
   241           // regenerate the ranks cache
       
   242           generate_ranks_cache();
       
   243           
   238           break;
   244           break;
   239         case 'pending':
   245         case 'pending':
   240           foreach ( $pending as $i => $member )
   246           foreach ( $pending as $i => $member )
   241           {
   247           {
   242             if ( isset( $_POST['with_user'][$member['member_id']]) )
   248             if ( isset( $_POST['with_user'][$member['member_id']]) )
   257                   $db->_die('SpecialGroups.php, line ' . __LINE__);
   263                   $db->_die('SpecialGroups.php, line ' . __LINE__);
   258                 unset($pending[$i]);
   264                 unset($pending[$i]);
   259               }
   265               }
   260             }
   266             }
   261           }
   267           }
       
   268           // memberships updated/changed, regenerate ranks cache
       
   269           generate_ranks_cache();
       
   270           
   262           echo '<div class="info-box">' . $lang->get('groupcp_msg_pending_updated') . '</div>';
   271           echo '<div class="info-box">' . $lang->get('groupcp_msg_pending_updated') . '</div>';
   263           break;
   272           break;
   264       }
   273       }
   265     }
   274     }
   266     
   275