This patch updates the taxonomy handlers for D7-related changes. In particular:

  • Switches all vocabulary vid references to use vocabulary machine_name for better compatibility with exportables. There is a small compatibility layer in each handler which will accept a legacy $this->options['vid'] or ['vids'] key and convert it to machine name.
  • Adds views_handler_filter_vocabulary_machine_name.inc filter handler.
  • Term synonym functionality has been removed (see #567572: Remove taxonomy synonyms since Field API is better). References and options for term synonym handling has been removed.
  • All db_query() calls updated to new db api.
  • $def['table formula'] in views_handler_relationship_node_term_data defines a subselect as an string (SQL). The new dbapi expects this to not be a SQL string but instead a select query object. This patch makes this change but we may want further review of this API change in another issue.
CommentFileSizeAuthor
d7_views_taxonomy_handlers.patch31.64 KByhahn

Comments

dawehner’s picture

Status: Needs review » Needs work

Some things

* add tag 'term_access'
*

-    $tokens['[' . $this->options['id'] . '-vid' . ']'] = $item['vid'];
+    $tokens['[' . $this->options['id'] . '-vocabulary-machine-name' . ']'] = $item['vid'];

But we don't have $item['vid'] anymore

+        $this->items[$term->node_vid][$term->tid]['vocabulary_machine_name'] = check_plain($term->vocabulary_machine_name);

The rest is rtbc from my perspective. I already had a look and some tests earlier this week.

febbraro’s picture

subscribe

dawehner’s picture

Status: Needs work » Fixed

So. I fixed the two things and commited the patch. Awesome work!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.