Bugzilla – Attachment 3843 Details for
Bug 6143
New feature: capability to limit the RSS results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
capability to limit the RSS results
0001-Bug-6143-New-feature-capability-to-limit-the-RSS-res.patch (text/plain), 7.61 KB, created by
Alex Arnaud
on 2011-04-08 15:24:11 UTC
(
hide
)
Description:
capability to limit the RSS results
Filename:
MIME Type:
Creator:
Alex Arnaud
Created:
2011-04-08 15:24:11 UTC
Size:
7.61 KB
patch
obsolete
>From daf0eef3e42f27aa8d2957aabfa69d4477db706e Mon Sep 17 00:00:00 2001 >From: Alex Arnaud <alex.arnaud@biblibre.com> >Date: Fri, 8 Apr 2011 16:30:09 +0200 >Subject: [PATCH] Bug #6143 - New feature: capability to limit the RSS results > >--- > installer/data/mysql/en/mandatory/sysprefs.sql | 1 + > installer/data/mysql/updatedatabase.pl | 9 +++++++++ > .../prog/en/modules/admin/preferences/opac.pref | 4 ++++ > koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc | 2 +- > .../opac-tmpl/prog/en/modules/opac-results.tmpl | 1 - > kohaversion.pl | 2 +- > opac/opac-search.pl | 2 ++ > 7 files changed, 18 insertions(+), 3 deletions(-) > >diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql >index 3ce2c18..6cc1d7a 100755 >--- a/installer/data/mysql/en/mandatory/sysprefs.sql >+++ b/installer/data/mysql/en/mandatory/sysprefs.sql >@@ -308,4 +308,5 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('Display856uAsImage','OFF','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','OFF|Details|Results|Both','Choice'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsField','','The MARC field/subfield that contains alternate holdings information for bibs taht do not have items attached (e.g. 852abchi for libraries converting from MARC Magician).',NULL,'free'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free'); >+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 7f76078..03bfc58 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -4259,6 +4259,15 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = "XXX"; >+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { >+ $dbh->do(qq{ >+ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); >+ }); >+ print "Upgrade to $DBversion done (Adds New System preference numSearchRSSResults)\n"; >+ SetVersion($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 DropAllForeignKeys($table) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >index 83b6133..4403cb9 100755 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >@@ -251,6 +251,10 @@ OPAC: > yes: Allow > no: "Don't allow" > - patrons to place holds on items from the OPAC. >+ - >+ - pref: numSearchRSSResults >+ class: long >+ - Specify the maximum number of results to display on a RSS page of results. > Policy: > - > - pref: singleBranchMode >diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc >index df0b413..dd17d8f 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc >+++ b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc >@@ -176,7 +176,7 @@ > </div> > <div id="breadcrumbs" class="yui-g"> > <!-- TMPL_IF NAME="searchdesc" --><p><!-- TMPL_IF name="total" --><strong>“<!-- TMPL_VAR NAME="query_desc" ESCAPE="HTML"--> <!-- TMPL_VAR NAME="limit_desc" ESCAPE="HTML"-->” </strong>returned <!-- TMPL_VAR NAME="total" ESCAPE="HTML"--> results. <!-- TMPL_IF NAME="related" --> (related searches: <!-- TMPL_LOOP NAME="related" --><!-- TMPL_VAR NAME="related_search" --><!-- /TMPL_LOOP -->). <!-- /TMPL_IF --> >-<a href="<!-- TMPL_VAR NAME="OPACBaseURL" -->/cgi-bin/koha/opac-search.pl?<!-- TMPL_VAR name="query_cgi" ESCAPE="HTML" --><!-- TMPL_VAR NAME="limit_cgi" ESCAPE="HTML" --><!-- TMPL_IF NAME="sort_by" -->&sort_by=<!-- TMPL_VAR NAME="sort_by" ESCAPE="HTML" --><!-- /TMPL_IF -->&format=rss2"><img src="/opac-tmpl/prog/images/feed-icon-16x16.png" alt="Subscribe to this search" title="Subscribe to this search" border="0" /></a> >+<a href="<!-- TMPL_VAR NAME="OPACBaseURL" -->/cgi-bin/koha/opac-search.pl?<!-- TMPL_VAR name="query_cgi" ESCAPE="HTML" --><!-- TMPL_VAR NAME="limit_cgi" ESCAPE="HTML" -->&count=<!-- TMPL_VAR NAME="countrss" ESCAPE="HTML" -->&sort_by=acqdate_dsc&format=rss2"><img src="/opac-tmpl/prog/images/feed-icon-16x16.png" alt="Subscribe to this search" title="Subscribe to this search" border="0" /></a> > <!-- TMPL_ELSE --> > <strong>No Results Found!</strong> > <p> >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl >index 0904901..c94bebc 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tmpl >@@ -8,7 +8,6 @@ > <!-- TMPL_INCLUDE NAME="doc-head-close.inc" --> > <link rel="alternate" type="application/rss+xml" title="<!-- TMPL_VAR NAME="LibraryName" ESCAPE="HTML" --> Search RSS Feed" href="<!-- TMPL_VAR NAME="OPACBaseURL" -->/cgi-bin/koha/opac-search.pl?<!-- TMPL_VAR name="query_cgi" ESCAPE="HTML" --><!-- TMPL_VAR NAME="limit_cgi" ESCAPE="HTML" --><!-- TMPL_IF NAME="sort_by" -->&sort_by=<!-- TMPL_VAR NAME="sort_by" ESCAPE="HTML" --><!-- /TMPL_IF -->&format=rss2" /> > >- > <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.checkboxes.min.js"></script> > <!-- TMPL_IF NAME="OpacHighlightedWords" --><script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.highlight-3.js"></script> > <!-- /TMPL_IF --><script type="text/javascript"> >diff --git a/kohaversion.pl b/kohaversion.pl >index 6b33ee0..aa2eac2 100644 >--- a/kohaversion.pl >+++ b/kohaversion.pl >@@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts : > use strict; > > sub kohaversion { >- our $VERSION = '3.03.00.046'; >+ our $VERSION = 'XXX'; > # version needs to be set this way > # so that it can be picked up by Makefile.PL > # during install >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index 778c7ca..909a6e0 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -348,6 +348,7 @@ if ($params->{'limit-yr'}) { > # Params that can only have one value > my $scan = $params->{'scan'}; > my $count = C4::Context->preference('OPACnumSearchResults') || 20; >+my $countRSS = C4::Context->preference('numSearchRSSResults') || 50; > my $results_per_page = $params->{'count'} || $count; > my $offset = $params->{'offset'} || 0; > my $page = $cgi->param('page') || 1; >@@ -546,6 +547,7 @@ for (my $i=0;$i<@servers;$i++) { > $limit_cgi_not_availablity =~ s/&limit=available//g if defined $limit_cgi_not_availablity; > $template->param(limit_cgi_not_availablity => $limit_cgi_not_availablity); > $template->param(limit_cgi => $limit_cgi); >+ $template->param(countrss => $countRSS ); > $template->param(query_cgi => $query_cgi); > $template->param(query_desc => $query_desc); > $template->param(limit_desc => $limit_desc); >-- >1.6.3.3 >
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 6143
:
3841
|
3843
|
3863
|
4016