diff options
-rw-r--r-- | core/DataTable/Filter/AddSummaryRow.php | 4 | ||||
-rw-r--r-- | core/Plugin.php | 1 | ||||
-rw-r--r-- | core/ViewDataTable.php | 11 | ||||
-rw-r--r-- | core/ViewDataTable/GenerateGraphData.php | 10 |
4 files changed, 21 insertions, 5 deletions
diff --git a/core/DataTable/Filter/AddSummaryRow.php b/core/DataTable/Filter/AddSummaryRow.php index a14797ba60..e98133f026 100644 --- a/core/DataTable/Filter/AddSummaryRow.php +++ b/core/DataTable/Filter/AddSummaryRow.php @@ -45,7 +45,9 @@ class Piwik_DataTable_Filter_AddSummaryRow extends Piwik_DataTable_Filter protected function filter() { - $filter = new Piwik_DataTable_Filter_Sort($this->table, $this->columnToSortByBeforeTruncating, 'desc'); + $filter = new Piwik_DataTable_Filter_Sort($this->table, + $this->columnToSortByBeforeTruncating, + 'desc'); $rows = $this->table->getRows(); $count = $this->table->getRowsCount(); diff --git a/core/Plugin.php b/core/Plugin.php index de3e3a7f72..c58064b10e 100644 --- a/core/Plugin.php +++ b/core/Plugin.php @@ -26,6 +26,7 @@ abstract class Piwik_Plugin * 'author_homepage' => string // author homepage (or email "mailto:youremail@example.org") * 'homepage' => string // plugin homepage * 'version' => string // plugin version number + * 'translationAvailable' => bool // is there a translation file in plugins/your-plugin/lang/* ? * 'TrackerPlugin' => bool // should we load this plugin during the stats logging process? */ abstract function getInformation(); diff --git a/core/ViewDataTable.php b/core/ViewDataTable.php index 3e998be4e5..9854c2b081 100644 --- a/core/ViewDataTable.php +++ b/core/ViewDataTable.php @@ -600,6 +600,17 @@ abstract class Piwik_ViewDataTable } /** + * The queued filters (replace column names, enhance column with percentage signs, add logo metadata information, etc.) + * will not be applied to this datatable. They can be manually applied by calling applyQueuedFilters on the datatable. + * + * @return void + */ + public function disableQueuedFilters() + { + $this->variablesDefault['disable_queued_filters'] = true; + } + + /** * The "X-Y of Z" won't be displayed under this table * @return void */ diff --git a/core/ViewDataTable/GenerateGraphData.php b/core/ViewDataTable/GenerateGraphData.php index 2ddf1c6210..fdd4815624 100644 --- a/core/ViewDataTable/GenerateGraphData.php +++ b/core/ViewDataTable/GenerateGraphData.php @@ -67,12 +67,15 @@ abstract class Piwik_ViewDataTable_GenerateGraphData extends Piwik_ViewDataTable } $this->mainAlreadyExecuted = true; - $this->setLimit(-1); - // we load the data with the filters applied + $this->disableGenericFilters(); + $this->disableQueuedFilters(); $this->loadDataTableFromAPI(); $offsetStartSummary = $this->getGraphLimit() - 1; - $this->dataTable->queueFilter('Piwik_DataTable_Filter_AddSummaryRow', array($offsetStartSummary, Piwik_Translate('General_Others'), Piwik_Archive::INDEX_NB_VISITS)); + $filter = new Piwik_DataTable_Filter_AddSummaryRow($this->dataTable, + $offsetStartSummary, + Piwik_Translate('General_Others'), + Piwik_Archive::INDEX_NB_VISITS); $this->dataAvailable = $this->dataTable->getRowsCount() != 0; if(!$this->dataAvailable) @@ -96,7 +99,6 @@ abstract class Piwik_ViewDataTable_GenerateGraphData extends Piwik_ViewDataTable protected function generateDataFromDataTable() { $this->dataTable->applyQueuedFilters(); - // We apply a filter to the DataTable, decoding the label column (useful for keywords for example) $filter = new Piwik_DataTable_Filter_ColumnCallbackReplace( $this->dataTable, |