From a209174da65016cfa894be19b31a483c8fd71aa8 Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Wed, 22 Feb 2012 14:43:20 -0500 Subject: [PATCH] Revert "Bug 6875 de-nesting C4/Serials" This reverts commit e84d5a7b37ebf4b47e01da3c504bbabe031c37e1. -Unstable code --- C4/Serials.pm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index 060dffc922..6be9f187a8 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -23,7 +23,13 @@ use warnings; use C4::Dates qw(format_date format_date_in_iso); use Date::Calc qw(:all); use POSIX qw(strftime); +use C4::Suggestions; +use C4::Koha; use C4::Biblio; +use C4::Branch; +use C4::Items; +use C4::Search; +use C4::Letters; use C4::Log; # logaction use C4::Debug; @@ -411,6 +417,7 @@ sub PrepareSerialsData { $subs->{$datefield} = format_date( $subs->{$datefield} ); } } + $subs->{'branchname'} = GetBranchName( $subs->{'branchcode'} ); $subs->{ "status" . $subs->{'status'} } = 1; $subs->{"checked"} = $subs->{'status'} =~ /1|3|4|7/; @@ -1323,8 +1330,8 @@ sub ReNewSubscription { my $biblio = $sth->fetchrow_hashref; if ( C4::Context->preference("RenewSerialAddsSuggestion") ) { - require C4::Suggestions; - C4::Suggestions::NewSuggestion( + + NewSuggestion( { 'suggestedby' => $user, 'title' => $subscription->{bibliotitle}, 'author' => $biblio->{author}, @@ -1541,8 +1548,7 @@ sub ItemizeSerials { $marcrecord->insert_fields_ordered($newField); } } - require C4::Items; - C4::Items::AddItemFromMarc( $marcrecord, $data->{'biblionumber'} ); + AddItemFromMarc( $marcrecord, $data->{'biblionumber'} ); return 1; } return ( 0, @errors ); -- 2.39.5