internal bool EditPage(
string blogId, string pageId, string userName, string password, MWAPage mwaPage, bool publish)
{
var page = Page.GetPage(new Guid(pageId));
if (!page.CanUserEdit)
{
throw new MetaWeblogException("11", "User authentication failed");
}
if (!page.IsPublished && publish)
{
if (!page.CanPublish())
{
throw new MetaWeblogException("11", "Not authorized to publish this Page.");
}
}
page.Title = mwaPage.title;
page.Content = mwaPage.description;
page.Keywords = mwaPage.mt_keywords;
page.ShowInList = publish;
page.IsPublished = publish;
if (mwaPage.pageParentID != "0")
{
page.Parent = new Guid(mwaPage.pageParentID);
}
page.Save();
return true;
}