Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #12928 (Report documentation looks a bit odd when there is no docs for a report) #22739

Open
wants to merge 4 commits into
base: 5.x-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions core/Plugin/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -466,15 +466,18 @@ protected function getLastUnitGraphAcrossPlugins(
}

if (property_exists($view->config, 'selectable_columns')) {
$view->config->selectable_columns = array_merge($view->config->selectable_columns ? : array(), $selectableColumns);
$view->config->selectable_columns = array_merge($view->config->selectable_columns ?: array(), $selectableColumns);
}

$view->config->translations += $translations;

if ($reportDocumentation) {
$view->config->documentation = $reportDocumentation;
// Add fallback for missing documentation
if (empty($reportDocumentation)) {
$reportDocumentation = Piwik::translate('General_NoDocumentationAvailable');
michalkleiner marked this conversation as resolved.
Show resolved Hide resolved
}

$view->config->documentation = $reportDocumentation;

return $view;
}

Expand Down
1 change: 1 addition & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@
"No": "No",
"NoDataForGraph": "No data for this graph.",
"NoDataForTagCloud": "No data for this tag cloud.",
"NoDocumentationAvailable": "No documentation available for this report.",
"NotDefined": "%s not defined",
"NotInstalled": "Not Installed",
"NotPossibleWithoutHttps": "Attention: Doing this without having set up a SSL certificate for using HTTPS will break Matomo.",
Expand Down