Bugzilla – Attachment 56912 Details for
Bug 17397
Show name of librarian who created circulation message
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17397: Simplify code passing the Koha::Object to the template
Bug-17397-Simplify-code-passing-the-KohaObject-to-.patch (text/plain), 3.21 KB, created by
Jonathan Druart
on 2016-10-27 07:44:07 UTC
(
hide
)
Description:
Bug 17397: Simplify code passing the Koha::Object to the template
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-10-27 07:44:07 UTC
Size:
3.21 KB
patch
obsolete
>From 3a07482336fb7be395ce83b414c90731b9454cb4 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 27 Oct 2016 09:33:10 +0200 >Subject: [PATCH] Bug 17397: Simplify code passing the Koha::Object to the > template > >Instead of creating a new array > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > circ/circulation.pl | 20 ++------------------ > .../prog/en/modules/circ/circulation.tt | 2 +- > 2 files changed, 3 insertions(+), 19 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index c5492eb..dd630d7 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -564,7 +564,7 @@ if ( $borrowernumber && $borrower->{'category_type'} eq 'C') { > $template->param( 'catcode' => $patron_categories->next ) if $patron_categories->count == 1; > } > >-my $all_messages = Koha::Patron::Messages->search( >+my $messages = Koha::Patron::Messages->search( > { > 'me.borrowernumber' => $borrowernumber, > }, >@@ -575,22 +575,6 @@ my $all_messages = Koha::Patron::Messages->search( > } > ); > >-my @messages; >-while ( my $content = $all_messages->next ) { >- my $this_item; >- >- $this_item->{borrowernumber} = $content->borrowernumber; >- $this_item->{message_id} = $content->message_id; >- $this_item->{branchcode} = $content->branchcode; >- $this_item->{message_type} = $content->message_type; >- $this_item->{message_date} = $content->message_date; >- $this_item->{message} = $content->message; >- $this_item->{manager_id} = $content->manager_id; >- $this_item->{name} = $content->_result->get_column('manager_firstname') . ' ' . $content->_result->get_column('manager_surname'); >- >- push @messages, $this_item; >-} >- > my $fast_cataloging = 0; > if (defined getframeworkinfo('FA')) { > $fast_cataloging = 1 >@@ -639,7 +623,7 @@ if ($restoreduedatespec || $stickyduedate) { > } > > $template->param( >- messages => \@messages, >+ messages => $messages, > borrower => $borrower, > borrowernumber => $borrowernumber, > categoryname => $borrower->{'description'}, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 7c65ad0..78c52a0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -859,7 +859,7 @@ No patron matched <span class="ex">[% message | html %]</span> > [% END %]> > [% message.message_date | $KohaDates %] > [% Branches.GetName( message.branchcode ) %] >- ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% message.manager_id %]">[% message.name %]</a> ) >+ ( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% message.manager_id %]">[% message.get_column('manager_firstname') %] [% message.get_column('manager_surname') %]</a> ) > <i>"[% message.message %]"</i> > </span> > [% IF message.branchcode == branch OR Koha.Preference('AllowAllMessageDeletion') %] >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17397
:
56026
|
56044
|
56045
|
56046
|
56503
|
56911
| 56912 |
56913