Permalink
Browse files

modified tag import so categories are also imported as tags

  • Loading branch information...
1 parent 477f08f commit 51c45af4ddf110b6e59a47fc87b090d7b3e86545 @rb2k committed Jun 2, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 main.rb
View
@@ -65,7 +65,7 @@
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]

0 comments on commit 51c45af

Please sign in to comment.