@@ -, +, @@ --- Koha/Objects.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) --- a/Koha/Objects.pm +++ a/Koha/Objects.pm @@ -130,6 +130,17 @@ sub search { } } +sub search_all_unblessed { + my ( $self, $params, $attributes ) = @_; + + my $newattr = $attributes? { (%$attributes) }: {}; + $attributes->{result_class} = 'DBIx::Class::ResultClass::HashRefInflator'; + my @results = $self->_resultset()->search($params, $attributes); + @results == 1 && !($results[0]) && return; + + \@results; +} + =head3 Koha::Objects->count(); my @objects = Koha::Objects->count($params); --