This is a simple patch to taxonomy_node_save() that checks if a listed tag is actually a synonym for an existing Term.

Current behavior would create a new term for a tag, even if it is already listed as a synonym somewhere else.

With this patch, if you enter a tag that is listed as a synonym, it actually tags the node with the root Term for that synonym.

CommentFileSizeAuthor
taxonomy_syn.patch710 byteseli

Comments

drumm’s picture

Version: 5.1 » 6.x-dev
Status: Needs review » Needs work

This will only go in Drupal 6.x. This sort of functionality change is not appropriate for the stable Drupal 5.x.

The coding standards should be followed (http://drupal.org/coding-standards), including always using {} and more spacing.

catch’s picture

Version: 6.x-dev » 7.x-dev

this'd be great. I've wanted a solution to have terms entered as "John Doe" but rendered as "Doe, John" easily for a while, and it's as good a solution as any. Not for this release cycle though :(

cwgordon7’s picture

Marking as duplicate of http://drupal.org/node/201269 (which is also for 7.x).

6.x version is available in contrib at http://drupal.org/project/synonym_collapsing.

cwgordon7’s picture

Status: Needs work » Closed (duplicate)