Skip to content

Commit

Permalink
Item14469: adjustments API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Aug 30, 2017
1 parent b42d537 commit 756cb8b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions data/System/LdapNgPlugin.txt
Expand Up @@ -159,6 +159,7 @@ implements a fast solr-based person search with a different =SolrWikiUsersView=

---++ Change History
%TABLE{columnwidths="7em" tablewidth="100%"}%
| 30 Aug 2017: | adjustments to recent changes in <nop>LdapContrib API |
| 16 Jan 2017: | fix querying for users at all of the DNs configured in ={<nop>UserBase}= |
| 02 Sep 2016: | added =nullformat= parameter to %LDAP macro |
| 23 May 2016: | added =value_separator= to fetch multi-value attributes from LDAP |
Expand Down
4 changes: 2 additions & 2 deletions lib/Foswiki/Plugins/LdapNgPlugin.pm
Expand Up @@ -19,8 +19,8 @@ use strict;
use warnings;

our $core;
our $VERSION = '6.41';
our $RELEASE = '16 Jan 2017';
our $VERSION = '6.42';
our $RELEASE = '30 Aug 2017';
our $NO_PREFS_IN_TOPIC = 1;
our $SHORTDESCRIPTION = 'Query and display data from an LDAP directory';

Expand Down
6 changes: 3 additions & 3 deletions lib/Foswiki/Plugins/LdapNgPlugin/Core.pm
Expand Up @@ -182,7 +182,7 @@ sub handleLdap {
if ($blobAttrs{$attr}) {
$data{$attr} = $ldap->cacheBlob($entry, $attr, $theRefresh);
} else {
$data{$attr} = $ldap->fromLdapCharSet(join($theValueSep, $entry->get_value($attr)));
$data{$attr} = join($theValueSep, $ldap->getValues($entry, $attr));
}
}
push @results, expandVars($theFormat, %data);
Expand Down Expand Up @@ -446,10 +446,10 @@ sub indexTopicHandler {

$doc->add_fields($label => $value);
} else {
my @values = $entry->get_value($attr);
my @values = $ldap->getValues($entry, $attr);
next unless @values;
my $value = join(", ", @values);

my $value = $ldap->fromLdapCharSet(join(", ", @values)); # SMELL: do we want index as an _lst?

_set_field($doc, 'field_' . $label . '_s', $value);
_set_field($doc, 'field_' . $label . '_search', $value);
Expand Down
2 changes: 1 addition & 1 deletion lib/Foswiki/Plugins/LdapNgPlugin/DEPENDENCIES
@@ -1,2 +1,2 @@
Foswiki::Contrib::LdapContrib,>=5.03,perl,Required
Foswiki::Contrib::LdapContrib,>=7.70,perl,Required
Cache::Cache,>=1.05,CPAN,Required
1 change: 1 addition & 0 deletions lib/Foswiki/Plugins/LdapNgPlugin/MANIFEST
@@ -1,3 +1,4 @@
!noci
data/System/LdapNgPlugin.txt 0644
data/System/LdapWikiUsersViewTemplate.txt 0644
lib/Foswiki/Plugins/LdapNgPlugin/Config.spec 0644
Expand Down

0 comments on commit 756cb8b

Please sign in to comment.