diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-06-30 08:56:29 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-06-30 08:56:29 +0400 |
commit | d9616e4779404be4c05aa5444f67bcfba465676e (patch) | |
tree | 05edf38cd9d60cc48550c7c8c7a21a30654f0c7e /core/Plugin/ViewDataTable.php | |
parent | 92386da2eb650205809aa9263bcf68207232a4ac (diff) |
in case we render a widget, reuse the widget title for related report
Diffstat (limited to 'core/Plugin/ViewDataTable.php')
-rw-r--r-- | core/Plugin/ViewDataTable.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/core/Plugin/ViewDataTable.php b/core/Plugin/ViewDataTable.php index 6084074b3b..6d1aa8e7f2 100644 --- a/core/Plugin/ViewDataTable.php +++ b/core/Plugin/ViewDataTable.php @@ -202,8 +202,16 @@ abstract class ViewDataTable implements ViewInterface $relatedReports = $report->getRelatedReports(); if (!empty($relatedReports)) { foreach ($relatedReports as $relatedReport) { + $widgetTitle = $relatedReport->getWidgetTitle(); + + if ($widgetTitle && Common::getRequestVar('widget', 0, 'int')) { + $relatedReportName = $widgetTitle; + } else { + $relatedReportName = $relatedReport->getName(); + } + $this->config->addRelatedReport($relatedReport->getModule() . '.' . $relatedReport->getAction(), - $relatedReport->getName()); + $relatedReportName); } } |