diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2018-09-24 01:06:50 +0300 |
---|---|---|
committer | diosmosis <diosmosis@users.noreply.github.com> | 2018-09-24 01:06:50 +0300 |
commit | af9f44ced0a8d2e703584eaaffc210f2a1a30187 (patch) | |
tree | fe82361c4afad9ea4847d2879851be2f579b1807 /plugins/CustomVariables | |
parent | cf203be455df68192580bd7363886d5604abae80 (diff) |
Fix fatal when multiple sites are requested in referrers API report (#13439)
* Fix fatal when multiple sites are requested in referrers API report
* add more checks
Diffstat (limited to 'plugins/CustomVariables')
-rw-r--r-- | plugins/CustomVariables/API.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/CustomVariables/API.php b/plugins/CustomVariables/API.php index 65b3ad1067..c332060129 100644 --- a/plugins/CustomVariables/API.php +++ b/plugins/CustomVariables/API.php @@ -60,6 +60,8 @@ class API extends \Piwik\Plugin\API */ public function getCustomVariables($idSite, $period, $date, $segment = false, $expanded = false, $_leavePiwikCoreVariables = false, $flat = false) { + Piwik::checkUserHasViewAccess($idSite); + $dataTable = $this->getDataTable($idSite, $period, $date, $segment, $expanded, $flat, $idSubtable = null); if ($dataTable instanceof DataTable @@ -105,6 +107,8 @@ class API extends \Piwik\Plugin\API */ public function getCustomVariablesValuesFromNameId($idSite, $period, $date, $idSubtable, $segment = false, $_leavePriceViewedColumn = false) { + Piwik::checkUserHasViewAccess($idSite); + $dataTable = $this->getDataTable($idSite, $period, $date, $segment, $expanded = false, $flat = false, $idSubtable); if (!$_leavePriceViewedColumn) { |