Bugzilla – Attachment 25732 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]
Bug 11369 - General searchid in browser.js
Bug-11369---General-searchid-in-browserjs.patch (text/plain), 2.59 KB, created by
Kyle M Hall (khall)
on 2014-02-28 16:46:34 UTC
(
hide
)
Description:
Bug 11369 - General searchid in browser.js
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-02-28 16:46:34 UTC
Size:
2.59 KB
patch
obsolete
>From 3989ae1a1f032a4e58700e88f12985260f2c1df8 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] Bug 11369 - General searchid in browser.js > >The search browser fearture 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> >--- > 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 a484743..e3018b3 100755 >--- a/catalogue/search.pl >+++ b/catalogue/search.pl >@@ -675,14 +675,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.7.2.5
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