Koha/C4/SIP/example_institution_dump.sh
Joe Atzberger 3f54fb1961 Bug 2968 - SIP ACS_STATUS message (98) misreported config.
The *_ok methods in ILS.pm were targeting the wrong depth.
This also resolves a longstanding FIXME on to_bool() warning like:
    Argument "\x{66}\x{61}..." isn't numeric in numeric ne (!=) at /ILS.pm line 94.

The example_institution_dump.sh essentially provides the proof test case for this patch.
Run it before/after on SIPconfig.xml where "MAIN" has checkout="true" and checkin="true".

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-02-26 14:57:22 -06:00

16 lines
554 B
Bash
Executable file

#!/bin/bash
perl -I ./ -e '
use Data::Dumper;
use ILS;
use Sip::Configuration;
my $code = "MAIN";
my $conf = Sip::Configuration->new("SIPconfig.xml");
my $ils = ILS->new($conf->{institutions}->{$code});
print "XML for $code: ", Dumper($conf->{institutions}->{$code}), "\n";
print "ILS for $code: ", Dumper($ils), "\n";
print "\$ils->checkout_ok(): ", ($ils->checkout_ok() ? "Y" : "N"), "\n";
print "\$ils->checkin_ok() : ", ($ils->checkin_ok() ? "Y" : "N"), "\n";
print "\$ils->offline_ok() : ", ($ils->offline_ok() ? "Y" : "N"), "\n";
print "\n";
'