BUGFIX Filtering out subclasses of Virtualpage in PagesDueForReviewReport (AIR-65)

This commit is contained in:
Ingo Schommer 2011-09-12 14:02:36 +02:00
parent 0cdef3d88d
commit b32da03dfc

View File

@ -110,13 +110,16 @@ class PagesDueForReviewReport extends SS_Report {
// Show virtual pages?
if(empty($params['ShowVirtualPages'])) {
$wheres[] = '"SiteTree"."ClassName" != \'VirtualPage\' AND "SiteTree"."ClassName" != \'SubsitesVirtualPage\'';
$virtualPageClasses = ClassInfo::subclassesFor('VirtualPage');
$wheres[] = sprintf(
'"SiteTree"."ClassName" NOT IN (\'%s\')',
implode("','", array_values($virtualPageClasses))
);
}
// We use different dropdown depending on the subsite
$ownerIdParam = 'OwnerID';
// Owner dropdown
if(!empty($params[$ownerIdParam])) {
$ownerID = (int)$params[$ownerIdParam];