[Koha-patches] [PATCH] Minor SIP cleanup, conditionalize warnings.
Joe Atzberger
joe.atzberger at liblime.com
Wed Aug 27 16:44:28 CEST 2008
---
C4/SIP/ILS.pm | 4 ++--
C4/SIP/ILS/Item.pm | 4 ++--
C4/SIP/example_institution_dump.sh | 3 +++
3 files changed, 7 insertions(+), 4 deletions(-)
create mode 100755 C4/SIP/example_institution_dump.sh
diff --git a/C4/SIP/ILS.pm b/C4/SIP/ILS.pm
index 14e36ba..15de403 100644
--- a/C4/SIP/ILS.pm
+++ b/C4/SIP/ILS.pm
@@ -146,7 +146,7 @@ sub checkout {
} else {
$circ->do_checkout();
if ($circ->ok){
- warn "circ is ok";
+ $debug and warn "circ is ok";
# If the item is already associated with this patron, then
# we're renewing it.
$circ->renew_ok($item->{patron} && ($item->{patron} eq $patron_id));
@@ -160,7 +160,7 @@ sub checkout {
$patron_id, join(', ', @{$patron->{items}}));
}
else {
- syslog("LOG_DEBUG", "ILS::Checkout Issue failed");
+ syslog("LOG_ERR", "ILS::Checkout Issue failed");
}
}
# END TRANSACTION
diff --git a/C4/SIP/ILS/Item.pm b/C4/SIP/ILS/Item.pm
index 2f4acef..04b7e41 100644
--- a/C4/SIP/ILS/Item.pm
+++ b/C4/SIP/ILS/Item.pm
@@ -82,7 +82,7 @@ sub new {
$item->{patron} = $borrower->{'cardnumber'};
my @reserves = (@{ GetReservesFromBiblionumber($item->{biblionumber}) });
$item->{hold_queue} = [ sort priority_sort @reserves ];
- $item->{joetest} = 111;
+ # $item->{joetest} = 111;
$self = $item;
bless $self, $type;
@@ -209,7 +209,7 @@ sub print_line {
sub available {
my ($self, $for_patron) = @_;
my $count = (defined $self->{hold_queue}) ? scalar @{$self->{hold_queue}} : 0;
- print STDERR "availability check: hold_queue size $count\n";
+ $debug and print STDERR "availability check: hold_queue size $count\n";
if (defined($self->{patron_id})) {
($self->{patron_id} eq $for_patron) or return 0;
return ($count ? 0 : 1);
diff --git a/C4/SIP/example_institution_dump.sh b/C4/SIP/example_institution_dump.sh
new file mode 100755
index 0000000..3aa32f3
--- /dev/null
+++ b/C4/SIP/example_institution_dump.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+perl -I ./ -e 'use Data::Dumper; use ILS; use Sip::Configuration; $conf=Sip::Configuration->new("SIPconfig.xml"); print Dumper($conf->{institutions}->{"MAIN"}),"\n";'
--
1.5.5.GIT
More information about the Koha-patches
mailing list