Download & Extend

Autocomplete set to StartsWith instead of Contains

Project:User Badges
Version:6.x-1.6
Component:Code
Category:bug report
Priority:normal
Assigned:NancyDru
Status:closed (fixed)

Issue Summary

If you wish to set autocomplete to Contains, replace

user_badges.module @ Line 473

$result = db_query_range("SELECT * FROM {user_badges_badges} WHERE name LIKE '%s%%'", $trimstring, 0, 10);

with

$result = db_query_range("SELECT * FROM {user_badges_badges} WHERE name LIKE '%%%s%%'", $trimstring, 0, 10);

If you have lots of badges, this could worsen performance.

Cheers!

Comments

#1

Status:needs review» active

Setting to active &)

#2

Assigned to:Anonymous» NancyDru
Status:active» fixed

Committed to 6.x-1.x-dev.

#3

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.