Bug 22739: Test SelfCheckInTimeout <> 0, not just defined
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 19 Apr 2019 12:28:35 +0000 (09:28 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 26 Apr 2019 15:11:56 +0000 (16:11 +0100)
commit1269f7d6c7712b3c9115824660d5f12933ba6462
tree4a7b33f74d57fecb96c765f0e100d639217c8d23
parent5acddea685c665463aa0ca755962734a75700ecb
Bug 22739: Test SelfCheckInTimeout <> 0, not just defined

On sci-main.pl the preference value is tested for 'defined'. This patch
tests it is different than empty string too. This was causing a
JavaScript syntax error, that made it display a wrong message.

To test:
1 - Blank the syspref SelfCheckInTimeout
2 - Attempt to checkin something via sci
=> FAIL: The 'Your request included no check-ins.' message is printed.
3 - Apply this patch, reload the sci-main.pl page
4 - Attempt to checkin something via sci
=> SUCCESS: The UI correctly stacks the scanned barcodes
5 - Sign off :-D

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c1949cda9b2847bc6ecf7e1dbc07990c4055b69a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
opac/sci/sci-main.pl