Bug 29387: Stringify exceptions for other background job modules
[koha-ffzg.git] / catalogue / detail.pl
index 5caffef..bc28f29 100755 (executable)
@@ -201,7 +201,7 @@ my $show_analytics;
 if ( $showcomp eq 'both' || $showcomp eq 'staff' ) {
     if ( my $components = $biblio->get_marc_components(C4::Context->preference('MaxComponentRecords')) ) {
         $show_analytics = 1 if @{$components}; # just show link when having results
-        $template->param( analytics_error => 1 ) if @{$biblio->messages};
+        $template->param( analytics_error => 1 ) if grep { $_->message eq 'component_search' } @{$biblio->messages};
         my $parts;
         for my $part ( @{$components} ) {
             $part = C4::Search::new_record_from_zebra( 'biblioserver', $part );
@@ -222,7 +222,7 @@ if ( $showcomp eq 'both' || $showcomp eq 'staff' ) {
     }
 } else { # check if we should show analytics anyway
     $show_analytics = 1 if @{$biblio->get_marc_components(1)}; # count matters here, results does not
-    $template->param( analytics_error => 1 ) if @{$biblio->messages};
+    $template->param( analytics_error => 1 ) if grep { $_->message eq 'component_search' } @{$biblio->messages};
 }
 
 # XSLT processing of some stuff
@@ -434,14 +434,14 @@ my $some_private_shelves = Koha::Virtualshelves->get_some_shelves(
     {
         borrowernumber => $borrowernumber,
         add_allowed    => 1,
-        category       => 1,
+        public         => 0,
     }
 );
 my $some_public_shelves = Koha::Virtualshelves->get_some_shelves(
     {
         borrowernumber => $borrowernumber,
         add_allowed    => 1,
-        category       => 2,
+        public         => 1,
     }
 );
 
@@ -521,7 +521,7 @@ if (C4::Context->preference("virtualshelves") ) {
     my $shelves = Koha::Virtualshelves->search(
         {
             biblionumber => $biblionumber,
-            category => 2,
+            public => 1,
         },
         {
             join => 'virtualshelfcontents',