Skip to content

Commit

Permalink
Issue alexjamesbrown#41 - Give Edit Page option to publish page
Browse files Browse the repository at this point in the history
Was, by default, setting all edited pages to Draft
  • Loading branch information
MattyBearBytes committed Oct 2, 2013
1 parent e4724e2 commit 69d49d7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion JoeBlogs/wrappers/IWordPressWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public interface IWordPressWrapper : IMetaWeblogWrapper
bool DeletePage(string pageID);
bool EditComment(string comment_id, CommentStatus status, DateTime date_created_gmt, string content, string author, string author_url, string author_email);
bool EditPost(int postID, Post content, bool publish);
bool EditPage(int pageID, Page editedPage);
bool EditPage(int pageID, Page editedPage, bool publish);
IEnumerable<Author> GetAuthors();
Comment GetComment(string comment_id);
CommentCount GetCommentCount(string post_id);
Expand Down
5 changes: 2 additions & 3 deletions JoeBlogs/wrappers/WordPressWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,11 @@ public bool DeletePage(string pageID)
/// <summary>
/// Make changes to a blog page.
/// </summary>
/// <param name="page"></param>
/// <returns></returns>
public bool EditPage(int pageID, Page editedPage)
public bool EditPage(int pageID, Page editedPage, bool publish)
{
var content = Map.From.Page(editedPage);
return _wrapper.EditPage(BlogID, pageID, Username, Password, content);
return _wrapper.EditPage(BlogID, pageID, Username, Password, content, publish);
}

public virtual bool EditPost(int postID, Post content, bool publish)
Expand Down
2 changes: 1 addition & 1 deletion JoeBlogs/xmlRpcInterfaces/IWordPressXmlRpc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public interface IWordPressXmlRpc : IMetaWeblogXmlRpc
bool DeletePage(int blogId, string username, string password, string page_id);

[XmlRpcMethod("wp.editPage")]
bool EditPage(int blogId, int page_id, string username, string password, XmlRpcPage content);
bool EditPage(int blogId, int page_id, string username, string password, XmlRpcPage content, bool publish);

[XmlRpcMethod("wp.editPost")]
bool EditPost(int postid, string username, string password, XmlRpcPost content, bool publish);
Expand Down

0 comments on commit 69d49d7

Please sign in to comment.