#19525: Fixing pager when Offset is defined in Projections

Work Item: Mirza

--HG--
branch : 1.x
This commit is contained in:
Mirza 2013-07-08 18:07:47 -07:00
parent 4a3fd1a75d
commit ea5fc5f13e

View File

@ -122,7 +122,8 @@ namespace Orchard.Projections.Drivers {
// create pager shape
if (part.Record.DisplayPager) {
var contentItemsCount = _projectionManager.GetCount(query.Id);
var contentItemsCount = _projectionManager.GetCount(query.Id) - part.Record.Skip;
contentItemsCount = Math.Max(0, contentItemsCount);
pagerShape.TotalItemCount(contentItemsCount);
}