Bug 6379: Fix if the reviewer is not the same patron
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 10 Jul 2015 10:56:14 +0000 (11:56 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 5 Oct 2015 15:27:44 +0000 (12:27 -0300)
get_approval_rows does a left join on tags_approval.approved_by =
borrowers.borrowernumber

This means it cannot return the approval tags for a given patron.

Note that this patch could be time-consuming if there is a lot of tags
in the DB.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
opac/opac-tags.pl

index 19994d1..4f97896 100755 (executable)
@@ -227,7 +227,7 @@ my $my_tags = [];
 
 if ($loggedinuser) {
     $my_tags = get_tag_rows({borrowernumber=>$loggedinuser});
-    my $my_approved_tags = get_approval_rows({borrowernumber => $loggedinuser, approved => 1});
+    my $my_approved_tags = get_approval_rows({ approved => 1 });
     foreach my $tag (@$my_tags) {
         my $biblio = GetBiblioData($tag->{biblionumber});
         my $record = &GetMarcBiblio( $tag->{biblionumber} );