Bug #569

Article publish status in mt3 conversion

Added by robert-rojotek-com - 945 days ago. Updated 296 days ago.

Status :New Start :
Priority :Urgent Due date :
Assigned to :tobi - % Done :

0%

Category :sidebars
Target version :Maybe Someday
Resolution :


Description

The draft/published status is lost when running the mt3 converter. This can be fixed by pulling in the status in the query, and then using this to mark unpublished articles.

The query becomes:
      SELECT
        entry_id,
        entry_allow_comments AS allow_comments,
        entry_allow_pings AS allow_pings,
        entry_title AS title,
        entry_text AS body,
        entry_text_more AS extended,
        entry_excerpt AS excerpt,
        entry_convert_breaks AS convert_breaks,
        entry_keywords AS keywords,
        entry_created_on AS created_at,
        entry_modified_on AS updated_at,
        author_name AS author,
        entry_status        
      FROM @#{self.options[:mt_db]}@.mt_entry, @#{self.options[:mt_db]}@.mt_author
      WHERE entry_blog_id = '#{self.options[:blog_id]}'
      AND author_id = entry_author_id
The attribute setting is updated to ignore the entry status:
a.attributes = entry.reject { |k,v| k =~ /entry_id|convert_breaks|entry_status/ }

and published is set when needed:
      if (entryentry_status.to_s=="1")
        a.published=false
      end

History

12/04/2005 03:13 AM - robert-rojotek-com -

(Code is in the convert_entries method in db/converters/mt3.rb)

Also available in: Atom PDF