I wanted to add caching by a static variable to
taxonomy_get_vocabularies(). While I was doing this, I remembered a
discussion about putting the node types in their own table and extended
the patch to do this.
A problem is that all selects on the vocabulary table will no longer
contain the node types. Does anybody know of where this might cause
problems? taxonomy_get_vocabularies() will also not return the node type
if called without parameter. I solved the only problem I found that
was caused by this.

The patch is incomplete, it does not contain update information and
database schemes. It also isn't tested. I'd like to get some feedback on the implementation.

Comments

killes@www.drop.org’s picture

Doesn't apply anymore.

killes@www.drop.org’s picture

StatusFileSize
new9.33 KB

I've updated the patch, but the upgrade path is still missing.

Related issues:

http://drupal.org/node/15690
http://drupal.org/node/6357
http://drupal.org/node/12542

killes@www.drop.org’s picture

StatusFileSize
new11.11 KB

Removed static caching, addedupgrade path.

killes@www.drop.org’s picture

StatusFileSize
new11.09 KB

New version. Removes taxonomy_get_vocab_by_name. Wasn't used.

tangent’s picture

Are you sure no modules use get_vocab_by_name? I know that the mailhandler module allows specifying a taxonomy by name instead of by id.

killes@www.drop.org’s picture

Yes, I am sure. grep is my friend. To be honest: metatags module uses it, but that isn't really maintained.
mailhandler lets users add taxo _terms_ by name not vocabs.

tangent’s picture

That's true about the terms versus vocalulary. My bad. I guess I'm still getting used to the whole taxonomy system.

killes@www.drop.org’s picture

StatusFileSize
new11.64 KB

Ok, another patch. Upgrade path is tested (We apparently cannot have two updates on the same day). I also removed a bug that would not show you node types if you assigned vocabs to a node type and later disabled the module. You will no longer lose this assignment when editing the vocabulary.

dries’s picture

Committed to HEAD.

Anonymous’s picture