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

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

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

            HidePermission( typeof( SecurityController ) );
        }
Beispiel #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();
        }
Beispiel #14
0
        public MyController()
        {
            base.HideLayout( typeof( Photo.LayoutController ) );

            friendService = new FriendService();

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

            categoryService = new PhotoSysCategoryService();
        }
Beispiel #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();
 }
Beispiel #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 ) );
        }
Beispiel #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 );
        }
Beispiel #18
0
 public ShareService()
 {
     fs = new FriendService();
     feedService = new FeedService();
     nfService = new NotificationService();
 }
Beispiel #19
0
 public FollowerService()
 {
     friendService = new FriendService();
     userService = new UserService();
 }
Beispiel #20
0
 private static Boolean isWaitingFriendApproving( int userId, int targetId )
 {
     FriendService friendService = new FriendService();
     return friendService.IsWaitingFriendApproving( userId, targetId );
 }
 public PhotoController()
 {
     base.HideLayout( typeof( Photo.LayoutController ) );
     postService = new PhotoPostService();
     friendService = new FriendService();
 }
Beispiel #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;
        }
Beispiel #23
0
 public BlogController()
 {
     postService = new BlogPostService();
     friendService = new FriendService();
 }
 public BlogPostService() {
     friendService = new FriendService();
     incomeService = new UserIncomeService();
     microblogService = new MicroblogService();
 }
Beispiel #25
0
 public FeedService()
 {
     friendService = new FriendService();
     followerService = new FollowerService();
     nfService = new NotificationService();
 }
 public PhotoPostService()
 {
     friendService = new FriendService();
     pickedService = new PickedService();
 }
Beispiel #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;
        }
Beispiel #28
0
 private static bool isWaitingFriendApproving(long userId, long targetId) {
     FriendService friendService = new FriendService();
     return friendService.IsWaitingFriendApproving( userId, targetId );
 }
Beispiel #29
0
 public BlogPostService()
 {
     friendService = new FriendService();
 }
Beispiel #30
0
 public BlacklistService()
 {
     userService = new UserService();
     friendService = new FriendService();
     followerService = new FollowerService();
 }