mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Merge c791bbadd0
into 61ecdb74e7
This commit is contained in:
commit
01b245ea10
@ -25,7 +25,6 @@ use SilverStripe\Model\List\ArrayList;
|
|||||||
use SilverStripe\ORM\CMSPreviewable;
|
use SilverStripe\ORM\CMSPreviewable;
|
||||||
use SilverStripe\ORM\DataList;
|
use SilverStripe\ORM\DataList;
|
||||||
use SilverStripe\ORM\DataQuery;
|
use SilverStripe\ORM\DataQuery;
|
||||||
use SilverStripe\Model\List\Limitable;
|
|
||||||
use SilverStripe\Model\List\SS_List;
|
use SilverStripe\Model\List\SS_List;
|
||||||
use SilverStripe\Security\Member;
|
use SilverStripe\Security\Member;
|
||||||
use SilverStripe\Security\Permission;
|
use SilverStripe\Security\Permission;
|
||||||
@ -239,7 +238,7 @@ class Report extends ModelData
|
|||||||
}
|
}
|
||||||
// Some reports may not use the $limit parameter in sourceRecords since it isn't actually
|
// Some reports may not use the $limit parameter in sourceRecords since it isn't actually
|
||||||
// used anywhere else - so make sure we limit record counts if possible.
|
// used anywhere else - so make sure we limit record counts if possible.
|
||||||
if ($sourceRecords instanceof Limitable) {
|
if ($sourceRecords instanceof SS_List) {
|
||||||
$sourceRecords = $sourceRecords->limit($limit);
|
$sourceRecords = $sourceRecords->limit($limit);
|
||||||
}
|
}
|
||||||
return $sourceRecords->count();
|
return $sourceRecords->count();
|
||||||
|
Loading…
Reference in New Issue
Block a user