Skip to content

Commit

Permalink
Merge pull request #199 from creative-commoners/pulls/6/ss-list-combine
Browse files Browse the repository at this point in the history
API Check is instance of SS_List
  • Loading branch information
GuySartorelli authored Oct 30, 2024
2 parents b105bdf + 6f20def commit aea32d8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions code/Report.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
use SilverStripe\ORM\CMSPreviewable;
use SilverStripe\ORM\DataList;
use SilverStripe\ORM\DataQuery;
use SilverStripe\Model\List\Limitable;
use SilverStripe\Model\List\SS_List;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;
Expand Down Expand Up @@ -239,7 +238,7 @@ public function getCount($params = array(), $limit = null)
}
// 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.
if ($sourceRecords instanceof Limitable) {
if ($sourceRecords instanceof SS_List) {
$sourceRecords = $sourceRecords->limit($limit);
}
return $sourceRecords->count();
Expand Down

0 comments on commit aea32d8

Please sign in to comment.