Bugzilla – Attachment 156939 Details for
Bug 29523
Add a way to prevent embedding objects that should not be allowed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29523: Add Koha::Objects->search_limited stub method
Bug-29523-Add-KohaObjects-searchlimited-stub-metho.patch (text/plain), 1.35 KB, created by
Martin Renvoize (ashimema)
on 2023-10-12 10:52:23 UTC
(
hide
)
Description:
Bug 29523: Add Koha::Objects->search_limited stub method
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-10-12 10:52:23 UTC
Size:
1.35 KB
patch
obsolete
>From c8c39a083b09a184b316284bc8ef45227e2c9989 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 19 Nov 2021 09:37:38 -0300 >Subject: [PATCH] Bug 29523: Add Koha::Objects->search_limited stub method > >This method is just a passthru to the search method. It is defined here >to avoid the need to check if each class implements it. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Objects.pm | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > >diff --git a/Koha/Objects.pm b/Koha/Objects.pm >index dc3d044bd3c..706ddba69ed 100644 >--- a/Koha/Objects.pm >+++ b/Koha/Objects.pm >@@ -142,6 +142,21 @@ sub search { > return $class->_new_from_dbic($rs); > } > >+=head3 search_limited >+ >+ my $rs = $self->search_limited >+ >+Generic method that is just a pass through for I<search>. It is expected to be overloaded >+locally on classes. It's main purpose is to avoid the need to check if the class implements >+the method locally. >+ >+=cut >+ >+sub search_limited { >+ my ( $self, $params, $attributes ) = @_; >+ return $self->search( $params, $attributes ); >+} >+ > =head3 search_related > > my $objects = Koha::Objects->search_related( $rel_name, $cond?, \%attrs? ); >-- >2.41.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29523
:
127886
|
127887
|
127888
|
127889
|
127991
|
127992
|
127993
|
127994
|
128042
|
128043
|
128044
|
128045
|
128046
|
128047
|
128048
|
128688
|
128689
|
128690
|
128691
|
128692
|
128693
|
128694
|
131326
|
131331
|
131332
|
136684
|
136685
|
136686
|
136687
|
136688
|
136689
|
136690
|
136691
|
136692
|
136706
|
136714
|
148736
|
148737
|
148738
|
148739
|
148740
|
148741
|
148742
|
148743
|
148744
|
148745
|
150989
|
150990
|
150991
|
150992
|
150993
|
150994
|
150995
|
150996
|
150997
|
150998
|
156939
|
156940
|
156941
|
156942
|
156943
|
156944
|
156945
|
156946
|
156947
|
156948
|
156949
|
156965
|
157049
|
157071
|
157072
|
157073
|
157074
|
157075
|
157076
|
157077
|
157078
|
157079
|
157080
|
157081
|
157406
|
157407
|
157408
|
157409
|
157410
|
157411
|
157412
|
157413
|
157414
|
157415
|
157416
|
157673
|
157679
|
157683
|
157799
|
157881
|
157882
|
157883
|
157884
|
157885
|
157886
|
157887
|
157888
|
157889
|
157890
|
157891
|
157892
|
157893
|
158013