From ed35d1835cf024366eb1c712cfaacbef88d95fd9 Mon Sep 17 00:00:00 2001
From: diosmosis <benaka@piwik.pro>
Date: Mon, 19 Oct 2015 16:49:36 -0700
Subject: [PATCH] Make sure subtable reports for Events include correct
 processed metrics.

---
 plugins/Events/Reports/GetActionFromCategoryId.php | 7 ++++---
 plugins/Events/Reports/GetActionFromNameId.php     | 7 ++++---
 plugins/Events/Reports/GetCategoryFromActionId.php | 7 ++++---
 plugins/Events/Reports/GetCategoryFromNameId.php   | 7 ++++---
 plugins/Events/Reports/GetNameFromActionId.php     | 7 ++++---
 plugins/Events/Reports/GetNameFromCategoryId.php   | 7 ++++---
 6 files changed, 24 insertions(+), 18 deletions(-)

diff --git a/plugins/Events/Reports/GetActionFromCategoryId.php b/plugins/Events/Reports/GetActionFromCategoryId.php
index e5de6af9ca..c6fc362f6d 100644
--- a/plugins/Events/Reports/GetActionFromCategoryId.php
+++ b/plugins/Events/Reports/GetActionFromCategoryId.php
@@ -15,14 +15,15 @@ use Piwik\Plugins\Events\Columns\EventAction;
 /**
  * Report metadata class for the Events.getActionFromCategoryId class.
  */
-class GetActionFromCategoryId extends Report
+class GetActionFromCategoryId extends Base
 {
     protected function init()
     {
-        $this->category = 'Events_Events';
-        $this->processedMetrics = false;
+        parent::init();
+
         $this->dimension     = new EventAction();
         $this->name          = Piwik::translate('Events_EventActions');
         $this->isSubtableReport = true;
+        $this->widgetParams = array();
     }
 }
\ No newline at end of file
diff --git a/plugins/Events/Reports/GetActionFromNameId.php b/plugins/Events/Reports/GetActionFromNameId.php
index 55bd628459..3b4882ee39 100644
--- a/plugins/Events/Reports/GetActionFromNameId.php
+++ b/plugins/Events/Reports/GetActionFromNameId.php
@@ -15,14 +15,15 @@ use Piwik\Plugins\Events\Columns\EventAction;
 /**
  * Report metadata class for the Events.getActionFromNameId class.
  */
-class GetActionFromNameId extends Report
+class GetActionFromNameId extends Base
 {
     protected function init()
     {
-        $this->category = 'Events_Events';
-        $this->processedMetrics = false;
+        parent::init();
+
         $this->dimension     = new EventAction();
         $this->name          = Piwik::translate('Events_EventActions');
         $this->isSubtableReport = true;
+        $this->widgetParams = array();
     }
 }
\ No newline at end of file
diff --git a/plugins/Events/Reports/GetCategoryFromActionId.php b/plugins/Events/Reports/GetCategoryFromActionId.php
index 51f5f6918d..a592ab24e0 100644
--- a/plugins/Events/Reports/GetCategoryFromActionId.php
+++ b/plugins/Events/Reports/GetCategoryFromActionId.php
@@ -15,14 +15,15 @@ use Piwik\Plugins\Events\Columns\EventCategory;
 /**
  * Report metadata class for the Events.getCategoryFromActionId class.
  */
-class GetCategoryFromActionId extends Report
+class GetCategoryFromActionId extends Base
 {
     protected function init()
     {
-        $this->category = 'Events_Events';
-        $this->processedMetrics = false;
+        parent::init();
+
         $this->dimension     = new EventCategory();
         $this->name          = Piwik::translate('Events_EventCategories');
         $this->isSubtableReport = true;
+        $this->widgetParams = array();
     }
 }
\ No newline at end of file
diff --git a/plugins/Events/Reports/GetCategoryFromNameId.php b/plugins/Events/Reports/GetCategoryFromNameId.php
index 4806c97d0f..caf7119a54 100644
--- a/plugins/Events/Reports/GetCategoryFromNameId.php
+++ b/plugins/Events/Reports/GetCategoryFromNameId.php
@@ -15,14 +15,15 @@ use Piwik\Plugins\Events\Columns\EventCategory;
 /**
  * Report metadata class for the Events.getCategoryFromNameId class.
  */
-class GetCategoryFromNameId extends Report
+class GetCategoryFromNameId extends Base
 {
     protected function init()
     {
-        $this->category = 'Events_Events';
-        $this->processedMetrics = false;
+        parent::init();
+
         $this->dimension     = new EventCategory();
         $this->name          = Piwik::translate('Events_EventCategories');
         $this->isSubtableReport = true;
+        $this->widgetParams = array();
     }
 }
\ No newline at end of file
diff --git a/plugins/Events/Reports/GetNameFromActionId.php b/plugins/Events/Reports/GetNameFromActionId.php
index 7b4899b672..403d252b65 100644
--- a/plugins/Events/Reports/GetNameFromActionId.php
+++ b/plugins/Events/Reports/GetNameFromActionId.php
@@ -15,14 +15,15 @@ use Piwik\Plugins\Events\Columns\EventName;
 /**
  * Report metadata class for the Events.getNameFromActionId class.
  */
-class GetNameFromActionId extends Report
+class GetNameFromActionId extends Base
 {
     protected function init()
     {
-        $this->category = 'Events_Events';
-        $this->processedMetrics = false;
+        parent::init();
+
         $this->dimension     = new EventName();
         $this->name          = Piwik::translate('Events_Names');
         $this->isSubtableReport = true;
+        $this->widgetParams = array();
     }
 }
\ No newline at end of file
diff --git a/plugins/Events/Reports/GetNameFromCategoryId.php b/plugins/Events/Reports/GetNameFromCategoryId.php
index d1f43f7931..ee951e03bf 100644
--- a/plugins/Events/Reports/GetNameFromCategoryId.php
+++ b/plugins/Events/Reports/GetNameFromCategoryId.php
@@ -15,14 +15,15 @@ use Piwik\Plugins\Events\Columns\EventName;
 /**
  * Report metadata class for the Events.getNameFromCategoryId class.
  */
-class GetNameFromCategoryId extends Report
+class GetNameFromCategoryId extends Base
 {
     protected function init()
     {
-        $this->category = 'Events_Events';
-        $this->processedMetrics = false;
+        parent::init();
+
         $this->dimension     = new EventName();
         $this->name          = Piwik::translate('Events_EventNames');
         $this->isSubtableReport = true;
+        $this->widgetParams = array();
     }
 }
\ No newline at end of file
-- 
GitLab