public int editPage(string blog_id, string page_id, string username, string password, Post content, bool publish)
{
Framework.BlogInfo info = Config.CurrentBlog;
ValidateUser(username, password, info.AllowServiceAccess);
Entry entry = Entries.GetEntry(Int32.Parse(page_id), PostConfig.None, true);
if (entry != null)
{
entry.Author = info.Author;
entry.Email = info.Email;
entry.Body = content.description;
entry.Title = content.title;
entry.Description = string.Empty;
entry.IncludeInMainSyndication = true;
if (content.categories != null)
entry.Categories.AddRange(content.categories);
entry.PostType = PostType.Story;
entry.IsActive = publish;
if (!string.IsNullOrEmpty(content.wp_slug))
{
entry.EntryName = content.wp_slug;
}
entry.DateModified = Config.CurrentBlog.TimeZone.Now;
Entries.Update(entry);
}
return Convert.ToInt32(page_id);
}