[Koha-bugs] [Bug 30825] Get rid of GetReservesControlBranch

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed May 25 11:29:52 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30825

--- Comment #13 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
(In reply to Tomás Cohen Arazi from comment #12)
> (In reply to Martin Renvoize from comment #11)
> > Created attachment 135281 [details] [review] [review]
> > Bug 30825: Pass by reference
> > 
> > Not sure if this is nicer or not honestly. This changes the signature of
> > hols_control_library to accept a hashref of patron_id and patron object
> > reference. If the patron_object reference is found to be undefined and
> > our syspref requires it we populate the reference with a Koha::Patron
> > object as found from the patron_id.
> 
> I have the feeling this particular case would do better with just the
> patron_id. If we have it, good. If we have it via a Koha::Patron object,
> then $patron->id would be pretty clear to read.

That goes the other way and introduces extra DB fetches....  I'd say we either
go for passing Patron objects and ensure the caller always has that.. or we
pass references so we can delay fetching.. I wouldn't go back and just pass
ID's personally.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list