Bug 15758: [QA Follow-up] Some corrections related to GetBranchName
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 26 Aug 2016 07:02:04 +0000 (09:02 +0200)
committerKyle M Hall <kyle@bywatersolutions.com>
Thu, 8 Sep 2016 14:36:05 +0000 (14:36 +0000)
commit0079ca7c72403059ca89f564cd6814c6dfb4312a
tree176b17483bffaf8878a1a631e699f7ac2fbd0ca3
parentf435d83c0c5283f49cf4089b17c298860e6168ac
Bug 15758: [QA Follow-up] Some corrections related to GetBranchName

[1] Acquisition.pm
The lines filling $row in GetBasketGroupAsCSV may have side-effects when
the library name is not found. This change restores former behavior. Just
theoretically more safe.
Note that it also contained a typo: $row->{deliveryplace} should have been
$row->{$place}.

[2] Auth.pm
checkauth: $branchname = Koha::Libraries->find($branchcode)->branchname;
Should normally be fine, but I rather have an empty string here than
crashing on "Can't call method branchname on undefined value".
Same for sub check_api_auth.
Note that this holds for a larger number of calls, but I am adding a check
here because it is checkauth.
Also removed a duplicate use Koha::Libraries-statement.

[3] Search.pm
Also removed a duplicate use statement for Libraries.

[4] svc/holds
Added an (explicit) use statement for Koha::Libraries.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/Acquisition.pm
C4/Auth.pm
C4/Search.pm
svc/holds