public static string LoadBlogsPager(int page, int pageSize, string type) { if (!WebUtils.CheckRightsForAdminPostPages(false)) { return(null); } if (!WebUtils.CheckIfPrimaryBlog(false)) { return(null); } return(JsonBlogs.GetPager(page, pageSize)); }
public static IEnumerable LoadBlogs(int page, int pageSize) { if (!WebUtils.CheckRightsForAdminPostPages(false)) { return(null); } if (!WebUtils.CheckIfPrimaryBlog(false)) { return(null); } return(JsonBlogs.GetBlogs(page, pageSize)); }
public static JsonResponse <JsonBlog> GetBlog(string blogId) { if (!WebUtils.CheckRightsForAdminPostPages(false)) { return(null); } if (!WebUtils.CheckIfPrimaryBlog(false)) { return(null); } if (string.IsNullOrWhiteSpace(blogId) || blogId.Length != 36) { return(new JsonResponse <JsonBlog>() { Success = false, Message = "Blog not found." }); } Blog blog = Blog.GetBlog(new Guid(blogId)); if (blog == null) { return(new JsonResponse <JsonBlog>() { Success = false, Message = "Blog not found." }); } return(new JsonResponse <JsonBlog>() { Success = true, Data = JsonBlogs.CreateJsonBlog(blog) }); }