mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-19 10:07:55 +08:00
Really fixing the search pager to note lose the last page
--HG-- branch : dev
This commit is contained in:
@@ -27,7 +27,7 @@ namespace Orchard.Search.Controllers {
|
||||
var results = _searchService.Query(q);
|
||||
|
||||
searchViewModel.Count = results.Count();
|
||||
searchViewModel.TotalPageCount = (int)Math.Round((decimal)searchViewModel.Count/searchViewModel.PageSize);
|
||||
searchViewModel.TotalPageCount = (int)Math.Ceiling((decimal)searchViewModel.Count/searchViewModel.PageSize);
|
||||
//todo: deal with page requests beyond result count
|
||||
searchViewModel.ResultsPage = results
|
||||
.Select(result => new SearchResultViewModel {
|
||||
|
Reference in New Issue
Block a user