diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-06-18 09:13:42 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-06-18 09:14:14 +0400 |
commit | 79ec9d19368dbe49b4dbb34bb4762784962b3652 (patch) | |
tree | 0a2e6d648bd9767cb0c458ca4cc6f3f9adb3c503 /core/Plugin/ViewDataTable.php | |
parent | c6f7e78c537921bda68b51c993ada8a220f896c1 (diff) |
this is epic... by rendering the reports this way we can remove a lot of duplicated, unneeded code while having backwards compatible urls, developers are still able to completely overwrite the reports controller action, we fix some issues where CoreHome.renderWidget was reported in dispatch events instead of the actual module/action -> fixes also some security issues and most saved params for reports work again. Hope it works as expected
Diffstat (limited to 'core/Plugin/ViewDataTable.php')
-rw-r--r-- | core/Plugin/ViewDataTable.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/core/Plugin/ViewDataTable.php b/core/Plugin/ViewDataTable.php index 2a14ff4cfe..6084074b3b 100644 --- a/core/Plugin/ViewDataTable.php +++ b/core/Plugin/ViewDataTable.php @@ -194,14 +194,16 @@ abstract class ViewDataTable implements ViewInterface $report = Report::factory($this->requestConfig->getApiModuleToRequest(), $this->requestConfig->getApiMethodToRequest()); if (!empty($report)) { - $this->config->subtable_controller_action = 'renderWidget'; + $subtable = $report->getActionToLoadSubTables(); + if (!empty($subtable)) { + $this->config->subtable_controller_action = $subtable; + } + $relatedReports = $report->getRelatedReports(); if (!empty($relatedReports)) { foreach ($relatedReports as $relatedReport) { - $params = array('reportModule' => $relatedReport->getModule(), 'reportAction' => $relatedReport->getAction()); - $this->config->addRelatedReport('CoreHome.renderWidget', - $relatedReport->getName(), - $params); + $this->config->addRelatedReport($relatedReport->getModule() . '.' . $relatedReport->getAction(), + $relatedReport->getName()); } } |