Patch for taxonomy.module in Drupal 4.7.0 beta 4
According to patch of blogapi.module, the second problem is to save category properly. Since the taxonomy.module now support load operation in nodeapi hook, $node->taxonomy is not just a plain array of string anymore. Instead it is a standard class so taxonomy.module must handle the object correct.
--- taxonomy.module.orig 2006-01-26 15:33:20.000000000 +0700
+++ taxonomy.module 2006-01-27 20:55:11.000000000 +0700
@@ -644,6 +644,9 @@
}
}
}
+ else if (is_object($term)) {
+ db_query("INSERT INTO {term_node} (nid, tid) VALUES (%d, %d)", $nid, $term->tid);
+ }
else if ($term) {
db_query("INSERT INTO {term_node} (nid, tid) VALUES (%d, %d)", $nid, $term);
}
Technorati Tags: Bug, English, Review, Drupal, Tips and Tricks, BlogAPI, Taxonomy, Category
- sugree's blog
- 913 reads
Post new comment