NativeSQL Lists: Count statement did not use negoiated language
git-svn-id: https://svn.libreccm.org/ccm/trunk@5005 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
309d81be7b
commit
305feae36f
|
|
@ -44,7 +44,7 @@ public class SciProjectList extends AbstractComponent {
|
|||
+ "JOIN cms_pages ON cms_items.item_id = cms_pages.item_id "
|
||||
+ "JOIN content_types ON cms_items.type_id = content_types.type_id "
|
||||
+ "JOIN ct_sci_projects ON cms_items.item_id = ct_sci_projects.project_id "
|
||||
+ "WHERE parent_id IN (SELECT object_id FROM cat_object_category_map WHERE category_id = ?) AND version = 'live' %s";
|
||||
+ "WHERE parent_id IN (SELECT object_id FROM cat_object_category_map WHERE category_id = ?) AND language = ? AND version = 'live' %s";
|
||||
|
||||
private final PreparedStatement projectMembersQueryStatement;
|
||||
|
||||
|
|
@ -177,6 +177,9 @@ public class SciProjectList extends AbstractComponent {
|
|||
whereBuffer.toString()));
|
||||
|
||||
countProjectQueryStatement.setString(1, categoryId);
|
||||
countProjectQueryStatement.setString(2, GlobalizationHelper
|
||||
.getNegotiatedLocale()
|
||||
.toString());
|
||||
final ResultSet countResultSet = countProjectQueryStatement
|
||||
.executeQuery();
|
||||
final int count;
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ public class PublicationList extends AbstractComponent {
|
|||
+ "LEFT JOIN ct_unpublished ON ct_publications.publication_id = ct_unpublished.unpublished_id "
|
||||
+ "LEFT JOIN ct_grey_literature ON ct_unpublished.unpublished_id = ct_grey_literature.grey_literature_id "
|
||||
+ "%s"
|
||||
+ "WHERE parent_id IN (SELECT object_id FROM cat_object_category_map WHERE category_id = ?) AND version = 'live' %s";
|
||||
+ "WHERE parent_id IN (SELECT object_id FROM cat_object_category_map WHERE category_id = ?) AND language = ? AND version = 'live' %s";
|
||||
|
||||
/**
|
||||
* Prepared statement for fetching the available years of publication for
|
||||
|
|
@ -285,7 +285,7 @@ public class PublicationList extends AbstractComponent {
|
|||
final int page;
|
||||
final int offset;
|
||||
try {
|
||||
final String titleFilter = Globalization.decodeParameter(request,
|
||||
final String titleFilter = Globalization.decodeParameter(request,
|
||||
"title");
|
||||
// final String titleFilter = request.getParameter("title");
|
||||
final Integer yearFilter;
|
||||
|
|
@ -422,6 +422,9 @@ public class PublicationList extends AbstractComponent {
|
|||
whereBuffer.toString()));
|
||||
|
||||
countPublicationsQueryStatement.setString(1, categoryId);
|
||||
countPublicationsQueryStatement.setString(2, GlobalizationHelper
|
||||
.getNegotiatedLocale()
|
||||
.getLanguage());
|
||||
final ResultSet countResultSet = countPublicationsQueryStatement
|
||||
.executeQuery();
|
||||
final int count;
|
||||
|
|
|
|||
Loading…
Reference in New Issue