PDA

View Full Version : [fixed] vB 2.x Bug: Admin CP e-mail list generation queries are case-sensitive


Paul
Fri 15th Aug '03, 12:43pm
Hi,

A number of fields including "username", "e-mail", "usertitle", IM fields, and "homepage" are case-sensitive when the E-mail users or Create e-mail list features are used from within the Admin CP. Either the SQL $condition queries need to be modified to create a case insensitive search (what I believe to be the desired behavior) or the control panel must be updated to reflect this caveat.

This is the first time I've encountered an area of the CP that uses case-sensitive matching and thusly was very confusing when trying to generate a list and not seeing all of the expected addresses. Of course, you could call it "expected behavior" and write it off as intentional, but it'd only make you look ridiculous to do so. ;)

Proponents of the "omg-this-is-by-design" theory will find that the "Find user" function works as expected and properly uses queries that check for case-insensitive matches (i.e. INSTR(LCASE($variable),$search) ). One would think that would be uniform throughout the product.

I have not tested this against vB3.

Freddie Bingham
Wed 5th Nov '03, 7:00pm
In MySQL 3.23, INSTR is case-sensitive and so this is an issue with email.php. MySQL 4.0 treats INSTR as case-insensitive unless the field is declared binary (which none of ours are by the way). Please use the attached email.php if you are having this problem. This file should work on at least 2.3.1 and 2.3.2

vB3 does not exhibit this issue as it uses LIKE for string comparisons of user fields rather than INSTR.