public bool DeletePost(string postId, bool isPage) { bool deletedRemotePost = PostDeleteHelper.SafeDeleteRemotePost(_blogId, postId, isPage); if (!deletedRemotePost) { DialogResult result = DisplayMessage.Show(MessageId.LocalDeleteConfirmation, isPage ? Res.Get(StringId.PageLower) : Res.Get(StringId.PostLower)); if (result == DialogResult.No) { return(false); } } return(PostDeleteHelper.SafeDeleteLocalPost(_blogId, postId)); }
public override bool DeletePost(string postId, bool isPage) { FileInfo postFile = new FileInfo(postId); PostInfo postInfo = PostEditorFile.GetPostInfo(postFile); if (postInfo != null) { bool deletedRemotePost = PostDeleteHelper.SafeDeleteRemotePost(postInfo.BlogId, postInfo.BlogPostId, postInfo.IsPage); if (!deletedRemotePost) { DialogResult result = DisplayMessage.Show(MessageId.LocalDeleteConfirmation, isPage ? Res.Get(StringId.PageLower) : Res.Get(StringId.PostLower)); if (result == DialogResult.No) { return(false); } } return(PostDeleteHelper.SafeDeleteLocalPost(postFile)); } else { return(false); } }
public override bool DeletePost(string postId, bool isPage) { return(PostDeleteHelper.SafeDeleteLocalPost(new FileInfo(postId))); }