////------------------------------------------------------------------------------
//// <copyright company="Telligent Systems">
////     Copyright (c) Telligent Systems Corporation.  All rights reserved.
//// </copyright> 
////------------------------------------------------------------------------------
//
//using System;
//using System.Collections;
//
//using CommunityServer.Components;
//
//namespace CommunityServer.Blogs.Components 
//{
//	
//    /// <summary>
//    /// Manages the feedback that a blog post recieves.
//    /// </summary>
//    public sealed class BlogFeedback 
//    {
//        private BlogFeedback() 
//        {
//            // sealed static class
//        }
//
//        /// <summary>
//        /// Deletes blog feedback by postIDs
//        /// </summary>
//        public static void DeleteFeedback( Int32 userID, Int32 sectionID, Int32[] postIDs ) 
//        {
//            foreach( Int32 postID in postIDs ) 
//            {
//                WeblogPosts.Delete(sectionID, postID, BlogPostType.Comment, userID);
//            }
//			
//        }
//
//        /// <summary>
//        /// Reverses the approved flag on the given feedback items
//        /// </summary>
//        public static void ToggleApproveFeedback( Int32 userID, Int32 weblogID, Int32[] postIDs ) 
//        {
//            foreach( Int32 postID in postIDs ) 
//            {
//                WeblogPost p = WeblogPosts.GetPost( postID, false, false, true );
//                if(weblogID == p.SectionID) 
//                {
//					p.IsApproved = !p.IsApproved;
//					WeblogPosts.Update( p, userID, false );
//                }
//            }
//        }
//
//        /// <summary>
//        /// Switches a comment BlogPostType from Comment to PersonalComment, and vice-versa
//        /// </summary>
//        public static void TogglePersonalFeedback( Int32 userID, Int32 weblogID, Int32[] postIDs ) 
//        {
//            foreach( Int32 postID in postIDs ) 
//            {
//                WeblogPost p = WeblogPosts.GetPost(postID, false, false, true );
//                if(weblogID == p.SectionID) 
//                {
//                    if (p.BlogPostType == BlogPostType.Comment)
//                        p.BlogPostType = BlogPostType.PersonalComment;
//                    else if (p.BlogPostType == BlogPostType.PersonalComment)
//                        p.BlogPostType = BlogPostType.Comment;
//
//                    WeblogPosts.Update( p, userID, false );
//                }
//            }
//        }
//
//    }
//}
