Project

General

Profile

Actions

Bug #3429

closed

Advanced search not working with Integer is not clause

Added by nant over 12 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
Start date:
06 April 2012
Due date:
% Done:

100%

Estimated time:
4:00 h

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

3429.patch (3.8 KB) 3429.patch krileon, 09 April 2012 21:29
Actions #1

Updated by krileon over 12 years ago

  • 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?).

Actions #2

Updated by beat over 12 years ago

  • Target version changed from CB 1.8.1 to CB 1.9
Actions #3

Updated by nant about 12 years ago

  • Priority changed from Normal to High

Increased priority as this is also useful on Joomlapolis

Actions #4

Updated by beat about 12 years ago

  • 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.

Actions #5

Updated by nant about 12 years ago

tested and confirming that fix works!

Actions

Also available in: Atom PDF