diff --git a/code/CMSMain.php b/code/CMSMain.php index 5c1ac4f3..58f7c7b5 100755 --- a/code/CMSMain.php +++ b/code/CMSMain.php @@ -672,7 +672,7 @@ JS; $options[""] = _t('CMSMain.CHOOSEREPORT',"(Choose a report)"); foreach($reports as $report) { - if($report != 'SideReport') $options[$report] = singleton($report)->title(); + if($report != 'SideReport' && singleton($report)->canView()) $options[$report] = singleton($report)->title(); } return new DropdownField("ReportSelector", _t('CMSMain.REPORT', 'Report'),$options); } @@ -681,7 +681,7 @@ JS; $forms = array(); foreach($reports as $report) { - if ($report != 'SideReport') { + if ($report != 'SideReport' && singleton($report)->canView()) { if ($fieldset = singleton($report)->getParameterFields()) { $formHtml = ''; foreach($fieldset as $field) { diff --git a/code/SideReport.php b/code/SideReport.php index 65fe66a2..81d8cd5c 100755 --- a/code/SideReport.php +++ b/code/SideReport.php @@ -76,6 +76,10 @@ abstract class SideReport extends Object { function getParameterFields() { return false; } + + function canView() { + return true; + } } /**