/**
  * Removing a group, invovles removing everything related to this group.
  * @param	int		the group id
  */
 function removeGroup($id)
 {
     $social_group = new SocialGroup($id);
     //remove group activities
     $status = $social_group->removeGroupActivities();
     //remove group forums
     $status &= $social_group->removeGroupForums();
     //remove group members
     $status &= $social_group->removeGroupMembers();
     //remove group requests
     $status &= $social_group->removeGroupRequests();
     //remove group invitations
     $status &= $social_group->removeGroupInvitations();
     //remove message board
     $status &= $social_group->removeAllMessages();
     //remove group logo
     $status &= $social_group->removeGroupLogo();
     //remove groups
     $sql = 'DELETE FROM %ssocial_groups WHERE id=%d';
     $status &= queryDB($sql, array(TABLE_PREFIX, $id));
 }
示例#2
0
 /**
  * Removing a group, invovles removing everything related to this group.
  * @param	int		the group id
  */
 function removeGroup($id)
 {
     global $db;
     $social_group = new SocialGroup($id);
     //remove group activities
     $status = $social_group->removeGroupActivities();
     //remove group forums
     $status &= $social_group->removeGroupForums();
     //remove group members
     $status &= $social_group->removeGroupMembers();
     //remove group requests
     $status &= $social_group->removeGroupRequests();
     //remove group invitations
     $status &= $social_group->removeGroupInvitations();
     //remove message board
     $status &= $social_group->removeAllMessages();
     //remove group logo
     $status &= $social_group->removeGroupLogo();
     //remove groups
     $sql = 'DELETE FROM ' . TABLE_PREFIX . 'social_groups WHERE id=' . $id;
     $status &= mysql_query($sql, $db);
 }