Bugzilla – Attachment 5422 Details for
Bug 5981
OPAC: Add limits to search history
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0001-bug-5981-Add-limits-to-search-history.patch (text/plain), 2.19 KB, created by
Alex Arnaud
on 2011-09-14 08:38:09 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Alex Arnaud
Created:
2011-09-14 08:38:09 UTC
Size:
2.19 KB
patch
obsolete
>From cb7a7444dc101a09e36f3f56044a9e954064d8c9 Mon Sep 17 00:00:00 2001 >From: Alex Arnaud <alex.arnaud@biblibre.com> >Date: Wed, 14 Sep 2011 10:35:46 +0200 >Subject: [PATCH] bug 5981 - Add limits to search history > >--- > installer/data/mysql/kohastructure.sql | 2 +- > installer/data/mysql/updatedatabase.pl | 7 +++++++ > opac/opac-search.pl | 6 ++++++ > 3 files changed, 14 insertions(+), 1 deletions(-) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index aef59ce..367551e 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1640,7 +1640,7 @@ CREATE TABLE IF NOT EXISTS `search_history` ( > `userid` int(11) NOT NULL, > `sessionid` varchar(32) NOT NULL, > `query_desc` varchar(255) NOT NULL, >- `query_cgi` varchar(255) NOT NULL, >+ `query_cgi` text NOT NULL, > `total` int(11) NOT NULL, > `time` timestamp NOT NULL default CURRENT_TIMESTAMP, > KEY `userid` (`userid`), >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 6b88c29..6aa3c55 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -4446,6 +4446,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > SetVersion($DBversion); > } > >+$DBversion = "3.05.00.xxx"; >+if (C4::Context->preference("Version") < TransformToNum($DBversion)) { >+ $dbh->do("ALTER TABLE search_history MODIFY COLUMN query_cgi text NOT NULL"); >+ print "Upgrade to $DBversion done (Change search_history.query_cgi type to text. bug 9581)\n"; >+ SetVersion($DBversion); >+} >+ > > =head1 FUNCTIONS > >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index dfe4d74..cab5270 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -509,6 +509,12 @@ for (my $i=0;$i<@servers;$i++) { > } > > # Adding the new search if needed >+ my $path_info = $cgi->url(-path_info=>1); >+ $query_cgi = $cgi->url(-query=>1); >+ $query_cgi =~ s/^$path_info\?//; >+ $query_cgi =~ s/;/&/g; >+ $query_desc .= ", $limit_desc"; >+ > if (!$borrowernumber || $borrowernumber eq '') { > # To a cookie (the user is not logged in) > >-- >1.7.0.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 5981
:
3485
|
3657
|
4798
|
4860
|
5277
|
5422
|
5659
|
10087
|
10316
|
10632