Bug #3429
closed
Advanced search not working with Integer is not clause
Added by nant over 12 years ago.
Updated almost 12 years ago.
Description
To reproduce:
1. Create an integer field
2. Visit a profile and give value of 1 to the field
3. Go to CB User Manager and advance filter using is between 1 and 1 (this should work)
4. Try is not between 1 and 1 - this does not work (returns everyone)
Files
- File 3429.patch 3429.patch added
- Status changed from New to Resolved
- Assignee changed from krileon to beat
- % Done changed from 0 to 100
Patch fixes SQL statement to properly construct for isnot. First it needed to be a > < scenario. It then need to be an OR instead of an AND. Usage is basically same/similar as date fields.
There are other int based fields that may need this same implemented (connections and hits?).
- Target version changed from CB 1.8.1 to CB 1.9
- Priority changed from Normal to High
Increased priority as this is also useful on Joomlapolis
- Status changed from Resolved to Closed
- Estimated time set to 4:00 h
Fixed in r1872 but slightly differently, keeping the private function and using it, to avoid code duplication. Also kept the type-conversion to int, to make sure that no vulnerability is added here. Finally, initialized $min and $max values each time, so that for int fields with multiple columns, it still works as expected.
Thanks for the fix suggestion.
tested and confirming that fix works!
Also available in: Atom
PDF