Browse Source

bug 2505: turn on warnings in seven modules

C4::XSLT
C4::VirtualShelves
C4::Review
C4::Output
C4::Boolean
C4::Charset
C4::Stats

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
3.2.x
Galen Charlton 15 years ago
parent
commit
a244ff6671
  1. 2
      C4/Boolean.pm
  2. 2
      C4/Charset.pm
  3. 1
      C4/Output.pm
  4. 2
      C4/Review.pm
  5. 2
      C4/Stats.pm
  6. 2
      C4/VirtualShelves.pm
  7. 18
      C4/XSLT.pm

2
C4/Boolean.pm

@ -22,6 +22,8 @@ package C4::Boolean;
# Suite 330, Boston, MA 02111-1307 USA
use strict;
use warnings;
use POSIX;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);

2
C4/Charset.pm

@ -18,6 +18,8 @@ package C4::Charset;
# Suite 330, Boston, MA 02111-1307 USA
use strict;
use warnings;
use MARC::Charset qw/marc8_to_utf8/;
use Text::Iconv;

1
C4/Output.pm

@ -26,6 +26,7 @@ package C4::Output;
# templates.
use strict;
use warnings;
use C4::Context;
use C4::Languages qw(getTranslatedLanguages get_bidi regex_lang_subtags language_get_description accept_language );

2
C4/Review.pm

@ -18,6 +18,8 @@ package C4::Review;
# Suite 330, Boston, MA 02111-1307 USA
use strict;
use warnings;
use C4::Context;
use vars qw($VERSION @ISA @EXPORT);

2
C4/Stats.pm

@ -19,7 +19,7 @@ package C4::Stats;
# Suite 330, Boston, MA 02111-1307 USA
use strict;
#use warnings; # FIXME
use warnings;
require Exporter;
use C4::Context;
use C4::Debug;

2
C4/VirtualShelves.pm

@ -22,6 +22,8 @@ package C4::VirtualShelves;
# Suite 330, Boston, MA 02111-1307 USA
use strict;
use warnings;
use Carp;
use C4::Context;
use C4::Circulation;

18
C4/XSLT.pm

@ -17,6 +17,9 @@ package C4::XSLT;
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
use strict;
use warnings;
use C4::Context;
use C4::Branch;
use C4::Items;
@ -27,8 +30,6 @@ use Encode;
use XML::LibXML;
use XML::LibXSLT;
use strict;
use vars qw($VERSION @ISA @EXPORT);
BEGIN {
@ -147,15 +148,14 @@ sub buildKohaItemsNamespace {
my @items = C4::Items::GetItemsInfo($biblionumber);
my $branches = GetBranches();
my $itemtypes = GetItemTypes();
my $xml;
my $xml = '';
for my $item (@items) {
my $status;
my ( $transfertwhen, $transfertfrom, $transfertto ) = C4::Circulation::GetTransfers($item->{itemnumber});
if ( $itemtypes->{ $item->{itype} }->{notforloan} == 1 || $item->{notforloan} || $item->{onloan} || $item->{wthdrawn} || $item->{itemlost} || $item->{damaged} ||
($transfertwhen ne '') || $item->{itemnotforloan} ) {
if ( $itemtypes->{ $item->{itype} }->{notforloan} || $item->{notforloan} || $item->{onloan} || $item->{wthdrawn} || $item->{itemlost} || $item->{damaged} ||
(defined $transfertwhen && $transfertwhen ne '') || $item->{itemnotforloan} ) {
if ( $item->{notforloan} < 0) {
$status = "On order";
}
@ -174,7 +174,7 @@ sub buildKohaItemsNamespace {
if ($item->{damaged}) {
$status = "Damaged";
}
if ($transfertwhen ne '') {
if (defined $transfertwhen && $transfertwhen ne '') {
$status = 'In transit';
}
} else {
@ -183,7 +183,9 @@ sub buildKohaItemsNamespace {
my $homebranch = $branches->{$item->{homebranch}}->{'branchname'};
$xml.= "<item><homebranch>$homebranch</homebranch>".
"<status>$status</status>".
"<itemcallnumber>".$item->{'itemcallnumber'}."</itemcallnumber></item>";
(defined $item->{'itemcallnumber'} ? "<itemcallnumber>".$item->{'itemcallnumber'}."</itemcallnumber>"
: "<itemcallnumber />")
. "</item>";
}
$xml = "<items xmlns=\"http://www.koha.org/items\">".$xml."</items>";

Loading…
Cancel
Save