0
@@ -6,7 +6,7 @@ module MetaWeblogStructs
0
member :permaLink, :string
0
- member :
sections, [:string]
0
+ member :
categories, [:string]
0
member :mt_text_more, :string
0
member :mt_excerpt, :string
0
member :mt_keywords, :string
0
@@ -109,7 +109,7 @@ class MetaWeblogService < XmlRpcService
0
:url => article_url(article).to_s,
0
:link => article_url(article).to_s,
0
:permaLink => article.permalink.to_s,
0
- :
sections => article.sections.collect { |c| c.name },
0
+ :
categories => article.sections.collect { |c| c.name },
0
:mt_text_more => article.body.to_s,
0
:mt_excerpt => article.excerpt.to_s,
0
# :mt_keywords => article.keywords.to_s,
0
@@ -117,7 +117,7 @@ class MetaWeblogService < XmlRpcService
0
# :mt_allow_pings => article.allow_pings? ? 1 : 0,
0
# :mt_convert_breaks => (article.text_filter.name.to_s rescue ''),
0
# :mt_tb_ping_urls => article.pings.collect { |p| p.url },
0
- :dateCreated => (article.published_at
.to_formatted_s(:db) rescue "")
0
+ :dateCreated => (article.published_at
rescue "")
0
@@ -127,12 +127,11 @@ class MetaWeblogService < XmlRpcService
0
def post_it(article, user, password, struct, publish)
0
- article.attributes = {:updater => @user, :section_ids => Section.find(:all, :conditions => ['name IN (?)', struct['
sections']]).collect(&:id),
0
+ article.attributes = {:updater => @user, :section_ids => Section.find(:all, :conditions => ['name IN (?)', struct['
categories']]).collect(&:id),
0
:body => struct['description'].to_s, :title => struct['title'].to_s, :excerpt => struct['mt_excerpt'].to_s}
0
+ utc_date = Time.utc(struct['dateCreated'].year, struct['dateCreated'].month, struct['dateCreated'].day, struct['dateCreated'].hour, struct['dateCreated'].sec, struct['dateCreated'].min) rescue article.published_at
0
- utc_date = Time.utc(struct['dateCreated'].year, struct['dateCreated'].month, struct['dateCreated'].day, struct['dateCreated'].hour, struct['dateCreated'].sec, struct['dateCreated'].min)
0
- article.published_at = publish == 1 ? utc_date : nil
0
+ article.published_at = publish == true ? utc_date : nil
Comments
No one has commented yet.