X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=authorities%2Fdetail.pl;h=64029615b51eaffd616530cbb8339fc401e47b2a;hb=4458ac5764126049d95e115adeacd1f335efdb8f;hp=4c964345204bd7ca821e54ba170899f29881e15a;hpb=be12aa96094ab003949c78e8246db56027931cac;p=koha_fer diff --git a/authorities/detail.pl b/authorities/detail.pl index 4c96434520..64029615b5 100755 --- a/authorities/detail.pl +++ b/authorities/detail.pl @@ -199,27 +199,8 @@ if (not defined $record) { } if (C4::Context->preference("AuthDisplayHierarchy")){ - my $trees=BuildUnimarcHierarchies($authid); - my @trees = split /;/,$trees ; - push @trees,$trees unless (@trees); - my @loophierarchies; - foreach my $tree (@trees){ - my @tree=split /,/,$tree; - push @tree,$tree unless (@tree); - my $cnt=0; - my @loophierarchy; - foreach my $element (@tree){ - my $elementdata = GetAuthority($element); - $record= $elementdata if ($authid==$element); - push @loophierarchy, BuildUnimarcHierarchy($elementdata,"child".$cnt, $authid); - $cnt++; - } - push @loophierarchies, { 'loopelement' =>\@loophierarchy}; - } - $template->param( - 'displayhierarchy' =>C4::Context->preference("AuthDisplayHierarchy"), - 'loophierarchies' =>\@loophierarchies, - ); + $template->{VARS}->{'displayhierarchy'} = C4::Context->preference("AuthDisplayHierarchy"); + $template->{VARS}->{'loophierarchies'} = GenerateHierarchy($authid); } my $count = CountUsage($authid);