Skip to content

Commit

Permalink
modified tag import so categories are also imported as tags
Browse files Browse the repository at this point in the history
  • Loading branch information
rb2k committed Jun 2, 2009
1 parent 477f08f commit 51c45af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.rb
Expand Up @@ -65,7 +65,7 @@




print "Tags: " print "Tags: "
DB_WP.fetch("SELECT name, id FROM #{WP_PREFIX}_terms t, #{WP_PREFIX}_posts p, #{WP_PREFIX}_term_relationships r, #{WP_PREFIX}_term_taxonomy tt WHERE p.post_status='publish' AND tt.taxonomy = 'post_tag' AND p.id=r.object_id AND r.term_taxonomy_id=tt.term_taxonomy_id AND tt.term_id = t.term_id AND p.id=#{post_original_ID}") do |tag_row| DB_WP.fetch("SELECT name, id FROM #{WP_PREFIX}_terms t, #{WP_PREFIX}_posts p, #{WP_PREFIX}_term_relationships r, #{WP_PREFIX}_term_taxonomy tt WHERE p.post_status='publish' AND (tt.taxonomy = 'post_tag' OR tt.taxonomy = 'category') AND p.id=r.object_id AND r.term_taxonomy_id=tt.term_taxonomy_id AND tt.term_id = t.term_id AND p.id=#{post_original_ID}") do |tag_row|


print tag_row[:name] print tag_row[:name]


Expand Down

0 comments on commit 51c45af

Please sign in to comment.