diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-05-07 04:55:23 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2015-05-07 04:55:23 +0300 |
commit | 12868d4bd0277305583b15c0c1c078437bb49056 (patch) | |
tree | 1e34d7e59968526425c3314a7a6ef0966aa90e71 /plugins/Contents | |
parent | c6ed2a5a74fd1fa8aeec23b6f4c81666a8647c8b (diff) |
refs #7821 do not instantiate reports directly
Diffstat (limited to 'plugins/Contents')
-rw-r--r-- | plugins/Contents/Controller.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/Contents/Controller.php b/plugins/Contents/Controller.php index 5785ba478c..a17ec3fdce 100644 --- a/plugins/Contents/Controller.php +++ b/plugins/Contents/Controller.php @@ -9,8 +9,6 @@ namespace Piwik\Plugins\Contents; use Piwik\Plugin\Report; -use Piwik\Plugins\Contents\Reports\GetContentNames; -use Piwik\Plugins\Contents\Reports\GetContentPieces; use Piwik\View; class Controller extends \Piwik\Plugin\Controller @@ -21,7 +19,9 @@ class Controller extends \Piwik\Plugin\Controller $reportsView = new View\ReportsByDimension('Contents'); /** @var \Piwik\Plugin\Report[] $reports */ - $reports = array(new GetContentNames(), new GetContentPieces()); + $contentNames = Report::factory($this->pluginName, 'getContentNames'); + $contentPieces = Report::factory($this->pluginName, 'getContentPieces'); + $reports = array($contentNames, $contentPieces); foreach($reports as $report) { $reportsView->addReport( @@ -36,14 +36,14 @@ class Controller extends \Piwik\Plugin\Controller public function menuGetContentNames() { - $report = new GetContentNames(); + $report = Report::factory($this->pluginName, 'getContentNames'); return View::singleReport($report->getName(), $report->render()); } public function menuGetContentPieces() { - $report = new GetContentPieces(); + $report = Report::factory($this->pluginName, 'getContentPieces'); return View::singleReport($report->getName(), $report->render()); } |