Skip to:
Content

Opened 8 years ago

Closed 8 years ago

#3162 closed defect (bug) (fixed)

Alphabetical list doesn't sort properly if user enters spaces

Reported by: defunctlife Owned by:
Milestone: 1.5 Priority: normal
Severity: Version:
Component: Extended Profile Keywords:
Cc:

Description

Ran into an issue where if a user had a leading space in their name, they would be placed at the top of the memberlist when sorting by alphabetical.

Attachments (1)

3162-1.patch (1.2 KB) - added by DJPaul 8 years ago.

Download all attachments as: .zip

Change History (4)

#1 @defunctlife
8 years ago

Sorry, I didn't have time to create a diff.

But I changed:

$sql[] = "ORDER BY pd.value ASC";

to

$sql[] = "ORDER BY ltrim(pd.value) ASC";

line 179, bp 1.2.8. bp-core/bp-core-classes.php

#2 @DJPaul
8 years ago

  • Component changed from Core to XProfile
  • Milestone changed from Awaiting Review to 1.3

Better to trim when we save the data

@DJPaul
8 years ago

#3 @djpaul
8 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [4221]) Trim profile data on save to avoid trailing spaces. Fixes #3162

Note: See TracTickets for help on using tickets.