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:
authormattpiwik <matthieu.aubry@gmail.com>2008-08-04 04:11:03 +0400
committermattpiwik <matthieu.aubry@gmail.com>2008-08-04 04:11:03 +0400
commit2854426e8609e0f9e3ceac2e27327532bf00a408 (patch)
tree5214705435461179efecb331075a9830a21a5594 /core/DataTable/Filter/ReplaceSummaryRowLabel.php
parent42b52b6d8a88b3fa4c4f3978c4e7bf00b1eac778 (diff)
oops i totally screwed up my last commit, deleting /modules instead of renaming it...
git-svn-id: http://dev.piwik.org/svn/trunk@587 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/DataTable/Filter/ReplaceSummaryRowLabel.php')
-rw-r--r--core/DataTable/Filter/ReplaceSummaryRowLabel.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/core/DataTable/Filter/ReplaceSummaryRowLabel.php b/core/DataTable/Filter/ReplaceSummaryRowLabel.php
new file mode 100644
index 0000000000..ed3b627ddc
--- /dev/null
+++ b/core/DataTable/Filter/ReplaceSummaryRowLabel.php
@@ -0,0 +1,42 @@
+<?php
+/**
+ * Piwik - Open source web analytics
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later
+ * @version $Id: ReplaceColumnNames.php 482 2008-05-18 17:22:35Z matt $
+ *
+ * @package Piwik_DataTable
+ */
+
+/**
+ *
+ * @package Piwik_DataTable
+ * @subpackage Piwik_DataTable_Filter
+ */
+class Piwik_DataTable_Filter_ReplaceSummaryRowLabel extends Piwik_DataTable_Filter
+{
+ public function __construct( $table, $newLabel = null)
+ {
+ parent::__construct($table);
+ if(is_null($newLabel))
+ {
+ $newLabel = Piwik_Translate('General_Others');
+ }
+ $this->newLabel = $newLabel;
+ $this->filter();
+ }
+
+ protected function filter()
+ {
+ foreach($this->table->getRows() as $row)
+ {
+ if($row->getColumn('label') === Piwik_DataTable::LABEL_SUMMARY_ROW)
+ {
+ $row->setColumn('label', $this->newLabel);
+ break;
+ }
+ }
+ }
+}
+