use splice() to have a clean code in methods

This commit is contained in:
Sandro Cazzaniga 2012-09-21 07:56:47 +00:00
parent 9dee0a698d
commit f023778623

View File

@ -415,11 +415,7 @@ sub ldap {
# @param attributes to get from found groups (array ref)
# @return string groups separated with multiValuesSeparator
sub searchGroups {
my $self = shift;
my $base = shift;
my $key = shift;
my $value = shift;
my $attributes = shift;
my ($self, $base, $key, $value, $attributes) = splice @_;
my $portal = $self->{portal};
my $groups;
@ -502,9 +498,7 @@ sub searchGroups {
# @param attribute Attribute name
# @return string value
sub getLdapValue {
my $self = shift;
my $entry = shift;
my $attribute = shift;
my ($self, $entry, $attribute) = splice @_;
return $entry->dn() if ( $attribute eq "dn" );