Closed (won't fix)
Project:
Drupal core
Version:
7.x-dev
Component:
taxonomy.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 May 2005 at 08:51 UTC
Updated:
13 Oct 2009 at 13:28 UTC
Jump to comment: Most recent file
Comments
Comment #1
Cvbge commentedSince it's not easy to add mixed operators i've started with something simpler - adding !term (not term) support. This allows to use something like taxonomy/term/1,!3
The patch is just a test, it'll be completly rewritten to support mixed operators (if I implement it), but at least shows that adding ! operator is quite simple and can be done without big changes.
Comment #2
Cvbge commentedHere's another dirty patch - this time everything is implemented, but I need to clean it up and make a patch against 4.6.0/cvs - currently it's against little modified 4.6.0 version (but, OTOH, taxonomy_select_nodes gets allmost completly rewritten so it does not matter too much).
This patch allows combining AND (,), OR (+) and NOT (!) operators for taxonomy selections, e.g.
taxonomy/term/1,2+3+4,!5,!6/3
Comment #3
Cvbge commentedAttached patch works, is cleaned, and is against DRUPAL-4-6 :)
Comments are welcome.
BTW, implicit object creating (taxonomy.module line 936:
$current->tid = $tids[0];, $current was NULL before that) is generating errors in PHP5, as chx says. Probably needs to be fixed.Comment #4
Cvbge commentedWarnings, not "errors"
Comment #5
moshe weitzman commented'patch' status is reserved for patch files against HEAD that are ready for core commit team to review. If you have a known bug, don't use this status. The queue should be as clean as possible.
Comment #6
Cvbge commentedACK, didn't know about it. It's not explained anywhere (at least I couldn't find it).
The patch wasn't for the bug, but for the feature I requested. Anyway, I'll try to make a patch against HEAD (I did it for 4.6 as I had 4.6 installed and running and I needed this feature :))
Comment #7
Cvbge commentedNew version, against cvs this time.
I don't know how to handle NOT operator. Should "!termX" mean "nodes that have different then termX terms" or "nodes that do not have termX"? For example, let's say user specifies "!1", and we have two nodes with terms:
nodeA: 1,2
nodeB: 2
Should we display nodeA (it has term not being term "1" - "2") [and node B], or node B only (it does not have term "1"). Second option seems better (currently first option is implemented). Maybe add new operator for first option? I'll have to rewrite it.
There were following difference between 4-6 and head:
Currently this is not implemented in my patch (according to drupaldocs it's not working for taxonomy anyway) because I'm not sure if simply removing terms is good.
Comment #8
ricabrantes commentedbump
Comment #9
ricabrantes commentedComment #10
catchThis is better handled by views.