Project

General

Profile

« Previous | Next » 

Revision c30d4613

Added by Marc Dequènes over 14 years ago

  • ID c30d46135dc6b02049f912f586cfd6b07701bb39

[evol] improved code for objects recognition, created display helper for raw items, and added family items display support

View differences:

bin/shadowwalker
def execute (args)
raise SyntaxError, _("no search arguments") if args.empty?
res = LdapObject.items_search_from_strings(args)
res = LdapObject.items_find_from_strings(args)
unless res.empty?
display_lines = []
Hash[res].each_pair do |item_dn, item_data|
obj_hdl = LdapObject.find_raw_item_object(item_data)
if obj_hdl
obj_klass = $ldapctl.find_klass(obj_hdl)
item = obj_klass.new(item_dn)
display_lines << "#{obj_hdl}/#{item.name}"
else
display_lines << "unknown/#{item_dn}"
end
res.each do |raw_item|
display_lines << LdapObject.raw_item_info(raw_item)[:name]
end
puts display_lines.join("\n")
end

Also available in: Unified diff