Bug 6162 Fix passing of borrower details to reading history
authorColin Campbell <colin.campbell@ptfs-europe.com>
Tue, 12 Apr 2011 10:40:57 +0000 (11:40 +0100)
committerChris Cormack <chrisc@catalyst.net.nz>
Thu, 14 Apr 2011 03:01:17 +0000 (15:01 +1200)
script was passing borr details incorrectly and in a fix was
then passing them in a one element array
unnecessary complication tends to go wrong sooner or later

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt
opac/opac-readingrecord.pl

index 2734fde..05b50dd 100644 (file)
@@ -1,4 +1,4 @@
-[% INCLUDE 'doc-head-open.inc' %][% DEFAULT LibraryNameTitle="Koha Online" %] Catalog &rsaquo;  Account for [% FOREACH BORROWER_INF IN BORROWER_INFO %][% BORROWER_INF.firstname %] [% BORROWER_INF.surname %][% END %]
+[% INCLUDE 'doc-head-open.inc' %][% DEFAULT LibraryNameTitle="Koha Online" %] Catalog &rsaquo;  Account for [% firstname %] [% surname %]
 [% INCLUDE 'doc-head-close.inc' %]
 <style type="text/css">ul.ui-tabs-nav li a, ul.ui-tabs-nav li span.a  { padding:0.6em 1em; }</style>
 <script type="text/javascript">
@@ -22,7 +22,7 @@ $(document).ready(function(){
        <div class="yui-b"><div class="yui-g">
 <div id="userreadingrecord" class="container">
 <!--CONTENT-->
-<h3><a href="/cgi-bin/koha/opac-user.pl">[% FOREACH BORROWER_INF IN BORROWER_INFO %][% BORROWER_INF.firstname %] [% BORROWER_INF.surname %][% END %]'s account</a> <img src="[% themelang %]../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Checkout History</h3>
+<h3><a href="/cgi-bin/koha/opac-user.pl">[% firstname %] [% surname %]'s account</a> <img src="[% themelang %]../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Checkout History</h3>
 
 [% UNLESS ( count ) %]
 You have never borrowed anything from this library.
index c9d5819..00a91db 100755 (executable)
@@ -45,7 +45,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
 # get borrower information ....
 my ( $borr ) = GetMemberDetails( $borrowernumber );
 
-$template->param($borr);
+$template->param(%{$borr});
 
 my $itemtypes = GetItemTypes();
 
@@ -74,9 +74,6 @@ else {
 
 my ( $issues ) = GetAllIssues( $borrowernumber, $order, $limit );
 
-my @bordat;
-$bordat[0] = $borr;
-$template->param( BORROWER_INFO => \@bordat );
 
 my @loop_reading;