]> git.koha-community.org Git - koha.git/commit
Bug 20763: AllowPurchaseSuggestionBranchChoice triggers error opac-suggestions.pl...
authorKyle M Hall <kyle@bywatetsolutions.com>
Mon, 14 May 2018 12:45:00 +0000 (08:45 -0400)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 7 Jun 2018 07:15:44 +0000 (09:15 +0200)
commit7a6d958bf3cec338adf239a7e69dd6168ab1cdfb
treeca7bf6fde6877bdeba8b612d800b57ebd06ee149
parent3083e0f29462868caf97c841eb73ce3d8ca361ad
Bug 20763: AllowPurchaseSuggestionBranchChoice triggers error opac-suggestions.pl is visited without logging in

Some code executed in the script opac-suggestions.pl if the system preference AllowPurchaseSuggestionBranchChoice is enabled assumes there is a logged in user. If there is not, patrons will see the error "Internal Server Error".

Test Plan:
1) Enable AllowPurchaseSuggestionBranchChoice
2) Enable AnonSuggestions
3) In the OPAC, perform a search that will have no results,
   click the "Make a purchase suggestion" link.
4) Note the error
5) Apply this patch
6) Reload the page
7) The page should load now!

Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e3cc49a61b13ff863262da6a397eb49a3045b14a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
opac/opac-suggestions.pl