Bug 21702: Make mancredit.pl use the patron id for the staff user
authorTomas Cohen Arazi <tomascohen@theke.io>
Sat, 27 Oct 2018 12:11:33 +0000 (09:11 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Wed, 31 Oct 2018 13:15:01 +0000 (13:15 +0000)
commit466e29263910c85ce6417f322dc505558eeaa8a3
treeca599295ad2c92ff0918940fa3f1878a3c3c85fa
parente1b73ad7cb970a52a6191aa5c73b7491db537327
Bug 21702: Make mancredit.pl use the patron id for the staff user

I think unsafe SQL modes and the fact that manager_id has no FK allowed this to go unnoticed. But now we catch it!

To test:
- On a patron, try adding a new manual credit of any type
=> FAIL: It fails telling the userid of the logged user is not a valid integer!
- Apply this patch
- Try adding a manual credit of any type
=> SUCCESS: Manual credit added!
- Sign off!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
members/mancredit.pl