Merge remote-tracking branch 'origin/new/bug_929'
[koha.git] / members / readingrec.pl
index 04414e3..c4a8237 100755 (executable)
@@ -96,7 +96,14 @@ if (! $limit){
 
 my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
 $template->param( picture => 1 ) if $picture;
-my $attributes = GetBorrowerAttributes($borrowernumber);
+
+if (C4::Context->preference('ExtendedPatronAttributes')) {
+    my $attributes = GetBorrowerAttributes($borrowernumber);
+    $template->param(
+        ExtendedPatronAttributes => 1,
+        extendedattributes => $attributes
+    );
+}
 
 $template->param(
                                                readingrecordview => 1,
@@ -104,6 +111,7 @@ $template->param(
                                                title => $data->{'title'},
                                                initials => $data->{'initials'},
                                                surname => $data->{'surname'},
+                                               othernames => $data->{'othernames'},
                                                borrowernumber => $borrowernumber,
                                                limit => $limit,
                                                firstname => $data->{'firstname'},
@@ -125,7 +133,7 @@ $template->param(
                                                branchname => GetBranchName($data->{'branchcode'}),
                                                showfulllink => (scalar @loop_reading > 50),                                    
                                                loop_reading => \@loop_reading,
-                                           extendedattributes => $attributes,
+                                               activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''),
 );
 output_html_with_http_headers $input, $cookie, $template->output;