private Forum GetForumBelongsMessage(ForumMessage message)
        {
            while (message.ForumFolder == null)
                message = message.Parent;

            return GetForumBelongsFolder(message.ForumFolder);
        }
        private void DeleteMessagesChildren(ForumMessage message)
        {
            if (message.MessagesChildren.Count != 0)
            {
                foreach (ForumMessage m in message.MessagesChildren)
                    DeleteMessagesChildren(m);
                message.MessagesChildren.Clear();
                message.Save();
//FIXME IF CACHE
            }
            else
            {
                message.Delete();
            }
        }
        private ForumFolder GetFolderBelongsMessage(ForumMessage message)
        {
            while (message.ForumFolder == null)
                message = message.Parent;

            return message.ForumFolder;
        }
        public void CreateMessage(int idFolderParent, int idMessageParent)
        {
            if (idFolderParent != 0)
                CheckGroup(GetForumBelongsFolder(ForumFolder.Find(idFolderParent)));
            else
                CheckGroup(GetForumBelongsMessage(ForumMessage.Find(idMessageParent)));

            if (idFolderParent != 0) // New thread
            {
                ForumFolder folder = ForumFolder.Find(idFolderParent);

                if (folder.FoldersChildren.Count == 0)
                {
                    PropertyBag["idFolderParent"] = idFolderParent;
                    PropertyBag["idMessageParent"] = idMessageParent;
                }
                else // Can't be msg and subfolder in same folder
                {
                    Hashtable parameters = new Hashtable();
                    parameters["Id"] = folder.Forum.Id;
                    RedirectToAction("viewforum", parameters);
                }
            }
            else // Reply to message
            {
                    PropertyBag["idFolderParent"] = idFolderParent;
                    PropertyBag["idMessageParent"] = idMessageParent;
            }

            PropertyBag["message"] = new ForumMessage();
            LayoutName = null;
        }