Bugzilla – Attachment 65502 Details for
Bug 18633
Logs are full of CGI::param called in list context - itemsearch.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18633: Remove useless use of CGI TT plugin [16.11.x]
Bug-18633-Remove-useless-use-of-CGI-TT-plugin-1611.patch (text/plain), 7.00 KB, created by
Mark Tompsett
on 2017-08-04 14:33:46 UTC
(
hide
)
Description:
Bug 18633: Remove useless use of CGI TT plugin [16.11.x]
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2017-08-04 14:33:46 UTC
Size:
7.00 KB
patch
obsolete
>From e71c4fe06e07b7996e8c8bad331c1c1b3ae5a14e Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Wed, 28 Jun 2017 13:05:42 -0400 >Subject: [PATCH] Bug 18633: Remove useless use of CGI TT plugin [16.11.x] >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >The form is sent using AJAX so there is never a query string in >the URL (no POST parameters either) > >Tested both patches together, item search behaves as before, log >entries are gone >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../prog/en/modules/catalogue/itemsearch.tt | 87 ++++------------------ > 1 file changed, 13 insertions(+), 74 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >index 9c02f6a..9b951ce 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >@@ -1,4 +1,3 @@ >-[% USE CGI %] > [% USE JSON.Escape %] > > [% BLOCK form_label %] >@@ -34,57 +33,29 @@ > <label class="form-field-label" for="[% name %]">[% INCLUDE form_label label=name %]</label> > <select id="[% name %]_op" name="[% name %]_op"> > <option value="=">is</option> >- [% IF CGI.param(name _ '_op') == '!=' %] >- <option value="!=" selected="selected">is not</option> >- [% ELSE %] >- <option value="!=" >is not</option> >- [% END %] >+ <option value="!=" >is not</option> > </select> >- [% SET values = CGI.param(name) %] > <select id="[% name %]" name="[% name %]" multiple="multiple" size="[% options.size < 4 ? options.size + 1 : 4 %]"> >- [% IF (values == '') %] >- <option value="" selected="selected"> >- [% ELSE %] >- <option value=""> >- [% END %] >+ <option value="" selected="selected"> > [% IF (empty_option) %][% INCLUDE form_label label=empty_option %][% ELSE %]<span>All</span>[% END %] > </option> > [% FOREACH option IN options %] >- [% IF values != '' && values.grep(option.value).size %] >- <option value="[% option.value %]" selected="selected">[% option.label %]</option> >- [% ELSE %] >- <option value="[% option.value %]">[% option.label %]</option> >- [% END %] >+ <option value="[% option.value %]">[% option.label %]</option> > [% END %] > </select> > </div> > [% END %] > > [% BLOCK form_field_select_option %] >- [% IF params.f == value %] >- <option value="[% value %]" selected="selected">[% INCLUDE form_label label=value %]</option> >- [% ELSE %] >- <option value="[% value %]">[% INCLUDE form_label label=value %]</option> >- [% END %] >+ <option value="[% value %]">[% INCLUDE form_label label=value %]</option> > [% END %] > > [% BLOCK form_field_select_text %] > <div class="form-field form-field-select-text"> >- [% IF params.exists('c') %] >- <select name="c" class="form-field-conjunction"> >- <option value="and">AND</option> >- [% IF params.c == 'or' %] >- <option value="or" selected="selected">OR</option> >- [% ELSE %] >- <option value="or">OR</option> >- [% END %] >- </select> >- [% ELSE %] >- <select name="c" class="form-field-conjunction" disabled="disabled"> >- <option value="and">AND</option> >- <option value="or">OR</option> >- </select> >- [% END %] >+ <select name="c" class="form-field-conjunction" disabled="disabled"> >+ <option value="and">AND</option> >+ <option value="or">OR</option> >+ </select> > <select name="f" class="form-field-column"> > [% INCLUDE form_field_select_option value='barcode' %] > [% INCLUDE form_field_select_option value='itemcallnumber' %] >@@ -103,46 +74,16 @@ > [% IF field.tagsubfield %] > [% marcfield = marcfield _ '$' _ field.tagsubfield %] > [% END %] >- [% IF params.f == "marc:$marcfield" %] >- <option value="marc:[% marcfield %]" data-authorised-values-category="[% field.authorised_values_category %]" selected="selected">[% field.label %] ([% marcfield %])</option> >- [% ELSE %] >- <option value="marc:[% marcfield %]" data-authorised-values-category="[% field.authorised_values_category %]">[% field.label %] ([% marcfield %])</option> >- [% END %] >+ <option value="marc:[% marcfield %]" data-authorised-values-category="[% field.authorised_values_category %]">[% field.label %] ([% marcfield %])</option> > [% END %] > </optgroup> > [% END %] > </select> >- <input type="text" name="q" class="form-field-value" value="[% params.q %]" /> >+ <input type="text" name="q" class="form-field-value" value="" /> > <input type="hidden" name="op" value="like" /> > </div> > [% END %] > >-[% BLOCK form_field_select_text_block %] >- [% c = CGI.param('c').list %] >- [% f = CGI.param('f').list %] >- [% q = CGI.param('q').list %] >- [% op = CGI.param('op').list %] >- [% IF q.size %] >- [% size = q.size - 1 %] >- [% FOREACH i IN [0 .. size] %] >- [% >- params = { >- f => f.$i >- q = q.$i >- op = op.$i >- } >- %] >- [% IF i > 0 %] >- [% j = i - 1 %] >- [% params.c = c.$j %] >- [% END %] >- [% INCLUDE form_field_select_text params=params %] >- [% END %] >- [% ELSE %] >- [% INCLUDE form_field_select_text %] >- [% END %] >-[% END %] >- > [% BLOCK form_field_radio_yes_no %] > <div class="form-field"> > <label class="form-field-label">[% INCLUDE form_label label=name %]:</label> >@@ -423,7 +364,7 @@ > [% END %] > </fieldset> > <fieldset> >- [% INCLUDE form_field_select_text_block %] >+ [% INCLUDE form_field_select_text %] > <p class="hint">You can use the following wildcard characters: % _</p> > <p class="hint">% matches any number of characters</p> > <p class="hint">_ matches only a single character</p> >@@ -431,14 +372,12 @@ > <fieldset> > <div class="form-field"> > <label class="form-field-label" for="itemcallnumber_from">From call number:</label> >- [% value = CGI.param('itemcallnumber_from') %] >- <input type="text" id="itemcallnumber_from" name="itemcallnumber_from" value="[% value %]" /> >+ <input type="text" id="itemcallnumber_from" name="itemcallnumber_from" value="" /> > <span class="hint">(inclusive)</span> > </div> > <div class="form-field"> >- [% value = CGI.param('itemcallnumber_to') %] > <label class="form-field-label" for="itemcallnumber_to">To call number:</label> >- <input type="text" id="itemcallnumber_to" name="itemcallnumber_to" value="[% value %]" /> >+ <input type="text" id="itemcallnumber_to" name="itemcallnumber_to" value="" /> > <span class="hint">(inclusive)</span> > </div> > [% INCLUDE form_field_radio_yes_no name="damaged" %] >-- >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 18633
:
64123
|
64193
|
64709
|
64710
|
64721
|
64722
|
64900
|
64901
| 65502 |
65503