slight cleanup: make more clear, it's an array
FossilOrigin-Name: 1f29b4d694f8e86100debed943738e7babce5c1ed6062818ea110bef5cd130eb
This commit is contained in:
parent
4fe75271e4
commit
dcbcabb056
1 changed files with 4 additions and 5 deletions
9
shelldap
9
shelldap
|
|
@ -927,8 +927,7 @@ sub run_cat
|
|||
{
|
||||
my $self = shift;
|
||||
my $dn = shift;
|
||||
my $attrs = \@_;
|
||||
$attrs->[0] = '*' unless scalar @$attrs;
|
||||
my @attrs = (@_) ? @_ : ('*');
|
||||
|
||||
unless ( $dn ) {
|
||||
print "No dn provided.\n";
|
||||
|
|
@ -944,7 +943,7 @@ sub run_cat
|
|||
$s = $self->search({
|
||||
scope => 'one',
|
||||
vals => 1,
|
||||
attrs => $attrs
|
||||
attrs => \@attrs
|
||||
});
|
||||
}
|
||||
elsif ( $dn =~ /\*/ ) {
|
||||
|
|
@ -952,7 +951,7 @@ sub run_cat
|
|||
scope => 'one',
|
||||
vals => 1,
|
||||
filter => $dn,
|
||||
attrs => $attrs
|
||||
attrs => \@attrs
|
||||
});
|
||||
}
|
||||
else {
|
||||
|
|
@ -960,7 +959,7 @@ sub run_cat
|
|||
$s = $self->search({
|
||||
base => $dn,
|
||||
vals => 1,
|
||||
attrs => $attrs
|
||||
attrs => \@attrs
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue