Bugzilla – Attachment 128972 Details for
Bug 29043
Items are processed but not displayed on request.pl before a patron is selected
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29043: Prune dead code
Bug-29043-Prune-dead-code.patch (text/plain), 10.51 KB, created by
Nick Clemens (kidclamp)
on 2022-01-03 15:45:30 UTC
(
hide
)
Description:
Bug 29043: Prune dead code
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-01-03 15:45:30 UTC
Size:
10.51 KB
patch
obsolete
>From 71934f27544792e007bc9cbde6be1dca7110067d Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 17 Nov 2021 14:17:30 +0000 >Subject: [PATCH] Bug 29043: Prune dead code > >Remove sort_borrowerlist as it was not used >Remove "time" for form name > I don't see nay reason we needed this >Remove messagetransfert from template > Never passed in code >Remove totalcount variable > Assigned and never referenced >Remove 'alreadyres'/'alreadyreserved' from template > All references in coide were in template - never set or passed > >Signed-off-by: Samu Heiskanen <samu.heiskanen@hypernova.fi> >--- > .../prog/en/modules/reserve/request.tt | 54 +++---------------- > reserve/request.pl | 19 +------ > 2 files changed, 7 insertions(+), 66 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index 442c4895eb..45de55a42f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -105,17 +105,6 @@ > </div> > [% END %] > >- [% IF ( messagetransfert ) %] >- <div class="dialog message"> >- <h2>Hold found for ([% nextreservtitle | html %]), please transfer</h2> >- <p>Hold placed by : <strong> [% nextreservsurname | html %] [% nextreservfirstname | html %]</strong> at : <strong> [% branchname | html %] </strong>, Please transfer this item. >- </p> >- <form name="cancelReservewithtransfert" action="branchreserves.pl" method="post"> >- <input type="submit" class="button" /> >- </form> >- </div> >- [% END %] >- > [% UNLESS ( multi_hold ) %] > <h1>Place a hold on [% INCLUDE 'biblio-title.inc' link = 1 %]</h1> > [% ELSE %] >@@ -325,30 +314,16 @@ > [% IF ( biblioloo.checked_previously ) %] > <span>Patron has previously checked out this title</span><br/> > [% END %] >- [% IF ( biblioloo.alreadyres ) %] >+ [% IF ( biblioloo.none_avail || biblioloo.noitems ) %] > <ul> >- [% ELSE %] >- [% IF ( biblioloo.none_avail || biblioloo.noitems ) %] >- <ul> >- [% END %] > [% END %] > >- [% IF ( biblioloo.alreadyres ) %] >- <li> >- <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a> >- <strong>already has a hold</strong> on this item >- </li> >- [% END %] > [% IF ( biblioloo.none_avail || biblioloo.noitems ) %] > <li> <strong>No items are available</strong> to be placed on hold</li> > [% END %] > >- [% IF ( biblioloo.alreadyres ) %] >+ [% IF ( biblioloo.none_avail || biblioloo.noitems ) %] > </ul> >- [% ELSE %] >- [% IF ( biblioloo.none_avail || biblioloo.noitems ) %] >- </ul> >- [% END %] > [% END %] > </td> > </tr> >@@ -367,7 +342,7 @@ > </div> > [% END %] > >- [% IF ( no_reserves_allowed || exceeded_maxreserves || exceeded_holds_per_record || alreadyreserved || none_available || alreadypossession || ageRestricted ) %] >+ [% IF ( no_reserves_allowed || exceeded_maxreserves || exceeded_holds_per_record || none_available || alreadypossession || ageRestricted ) %] > <div class="dialog alert"> > > [% UNLESS ( multi_hold ) %] >@@ -381,8 +356,6 @@ > <li><strong>Too many holds for this record: </strong> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %] </a> can only place a maximum of [% max_holds_for_record | html %] hold(s) on this record.</li> > [% ELSIF ( alreadypossession ) %] > <li> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a> <strong>is already in possession</strong> of one item.</li> >- [% ELSIF ( alreadyreserved ) %] >- <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a> <strong>already has a hold</strong> on this item.</li> > [% ELSIF ( ageRestricted ) %] > <li><strong>Age restricted</strong></li> > [% ELSIF ( none_available ) %] >@@ -539,7 +512,6 @@ > <input type="checkbox" id="requestany" name="request" checked="checked" value="Any" /> > [% END %] > <input type="hidden" name="biblioitem" value="[% biblioitemnumber | html %]" /> >- <input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" /> > </li> > > [% IF remaining_holds_for_record > 1 %] >@@ -838,30 +810,16 @@ > [% IF ( biblioloo.checked_previously ) %] > <span>Patron has previously checked out this title</span><br/> > [% END %] >- [% IF ( biblioloo.alreadyres ) %] >+ [% IF ( biblioloo.none_avail || biblioloo.noitems ) %] > <ul> >- [% ELSE %] >- [% IF ( biblioloo.none_avail || biblioloo.noitems ) %] >- <ul> >- [% END %] > [% END %] > >- [% IF ( biblioloo.alreadyres ) %] >- <li> >- <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a> >- <strong>already has a hold</strong> on this item >- </li> >- [% END %] > [% IF ( biblioloo.none_avail || biblioloo.noitems ) %] > <li> <strong>No items are available</strong> to be placed on hold</li> > [% END %] > >- [% IF ( biblioloo.alreadyres ) %] >+ [% IF ( biblioloo.none_avail || biblioloo.noitems ) %] > </ul> >- [% ELSE %] >- [% IF ( biblioloo.none_avail || biblioloo.noitems ) %] >- </ul> >- [% END %] > [% END %] > </td> > <td> >@@ -905,7 +863,7 @@ > > [% UNLESS ( patron ) %] > [% IF ( reserveloop ) %] >- <form id="existing_holds" name="T[% time | html %]" action="modrequest.pl" method="post" style="display:block"> >+ <form id="existing_holds" name="form_existing_holds" action="modrequest.pl" method="post" style="display:block"> > [% IF ( multi_hold ) %] > <input type = "hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> > [% END %] >diff --git a/reserve/request.pl b/reserve/request.pl >index 6deb045cfc..364f53edef 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -322,7 +322,6 @@ foreach my $biblionumber (@biblionumbers) { > } > > my $count = Koha::Holds->search( { biblionumber => $biblionumber } )->count(); >- my $totalcount = $count; > > # adding a fixed value for priority options > my $fixedRank = $count+1; >@@ -348,13 +347,7 @@ foreach my $biblionumber (@biblionumbers) { > $biblioloopiter{title} = $biblio->title; > $biblioloopiter{rank} = $fixedRank; > >- # get the time for the form name... >- my $time = time(); >- >- $template->param( >- time => $time, >- fixedRank => $fixedRank, >- ); >+ $template->param( fixedRank => $fixedRank ); > > unless( $patron ){ > >@@ -776,13 +769,3 @@ $template->param( > > # printout the page > output_html_with_http_headers $input, $cookie, $template->output; >- >-sub sort_borrowerlist { >- my $borrowerslist = shift; >- my $ref = []; >- push @{$ref}, sort { >- uc( $a->{surname} . $a->{firstname} ) cmp >- uc( $b->{surname} . $b->{firstname} ) >- } @{$borrowerslist}; >- return $ref; >-} >-- >2.30.2
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 29043
:
124941
|
125060
|
127731
|
127732
|
128254
|
128309
|
128336
|
128337
|
128338
|
128339
|
128340
|
128421
|
128422
|
128423
|
128474
|
128475
|
128476
|
128971
|
128972
|
128973
|
129200
|
129498
|
129530
|
129531
|
129820
|
129821
|
129915
|
129916
|
129949
|
129950