Bug 17189: Add the ability to define several memcached namespaces - tests
[koha.git] / mainpage.pl
index d0635cb..f4efc65 100755 (executable)
@@ -28,8 +28,8 @@ use C4::NewsChannels; # GetNewsToDisplay
 use C4::Review qw/numberofreviews/;
 use C4::Suggestions qw/CountSuggestion/;
 use C4::Tags qw/get_count_by_tag_status/;
-use Koha::Borrower::Modifications;
-use Koha::Borrower::Discharge;
+use Koha::Patron::Modifications;
+use Koha::Patron::Discharge;
 
 my $query = new CGI;
 
@@ -56,7 +56,8 @@ $template->param(
 );
 
 my $branch =
-  C4::Context->preference("IndependentBranchesPatronModifications")
+  (      C4::Context->preference("IndependentBranchesPatronModifications")
+      || C4::Context->preference("IndependentBranches") )
   && !$flags->{'superlibrarian'}
   ? C4::Context->userenv()->{'branch'}
   : undef;
@@ -64,9 +65,8 @@ my $branch =
 my $pendingcomments    = numberofreviews(0);
 my $pendingtags        = get_count_by_tag_status(0);
 my $pendingsuggestions = CountSuggestion("ASKED");
-my $pending_borrower_modifications =
-  Koha::Borrower::Modifications->GetPendingModificationsCount( $branch );
-my $pending_discharge_requests = Koha::Borrower::Discharge::count({ pending => 1 });
+my $pending_borrower_modifications = Koha::Patron::Modifications->pending_count( $branch );
+my $pending_discharge_requests = Koha::Patron::Discharge::count({ pending => 1 });
 
 $template->param(
     pendingcomments                => $pendingcomments,