diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-11-24 04:56:51 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2015-11-24 04:56:51 +0300 |
commit | e9656afeeca072c5ab42786fc445ffc8fc44adbc (patch) | |
tree | e5dc9ac7b2a33a993e4851098ac9416747b76f98 /plugins/SitesManager | |
parent | d995029b91f38bd81fbbb50f4d058f3b6b3c18a2 (diff) |
fix system tests and fix an error where we did not pass the correct siteId when saving measurable settings
Diffstat (limited to 'plugins/SitesManager')
-rw-r--r-- | plugins/SitesManager/API.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/SitesManager/API.php b/plugins/SitesManager/API.php index 4a67c45c2c..9a6bf63469 100644 --- a/plugins/SitesManager/API.php +++ b/plugins/SitesManager/API.php @@ -585,7 +585,7 @@ class API extends \Piwik\Plugin\API } if (!empty($settings)) { - $this->validateMeasurableSettings($bind['type'], $settings); + $this->validateMeasurableSettings(0, $bind['type'], $settings); } $idSite = $this->getModel()->createSite($bind); @@ -611,9 +611,9 @@ class API extends \Piwik\Plugin\API return (int) $idSite; } - private function validateMeasurableSettings($idType, $settings) + private function validateMeasurableSettings($idSite, $idType, $settings) { - $measurableSettings = new MeasurableSettings(0, $idType); + $measurableSettings = new MeasurableSettings($idSite, $idType); foreach ($measurableSettings->getSettingsForCurrentUser() as $measurableSetting) { $name = $measurableSetting->getName(); @@ -1184,7 +1184,7 @@ class API extends \Piwik\Plugin\API } if (!empty($settings)) { - $this->validateMeasurableSettings(Site::getTypeFor($idSite), $settings); + $this->validateMeasurableSettings($idSite, Site::getTypeFor($idSite), $settings); } $this->getModel()->updateSite($bind, $idSite); |