From 2d87d17e7470dc73b21d7bec7f5b3151e3cc33c0 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Thu, 11 Feb 2021 16:27:54 +0100 Subject: [PATCH] Bug 27683: Impact on catalogue/detail.pl Since EasyAnalyticalRecords pref is now in GetAnalyticsCount, remove test in catalogue/detail.pl. Test plan : 1) Build an item and a linked analytical record with 773$0 and $9 2) Go to record detail page 3) Enable EasyAnalyticalRecords 4) You see analytics tab and analytical count on item 5) Disable EasyAnalyticalRecords 6) You dont see analytics tab --- catalogue/detail.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index bc28f29cc1..d21fe9a6ca 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -373,7 +373,7 @@ foreach my $item (@items) { if ( $analyze ) { # count if item is used in analytical bibliorecords # The 'countanalytics' flag is only used in the templates if analyze is set - my $countanalytics = C4::Context->preference('EasyAnalyticalRecords') ? GetAnalyticsCount($item->{itemnumber}) : 0; + my $countanalytics = GetAnalyticsCount( $item->{itemnumber} ); if ($countanalytics > 0){ $analytics_flag=1; $item->{countanalytics} = $countanalytics; -- 2.33.1