Bugzilla – Attachment 26504 Details for
Bug 11369
Too many search cursor cookies overflow HTTP-header size, when making multiple searches in the staff client.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 11369 - General searchid in browser.js
PASSED-QA-Bug-11369---General-searchid-in-browserj.patch (text/plain), 2.95 KB, created by
Katrin Fischer
on 2014-03-21 07:35:00 UTC
(
hide
)
Description:
[PASSED QA] Bug 11369 - General searchid in browser.js
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-03-21 07:35:00 UTC
Size:
2.95 KB
patch
obsolete
>From 552617f8fc0982968eec9f2ae918f54b640bab6c Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Wed, 26 Feb 2014 17:14:04 +0100 >Subject: [PATCH] [PASSED QA] Bug 11369 - General searchid in browser.js > >The search browser feature uses nearly only the browser.js file. >That is why I propose to move the searchid generation from search.pl >to browser.js. >We then use Date.getTime() to use current timestamp as searchid, >prefixed by 'scs_' like before. > >Test by using test plan of main patch : >Too many search cursor cookies overflow HTTP-header size, when >making multiple searches in the staff client > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Passes tests and QA script. >Tested the browse functionality in staff by using the different >options (back to results, next, previous, etc) and the batch >modifications for items. An old cookie can cause a Javascript error, >but after restarting the browser/deleting cookies it all works >correctly. >--- > catalogue/search.pl | 9 +-------- > koha-tmpl/intranet-tmpl/js/browser.js | 13 ++++++++----- > 2 files changed, 9 insertions(+), 13 deletions(-) > >diff --git a/catalogue/search.pl b/catalogue/search.pl >index bf1ddc2..b85e880 100755 >--- a/catalogue/search.pl >+++ b/catalogue/search.pl >@@ -678,14 +678,7 @@ for (my $i=0;$i<@servers;$i++) { > } #/end of the for loop > #$template->param(FEDERATED_RESULTS => \@results_array); > >-if ($cgi->param('searchid')) { >- $template->{'VARS'}->{'searchid'} = $cgi->param('searchid'); >-} >-else { >- my $dt = DateTime->now(time_zone => 'local'); >- #We are generating a clean numeric datetime representation so we can easily compare them using the default javascript lexigraphic sorter. >- $template->{'VARS'}->{'searchid'} = 'scs_'.$dt->ymd('').$dt->hms(''); #scs == Staff Client >-} >+$template->{'VARS'}->{'searchid'} = $cgi->param('searchid'); > > my $gotonumber = $cgi->param('gotoNumber'); > if ($gotonumber eq 'last' || $gotonumber eq 'first') { >diff --git a/koha-tmpl/intranet-tmpl/js/browser.js b/koha-tmpl/intranet-tmpl/js/browser.js >index 4ebc29c..b56ff9f 100644 >--- a/koha-tmpl/intranet-tmpl/js/browser.js >+++ b/koha-tmpl/intranet-tmpl/js/browser.js >@@ -2,13 +2,16 @@ if ( KOHA === undefined ) var KOHA = {}; > > KOHA.browser = function (searchid, biblionumber) { > var me = this; >+ >+ if (!searchid) { >+ // We are generating a clean numeric datetime representation so we can easily compare them using the default javascript lexigraphic sorter. >+ searchid = 'scs_' + (new Date()).getTime(); // scs for Staff Client Search >+ } > this.searchid = searchid; > >- if (me.searchid) { >- var cookie = $.cookie(me.searchid) >- if (cookie) { >- me.searchCookie = JSON.parse(cookie); >- } >+ var cookie = $.cookie(me.searchid) >+ if (cookie) { >+ me.searchCookie = JSON.parse(cookie); > } > > var browseRecords = function (movement) { >-- >1.8.3.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 11369
:
23389
|
23390
|
25662
|
25663
|
25667
|
25669
|
25729
|
25730
|
25731
|
25732
|
26501
|
26502
|
26503
| 26504