Skip to content

Commit d8f1f07

Browse files
obfromeviseboo
authored andcommitted
LUT-27606 : fix the feature of selecting the number of tickets to display
1 parent 031c1ac commit d8f1f07

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/java/fr/paris/lutece/plugins/blog/web/portlet/BlogListPortletJspBean.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ public String getSearch( HttpServletRequest request )
307307
Map<String, Object> data = new HashMap<>( );
308308
String strButtonSearch = request.getParameter( PARAMETER_BUTTON_SEARCH );
309309
String strButtonReset = request.getParameter( PARAMETER_BUTTON_RESET );
310+
_nItemsPerPage = AbstractPaginator.getItemsPerPage( request, AbstractPaginator.PARAMETER_ITEMS_PER_PAGE, _nItemsPerPage, _nDefaultItemsPerPage);
310311
setSearchBlog( request, strButtonSearch, strButtonReset );
311312

312313
List<Integer> listBlogsId = filterBlogIds( request );
@@ -321,9 +322,9 @@ public String getSearch( HttpServletRequest request )
321322
LocalizedPaginator<Integer> paginator = new LocalizedPaginator<>( listBlogsId, _nItemsPerPage, getCurrentUrlFromRequest( request ),
322323
AbstractPaginator.PARAMETER_PAGE_INDEX, _strCurrentPageIndex, getLocale( ) );
323324

324-
for ( Integer documentId : paginator.getPageItems( ) )
325+
for ( Integer nBlogId : paginator.getPageItems( ) )
325326
{
326-
Blog blog = BlogService.getInstance( ).findByPrimaryKeyWithoutBinaries( documentId );
327+
Blog blog = BlogService.getInstance( ).findByPrimaryKeyWithoutBinaries( nBlogId );
327328
if ( blog != null )
328329
{
329330
listBlogNotPublished.add( new BlogSerializable( blog.getId( ), blog.getContentLabel( ) ) );

0 commit comments

Comments
 (0)