Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Dec 2009 at 23:25 UTC
Updated:
4 Aug 2010 at 18:25 UTC
Jump to comment: Most recent file
Comments
Comment #1
neopoet commentedComment #2
dawehnerThis doesn't seem to be the right drupal code style:
Additional, are you sure that this is the logical opposite? I don't know whether you know the De Morgans Laws but they would do:
Comment #3
neopoet commentedDereine,
Thanks for reviewing my report.
I agree. De Morgan's Law would apply. You can change the "OR" to "AND".
I apologize for the coding style -- I am a novice programmer. I thought it would be best to submit a potential patch if I was able rather than just complain about something that's missing.
Regards,
Andrew
Comment #4
neopoet commentedI've made the correction. I also ran this through the Drupal coder module -- it suggested that I split the "} else {" statement into a second line. Please let me know if the patch needs any other work.
Comment #5
dawehnerIt should be
+ if ($filter['operator'] == '=') {
+ $query->add_where("node.uid = '%s' OR $table.uid = '%s'", $filter['value'], $filter['value']);
+ }
+ else {
+ $query->add_where("node.uid != '%s' AND $table.uid != '%s'", $filter['value'], $filter['value']);
+ }
:)
Comment #6
esmerel commentedAt this time, only security fixes will be made to the 5.x version of Views.