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
Make it possible to disable Flatten feature for a given report #11529
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Left a couple naming comments
CHANGELOG.md
Outdated
@@ -8,6 +8,7 @@ The Product Changelog at **[piwik.org/changelog](http://piwik.org/changelog)** l | |||
|
|||
### Breaking Changes | |||
* New config setting `enable_plugin_upload` lets you enable uploading and installing a Piwik plugin ZIP file by a Super User. This used to be enabled by default, but it is now disabled by default now for security reasons. | |||
* New property `Report::$supportsFlattening` lets you define if a report supports flattening (d)efaults to `true`). If set to `false` it will also set `ViewDataTable\Config::$show_flatten_table` to `false` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indicate what "property" refers to. something like New Report class property
or so
core/Plugin/Report.php
Outdated
* @var bool | ||
* @api | ||
*/ | ||
protected $supportsFlattening = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to supportsFlatten
core/Plugin/Report.php
Outdated
* @return bool | ||
* @ignore | ||
*/ | ||
public function supportsFlattening() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to supportsFlatten
👍 |
Currently datatables are automatically flattened if the
flat
parameter is given in the request. This cannot be prevented.It is now possible to set for a report if it supports flattening or not. This will also automatically be set to the view, so it's not required to set if for report and view as well.
This PR also disables the flattening for the referrer type report, as it doesn't work for that report.
fixes #11323