Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-03-31 03:27:14 +0400
committermatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-03-31 03:27:14 +0400
commit56eaab28c71b0720f87af9c8d90245d9fe18830d (patch)
treee459e19ad3b4b2932ba7d12335041bf3307f56b3
parent92d0c48503601bbd75029f619049ca2305c30a00 (diff)
- fixing ordering on graphs
- adding documentation to specify that plugins can define their own translation files
-rw-r--r--core/DataTable/Filter/AddSummaryRow.php4
-rw-r--r--core/Plugin.php1
-rw-r--r--core/ViewDataTable.php11
-rw-r--r--core/ViewDataTable/GenerateGraphData.php10
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,