diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-06-17 07:58:42 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-06-17 07:58:42 +0400 |
commit | 4f1f5894969031e2d9eacada1bd5e47bafbe8e86 (patch) | |
tree | 72795c1f9be636fcc8a849a4a9a2f89db0f72078 /plugins/Installation/Controller.php | |
parent | c87a1209d51b344032628e512db3f9fb3331d74f (diff) |
Installer: remove one of the opted-in newsletter entry, replace it with opt-in only Piwik PRO updates
Diffstat (limited to 'plugins/Installation/Controller.php')
-rw-r--r-- | plugins/Installation/Controller.php | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/plugins/Installation/Controller.php b/plugins/Installation/Controller.php index b04ddd2afb..c0e7fd2be1 100644 --- a/plugins/Installation/Controller.php +++ b/plugins/Installation/Controller.php @@ -279,9 +279,9 @@ class Controller extends \Piwik\Plugin\ControllerAdmin $form->getSubmitValue('email')); $email = $form->getSubmitValue('email'); - $newsletterSecurity = $form->getSubmitValue('subscribe_newsletter_security'); - $newsletterCommunity = $form->getSubmitValue('subscribe_newsletter_community'); - $this->registerNewsletter($email, $newsletterSecurity, $newsletterCommunity); + $newsletterPiwikORG = $form->getSubmitValue('subscribe_newsletter_piwikorg'); + $newsletterPiwikPRO = $form->getSubmitValue('subscribe_newsletter_piwikpro'); + $this->registerNewsletter($email, $newsletterPiwikORG, $newsletterPiwikPRO); $this->redirectToNextStep(__FUNCTION__); } catch (Exception $e) { @@ -666,27 +666,27 @@ class Controller extends \Piwik\Plugin\ControllerAdmin /** * @param $email - * @param $newsletterSecurity - * @param $newsletterCommunity + * @param $newsletterPiwikORG + * @param $newsletterPiwikPRO */ - protected function registerNewsletter($email, $newsletterSecurity, $newsletterCommunity) + protected function registerNewsletter($email, $newsletterPiwikORG, $newsletterPiwikPRO) { $url = Config::getInstance()->General['api_service_url']; $url .= '/1.0/subscribeNewsletter/'; $params = array( 'email' => $email, - 'security' => $newsletterSecurity, - 'community' => $newsletterCommunity, + 'piwikorg' => $newsletterPiwikORG, + 'piwikpro' => $newsletterPiwikPRO, 'url' => Url::getCurrentUrlWithoutQueryString(), ); - if ($params['security'] == '1' - || $params['community'] == '1' + if ($params['piwikorg'] == '1' + || $params['piwikpro'] == '1' ) { - if (!isset($params['security'])) { - $params['security'] = '0'; + if (!isset($params['piwikorg'])) { + $params['piwikorg'] = '0'; } - if (!isset($params['community'])) { - $params['community'] = '0'; + if (!isset($params['piwikpro'])) { + $params['piwikpro'] = '0'; } $url .= '?' . http_build_query($params, '', '&'); try { |