diff options
author | diosmosis <benaka@piwik.pro> | 2014-09-19 22:07:18 +0400 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2014-09-19 22:07:18 +0400 |
commit | a318e24f45d158e907085912bf9815d30ec3680e (patch) | |
tree | 84a7c000e70c49546e8a31f76e643df2352a227b /core/DataTable/Filter/PivotByDimension.php | |
parent | 3d9043017c759ed3777b5368dbcbf0bcf873f9a1 (diff) |
Refs #6078, allow default column limit to be specified through INI config.
Diffstat (limited to 'core/DataTable/Filter/PivotByDimension.php')
-rw-r--r-- | core/DataTable/Filter/PivotByDimension.php | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/core/DataTable/Filter/PivotByDimension.php b/core/DataTable/Filter/PivotByDimension.php index 867e3ec04b..902c03f1b5 100644 --- a/core/DataTable/Filter/PivotByDimension.php +++ b/core/DataTable/Filter/PivotByDimension.php @@ -55,8 +55,6 @@ use Piwik\Plugin\Segment; */ class PivotByDimension extends BaseFilter { - const DEFAULT_COLUMN_LIMIT = 7; - /** * The pivot-by Dimension. The metadata in this class is used to determine if we can * pivot the report and used to fetch intersected tables. @@ -157,7 +155,7 @@ class PivotByDimension extends BaseFilter $pivotColumn, $pivotByColumnLimit, $isFetchingBySegmentEnabled); $this->pivotColumn = $pivotColumn; - $this->pivotByColumnLimit = $pivotByColumnLimit ?: self::DEFAULT_COLUMN_LIMIT; + $this->pivotByColumnLimit = $pivotByColumnLimit ?: self::getDefaultColumnLimit(); $this->isFetchingBySegmentEnabled = $isFetchingBySegmentEnabled; $namesToId = Metrics::getMappingFromIdToName(); @@ -456,4 +454,15 @@ class PivotByDimension extends BaseFilter { return Config::getInstance()->General['pivot_by_filter_enable_fetch_by_segment']; } + + /** + * Returns the default maximum number of columns to allow in a pivot table from the INI config. + * Uses the **pivot_by_filter_default_column_limit** INI config option. + * + * @return int + */ + public static function getDefaultColumnLimit() + { + return Config::getInstance()->General['pivot_by_filter_default_column_limit']; + } }
\ No newline at end of file |