public TopicController() {
     boardService = new ForumBoardService();
     categoryService = new ForumCategoryService();
     topicService = new ForumTopicService();
     postService = new ForumPostService();
     attachService = new AttachmentService();
 }
 public ForumCacheRemove( IForumBoardService bds, IForumTopicService topicService, ControllerBase ctx )
 {
     this.controller = ctx;
     this.boardService = bds;
     this.owner = ctx.ctx.owner.obj;
     this.topicService = topicService;
 }
Beispiel #3
0
 public TopicsController(IAdminCategoryService categories, IForumTopicService topics, IHtmlService html, UserManager <User> userManager)
 {
     this.categories  = categories;
     this.topics      = topics;
     this.html        = html;
     this.userManager = userManager;
 }
Beispiel #4
0
 public ForumCacheRemove(IForumBoardService bds, IForumTopicService topicService, ControllerBase ctx)
 {
     this.controller   = ctx;
     this.boardService = bds;
     this.owner        = ctx.ctx.owner.obj;
     this.topicService = topicService;
 }
Beispiel #5
0
 public TopicController()
 {
     boardService    = new ForumBoardService();
     categoryService = new ForumCategoryService();
     topicService    = new ForumTopicService();
     postService     = new ForumPostService();
     attachService   = new AttachmentService();
 }
Beispiel #6
0
 public ForumController(IBaseControllerServiceFacade baseServiceFacade, IForumSectionService sectionService, IForumTopicService topicService, 
                        IForumPostService postService)
     : base(baseServiceFacade)
 {
     _sectionService = sectionService;
     _topicService = topicService;
     _postService = postService;
 }
Beispiel #7
0
        private void addComment(object[] args, object target)
        {
            ForumPost  post    = args[0] as ForumPost;
            ForumTopic topic   = ForumTopic.findById(post.TopicId);
            User       creator = args[1] as User;
            IMember    owner   = args[2] as IMember;
            IApp       app     = args[3] as IApp;

            OpenComment c = new OpenComment();

            c.Content   = strUtil.ParseHtml(post.Content);
            c.TargetUrl = alink.ToAppData(topic);

            c.TargetDataType = typeof(ForumTopic).FullName;
            c.TargetDataId   = topic.Id;
            c.TargetTitle    = topic.Title;
            c.TargetUserId   = topic.Creator.Id;

            c.OwnerId = owner.Id;
            c.AppId   = app.Id;
            c.FeedId  = getFeedId(topic);

            c.Ip       = post.Ip;
            c.Author   = creator.Name;
            c.ParentId = 0;
            c.AtId     = 0;

            c.Member = creator;

            Result result = commentService.CreateNoNotification(c);

            // 修复comment额外的replies更新
            IForumTopicService topicService = ObjectContext.Create <IForumTopicService>(typeof(ForumTopicService));

            topic.Replies = topicService.CountReply(post.TopicId);
            topic.update("Replies");

            // 同步表
            CommentSync x = new CommentSync();

            x.Post    = post;
            x.Comment = result.Info as OpenComment;
            x.insert();
        }
Beispiel #8
0
 public ForumPollService()
 {
     topicService = new ForumTopicService();
 }
 public UploaderController() {
     topicService = new ForumTopicService();
     attachService = new AttachmentService();
 }
Beispiel #10
0
 public SearchController()
 {
     topicService = new ForumTopicService();
 }
 public PollController() {
     topicService = new ForumTopicService();
     boardService = new ForumBoardService();
     pollService = new ForumPollService();
 }
Beispiel #12
0
 public TopicsController(IForumTopicService topic, IForumReplayService replies)
 {
     this.topic   = topic;
     this.replies = replies;
 }
Beispiel #13
0
 public TagController() {
     topicService = new ForumTopicService();
 }
Beispiel #14
0
 public CategoriesController(IAdminCategoryService categories, IForumTopicService topics)
 {
     this.categories = categories;
     this.topics     = topics;
 }
 public SearchController() {
     topicService = new ForumTopicService();
 }
Beispiel #16
0
 public UploaderController()
 {
     topicService  = new ForumTopicService();
     attachService = new AttachmentService();
 }
Beispiel #17
0
 public PollController()
 {
     topicService = new ForumTopicService();
     boardService = new ForumBoardService();
     pollService  = new ForumPollService();
 }
 public ForumTopicController(IForumTopicService forumTopicService)
 {
     _forumTopicService = forumTopicService;
 }
 public TagController()
 {
     topicService = new ForumTopicService();
 }
Beispiel #20
0
 public ServiceController()
 {
     postService  = new ForumPostService();
     topicService = new ForumTopicService();
 }