searchOn was not running
This commit is contained in:
parent
7d4a491af3
commit
a9d4ed04bb
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user