예제 #1
0
 public MyListController()
 {
     blogService = new BlogService();
     postService = new BlogPostService();
     categoryService = new BlogCategoryService();
     friendService = new FriendService();
 }
예제 #2
0
        public NotificationController()
        {
            notificationService = new NotificationService();
            friendService = new FriendService();

            this.LayoutControllerType = typeof( MsgController );
        }
예제 #3
0
 public FriendController() {
     followService = new FollowerService();
     friendService = new FriendService();
     userService = new UserService();
     blacklistService = new BlacklistService();
     LayoutControllerType = typeof( MicroblogController );
 }
예제 #4
0
 public MicroblogService()
 {
     feedService = new FeedService();
     nfService = new NotificationService();
     friendService = new FriendService();
     followerService = new FollowerService();
 }
예제 #5
0
 public FeedController()
 {
     feedService = new FeedService();
     friendService = new FriendService();
     visitorService = new VisitorService();
     followService = new FollowerService();
 }
예제 #6
0
 public PhotoPostService()
 {
     friendService = new FriendService();
     pickedService = new PickedService();
     incomeService = new UserIncomeService();
     followerService = new FollowerService();
 }
예제 #7
0
 public FriendController()
 {
     friendService = new FriendService();
     userService = new UserService();
     followService = new FollowerService();
     blacklistService = new BlacklistService();
 }
예제 #8
0
 public ViewerContext( MvcContext ctx )
 {
     friendService = new FriendService();
     msgService = new MessageService();
     followService = new FollowerService();
     this.ctx = ctx;
 }
예제 #9
0
        public ShareController()
        {
            feedService = new FeedService();
            friendService = new FriendService();
            followService = new FollowerService();

            shareService = new ShareService();
        }
예제 #10
0
 public TrashController()
 {
     blogService = new BlogService();
     postService = new BlogPostService();
     categoryService = new BlogCategoryService();
     feedService = new FeedService();
     friendService = new FriendService();
 }
예제 #11
0
 public PostController()
 {
     blogService = new BlogService();
     postService = new BlogPostService();
     categoryService = new BlogCategoryService();
     friendService = new FriendService();
     fileService = new UserFileService();
 }
예제 #12
0
        public MainController()
        {
            confirmService = new UserConfirmService();
            userService = new UserService();
            loginService = new LoginService();
            friendService = new FriendService();
            inviteService = new InviteService();

            HidePermission( typeof( SecurityController ) );
        }
예제 #13
0
        public WeiboRegisterController()
        {
            userService = new UserService();
            confirmService = new UserConfirmService();
            inviteService = new InviteService();
            loginService = new LoginService();
            friendService = new FriendService();

            appService = new UserAppService();
            menuService = new UserMenuService();
        }
예제 #14
0
        public MyController()
        {
            base.HideLayout( typeof( Photo.LayoutController ) );

            friendService = new FriendService();

            postService = new PhotoPostService();
            albumService = new PhotoAlbumService();

            categoryService = new PhotoSysCategoryService();
        }
예제 #15
0
 public HomeController()
 {
     microblogService = new MicroblogService();
     followService = new FollowerService();
     visitorService = new VisitorService();
     mfService = new MicroblogFavoriteService();
     commentService = new OpenCommentService();
     photoPostService = new PhotoPostService();
     friendService = new FriendService();
     blogAppService = new BlogService();
     photoAppService = new PhotoService();
 }
예제 #16
0
        public RegisterController()
        {
            userService = new UserService();
            confirmService = new UserConfirmService();
            confirmEmail = new ConfirmEmail();
            inviteService = new InviteService();
            loginService = new LoginService();
            friendService = new FriendService();

            appService = new UserAppService();
            menuService = new UserMenuService();

            HidePermission( typeof( SecurityController ) );
        }
예제 #17
0
        // 根据邀请码注册,需要加为好友
        public static void ProcessFriend( User newRegUser, MvcContext ctx )
        {
            IInviteService inviteService = new InviteService();
            IFriendService friendService = new FriendService();

            int friendId = ctx.PostInt( "friendId" );
            if (friendId <= 0) return;

            String friendCode = ctx.Post( "friendCode" );

            Result result = inviteService.Validate( friendId, friendCode );
            if (result.HasErrors) return;

            friendService.AddInviteFriend( newRegUser, friendId );
        }
예제 #18
0
 public ShareService()
 {
     fs = new FriendService();
     feedService = new FeedService();
     nfService = new NotificationService();
 }
예제 #19
0
 public FollowerService()
 {
     friendService = new FriendService();
     userService = new UserService();
 }
예제 #20
0
파일: WebUtils.cs 프로젝트: Boshin/wojilu
 private static Boolean isWaitingFriendApproving( int userId, int targetId )
 {
     FriendService friendService = new FriendService();
     return friendService.IsWaitingFriendApproving( userId, targetId );
 }
예제 #21
0
 public PhotoController()
 {
     base.HideLayout( typeof( Photo.LayoutController ) );
     postService = new PhotoPostService();
     friendService = new FriendService();
 }
예제 #22
0
        private String checkUserApp()
        {
            if (ctx.app == null) return appOk;

            IAccessStatus securityApp = ctx.app.obj as IAccessStatus;
            if (securityApp == null) return appOk;

            if (ctx.owner.Id == ctx.viewer.Id) return appOk;

            // 基于好友关系验证app权限
            if (securityApp.AccessStatus == (int)AccessStatus.Public)
                return appOk;

            if (securityApp.AccessStatus == (int)AccessStatus.Friend) {
                FriendService friendService = new FriendService();
                if (friendService.IsFriend( ctx.viewer.Id, ctx.owner.Id ) == false) return lang( "exFriendVisitOnly" );
            }
            else if (securityApp.AccessStatus == (int)AccessStatus.Private) {
                if (ctx.viewer.Id != ctx.owner.obj.Id) return lang( "exVisitForbidden" );
            }

            return appOk;
        }
예제 #23
0
 public BlogController()
 {
     postService = new BlogPostService();
     friendService = new FriendService();
 }
예제 #24
0
 public BlogPostService() {
     friendService = new FriendService();
     incomeService = new UserIncomeService();
     microblogService = new MicroblogService();
 }
예제 #25
0
 public FeedService()
 {
     friendService = new FriendService();
     followerService = new FollowerService();
     nfService = new NotificationService();
 }
예제 #26
0
 public PhotoPostService()
 {
     friendService = new FriendService();
     pickedService = new PickedService();
 }
예제 #27
0
        public virtual List<Group> GetGroupByFriends( int userId, int count )
        {
            FriendService fs = new FriendService();
            String fIds = fs.FindFriendsIds( userId );
            if (strUtil.IsNullOrEmpty( fIds )) return new List<Group>();

            List<GroupUser> guList = db.find<GroupUser>( "Member.Id in ( " + fIds + " ) " ).list();
            List<GroupUser> myList = db.find<GroupUser>( myGroupCondition( userId ) ).list();

            List<Group> results = new List<Group>();

            foreach (GroupUser gu in guList) {
                if (gu.Group == null) continue;
                if (isInMyGroups( myList, gu.Group )) continue;
                if (isGroupAdded( results, gu.Group )) continue;
                results.Add( gu.Group );
            }
            return results;
        }
예제 #28
0
 private static bool isWaitingFriendApproving(long userId, long targetId) {
     FriendService friendService = new FriendService();
     return friendService.IsWaitingFriendApproving( userId, targetId );
 }
예제 #29
0
 public BlogPostService()
 {
     friendService = new FriendService();
 }
예제 #30
0
 public BlacklistService()
 {
     userService = new UserService();
     friendService = new FriendService();
     followerService = new FollowerService();
 }