Commit a9d4ed04 authored by Yadd's avatar Yadd
Browse files

searchOn was not running

parent 7d4a491a
......@@ -17,18 +17,21 @@ BEGIN {
sub Apache::Session::searchOn {
my ( $class, $args, $selectField, $value, @fields ) = @_;
my %res = ();
$class->get_key_from_all_sessions($args,sub{
my $entry = shift;
my $id = shift;
return undef unless($entry->{selectField}eq $value);
if (@fields) {
$res{ $id }->{$_} = $entry->{$_} foreach (@fields);
$class->get_key_from_all_sessions(
$args,
sub {
my $entry = shift;
my $id = shift;
return undef unless ( $entry->{$selectField} eq $value );
if (@fields) {
$res{$id}->{$_} = $entry->{$_} foreach (@fields);
}
else {
$res{$id} = $entry;
}
undef;
}
else {
$res{ $id } = $entry;
}
undef;
});
);
return \%res;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment