mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fixing Remote Blog Post publishing
A new blog post containing tags could not be processed --HG-- branch : 1.x extra : rebase_source : 8816df6c0a1077d702161d0a71469d1985d9a37c
This commit is contained in:
@@ -60,7 +60,7 @@ namespace Orchard.Tags.Services {
|
||||
break;
|
||||
case "metaWeblog.newPost":
|
||||
MetaWeblogUpdateTags(
|
||||
Convert.ToInt32(context.Request.Params[0].Value),
|
||||
GetId(context.Response), // for a new Post, the id is in the Response, as the request contains the blogId
|
||||
Convert.ToString(context.Request.Params[1].Value),
|
||||
Convert.ToString(context.Request.Params[2].Value),
|
||||
(XRpcStruct)context.Request.Params[3].Value,
|
||||
@@ -79,6 +79,12 @@ namespace Orchard.Tags.Services {
|
||||
}
|
||||
}
|
||||
|
||||
private static int GetId(XRpcMethodResponse response) {
|
||||
return response != null && response.Params.Count == 1 && response.Params[0].Value is int
|
||||
? Convert.ToInt32(response.Params[0].Value)
|
||||
: 0;
|
||||
}
|
||||
|
||||
private void MetaWeblogAttachTagsToPost(XRpcStruct postStruct, int postId, string userName, string password, ICollection<IXmlRpcDriver> drivers) {
|
||||
if (postId < 1)
|
||||
return;
|
||||
|
Reference in New Issue
Block a user