[drupal-devel] [bug] QUICKFIX: Vocabulary node type checks are bogus

Goba drupal-devel at drupal.org
Wed Jan 19 15:39:00 UTC 2005


 Project:      Drupal
 Version:      cvs
 Component:    taxonomy.module
 Category:     bug reports
 Priority:     normal
 Assigned to:  Goba
 Reported by:  Goba
 Updated by:   Goba
-Status:       duplicate
+Status:       patch

Duplicate of itself?

Goba



Previous comments:
------------------------------------------------------------------------

January 16, 2005 - 14:56 : Goba

Attachment: http://drupal.org/files/issues/Drupal-fix-vocab-node-types.patch (1.27 KB)

The vocabulary node types checks in taxonomy.module are very vulnerable
to having node types names as prefixes of other node type names %%%s%%
as it is there with %%blog%% will match a lot more, then just this
simple node type. I have a special blogmark type for example, which is
found for %%blog%%.

Since the node types are stored in a comma separated list, the solution
is to search for 'blog' or '%%,blog,%%' or 'blog,%%' or '%%,blog', that
is matching only for that node type, or matching that node type in a
list, or at the beginning of a list, or at the end of a list. It does
not look elegant, but this is the solution for the format used.

This probably also applies to 4.5.0, the patch is against HEAD.

------------------------------------------------------------------------

January 19, 2005 - 00:44 : killes at www.drop.org

http://drupal.org/node/15690

-- 
View: http://drupal.org/node/15690
Edit: http://drupal.org/project/comments/add/15690





More information about the drupal-devel mailing list