From d2012694dcaaf79d1dac0f070d3841f0f38d8043 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 14 Apr 2009 16:14:55 +0000 Subject: [PATCH] Fix the alphabetFieldSearch in the UserList, #10163 --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Asset/Wobject/UserList.pm | 4 ++-- lib/WebGUI/i18n/English/Asset_UserList.pm | 14 ++++++-------- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index bb4a27852..9d7228e69 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -8,6 +8,7 @@ - fixed #10141: Matrix 2.0 - Search does not check matching products - fixed #10077: after matrix sort can't return to alphanumeric sort - fixed #10138: Matrix 2.0 Links in Product Listing are broken + - fixed #10163: User List - alphabet search field broken 7.7.3 - fixed #10094: double explanation in thread help diff --git a/lib/WebGUI/Asset/Wobject/UserList.pm b/lib/WebGUI/Asset/Wobject/UserList.pm index bbb4c77ca..ad0c81aeb 100644 --- a/lib/WebGUI/Asset/Wobject/UserList.pm +++ b/lib/WebGUI/Asset/Wobject/UserList.pm @@ -61,7 +61,7 @@ sub getAlphabetSearchLoop { my $htmlEncodedLetter = encode_entities($letter); my $searchURL = "?searchExact_".$fieldName."=".$letter."%25"; my $hasResults; - my $users = $self->session->db->read("select userId from userProfileData where lastName like '".$letter."%'"); + my $users = $self->session->db->read("select userId from userProfileData where `$fieldName` like '".$letter."%'"); while (my $user = $users->hashRef){ my $showGroupId = $self->get("showGroupId"); if ($showGroupId eq '0' || ($showGroupId && $self->isInGroup($showGroupId,$user->{userId}))){ @@ -535,7 +535,7 @@ sub view { my $users = $p->getPageData($paginatePage); foreach my $user (@$users){ my $userObject = WebGUI::User->new($self->session,$user->{userId}); - if ($self->get('overridePublicProfile') || $userObject->profileIsViewable($userObject)){ + if ($self->get('overridePublicProfile') || $userObject->profileIsViewable()) { my (@profileFieldValues); my %userProperties; foreach my $profileField (@profileFields){ diff --git a/lib/WebGUI/i18n/English/Asset_UserList.pm b/lib/WebGUI/i18n/English/Asset_UserList.pm index 76c608cb9..65065603b 100644 --- a/lib/WebGUI/i18n/English/Asset_UserList.pm +++ b/lib/WebGUI/i18n/English/Asset_UserList.pm @@ -123,9 +123,8 @@ be ignored. The User List will show every users profile.|, 'alphabet' => { - message => q|The alphabet that is used for the alphabet search. This is a string of comma -seperated values|, - lastUpdated => 1081514049 + message => q|The alphabet that is used for the alphabet search. This is a string of comma seperated values.|, + lastUpdated => 1239725937 }, 'alphabet label' => { @@ -134,9 +133,8 @@ seperated values|, }, 'alphabet description' => { - message => q|The alphabet that is used for the alphabet search. Has to be a string of comma -seperated values|, - lastUpdated => 1081514049 + message => q|The set of characters that are used for the alphabet search. This allows foreign character sets to be used. Has to be a string of comma seperated values.|, + lastUpdated => 1239725940 }, 'alphabetSearchField' => { @@ -151,9 +149,9 @@ seperated values|, 'alphabetSearchField description' => { message => q|Select the profile field in which the alphabet search will be done. You can disable -the aplhapbet search function by selecting 'Disable Alphabet Search'. This will improve the performance of the +the alphabet search function by selecting 'Disable Alphabet Search'. This will improve the performance of the User List.|, - lastUpdated => 1223651066 + lastUpdated => 1239726022 }, 'Profile not public message' => {