[activeldap-commit] [ruby-activeldap] r1155 committed - * ignore nil value attribute. #40....
codesite-noreply at google.com
codesite-noreply at google.com
Thu Jul 8 01:09:00 EDT 2010
Revision: 1155
Author: koutou
Date: Wed Jul 7 22:08:36 2010
Log: * ignore nil value attribute. #40.
Reported by christian.pennaforte. Thanks!!!
http://code.google.com/p/ruby-activeldap/source/detail?r=1155
Modified:
/trunk/README
/trunk/lib/active_ldap/adapter/ldap.rb
/trunk/lib/active_ldap/adapter/net_ldap.rb
=======================================
--- /trunk/README Sun May 30 02:32:02 2010
+++ /trunk/README Wed Jul 7 22:08:36 2010
@@ -146,3 +146,4 @@
* Anthony M. Martinez: Helped SASL options support
* ilusi0n.x: A bug report.
* projekttabla: A suggestion.
+* christian.pennaforte: A bug report.
=======================================
--- /trunk/lib/active_ldap/adapter/ldap.rb Wed Jul 7 01:10:12 2010
+++ /trunk/lib/active_ldap/adapter/ldap.rb Wed Jul 7 22:08:36 2010
@@ -90,7 +90,8 @@
info, base, scope, filter, attrs, limit) do |entry|
attributes = {}
entry.attrs.each do |attr|
- attributes[attr] = entry.vals(attr)
+ value = entry.vals(attr)
+ attributes[attr] = value if value
end
yield([entry.dn, attributes])
end
=======================================
--- /trunk/lib/active_ldap/adapter/net_ldap.rb Wed Jul 7 01:10:12 2010
+++ /trunk/lib/active_ldap/adapter/net_ldap.rb Wed Jul 7 22:08:36 2010
@@ -78,7 +78,8 @@
execute(:search, info, args) do |entry|
attributes = {}
entry.original_attribute_names.each do |name|
- attributes[name] = entry[name]
+ value = entry[name]
+ attributes[name] = value if value
end
yield([entry.dn, attributes])
end
More information about the ruby-activeldap-commit
mailing list