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:
authormattab <matthieu.aubry@gmail.com>2014-06-17 07:58:42 +0400
committermattab <matthieu.aubry@gmail.com>2014-06-17 07:58:42 +0400
commit4f1f5894969031e2d9eacada1bd5e47bafbe8e86 (patch)
tree72795c1f9be636fcc8a849a4a9a2f89db0f72078
parentc87a1209d51b344032628e512db3f9fb3331d74f (diff)
Installer: remove one of the opted-in newsletter entry, replace it with opt-in only Piwik PRO updates
-rw-r--r--lang/en.json4
-rw-r--r--plugins/Installation/Controller.php28
-rw-r--r--plugins/Installation/FormSuperUser.php22
3 files changed, 29 insertions, 25 deletions
diff --git a/lang/en.json b/lang/en.json
index c4f3cc2a19..2266afbb86 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -1045,7 +1045,6 @@
},
"Installation": {
"CollaborativeProject": "Piwik is a collaborative project, built with love by people from all over the world.",
- "CommunityNewsletter": "email me with community updates (new plugins, new features, etc.)",
"ConfigurationHelp": "Your Piwik configuration file appears to be misconfigured. You can either remove config\/config.ini.php and resume installation, or correct the database connection settings.",
"ConfirmDeleteExistingTables": "Are you sure you want to delete the tables: %s from your database? WARNING: DATA FROM THESE TABLES CANNOT BE RECOVERED!",
"Congratulations": "Congratulations",
@@ -1091,7 +1090,8 @@
"Requirements": "Piwik Requirements",
"RestartWebServer": "After making this change, restart your web server.",
"ReusingTables": "Reusing the Tables",
- "SecurityNewsletter": "email me with major Piwik upgrades and security alerts",
+ "PiwikOrgNewsletter": "email me with major Piwik community updates",
+ "PiwikProNewsletter": "email me with %sPiwik PRO%s updates",
"SeeBelowForMoreInfo": "See below for more information.",
"SetupWebsite": "Setup a Website",
"SetupWebsiteError": "There was an error when adding the website",
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 {
diff --git a/plugins/Installation/FormSuperUser.php b/plugins/Installation/FormSuperUser.php
index 68d9dcad14..aef40d6a40 100644
--- a/plugins/Installation/FormSuperUser.php
+++ b/plugins/Installation/FormSuperUser.php
@@ -53,21 +53,25 @@ class FormSuperUser extends QuickForm2
$email->addRule('required', Piwik::translate('General_Required', Piwik::translate('Installation_Email')));
$email->addRule('checkEmail', Piwik::translate('UsersManager_ExceptionInvalidEmail'));
- $this->addElement('checkbox', 'subscribe_newsletter_security', null, array(
- 'content' => '&nbsp;&nbsp;' . Piwik::translate('Installation_SecurityNewsletter'),
- ));
+ $this->addElement('checkbox', 'subscribe_newsletter_piwikorg', null,
+ array(
+ 'content' => '&nbsp;&nbsp;' . Piwik::translate('Installation_PiwikOrgNewsletter'),
+ ));
- $this->addElement('checkbox', 'subscribe_newsletter_community', null, array(
- 'content' => '&nbsp;&nbsp;' . Piwik::translate('Installation_CommunityNewsletter'),
- ));
+ $this->addElement('checkbox', 'subscribe_newsletter_piwikpro', null,
+ array(
+ 'content' => '&nbsp;&nbsp;' . Piwik::translate('Installation_PiwikProNewsletter',
+ array("<a href='http://piwik.pro' style='color:#444;' target='_blank'>", "</a>")
+ ),
+ ));
$this->addElement('submit', 'submit', array('value' => Piwik::translate('General_Next') . ' ยป', 'class' => 'submit'));
// default values
$this->addDataSource(new HTML_QuickForm2_DataSource_Array(array(
- 'subscribe_newsletter_community' => 1,
- 'subscribe_newsletter_security' => 1,
- )));
+ 'subscribe_newsletter_piwikorg' => 1,
+ 'subscribe_newsletter_piwikpro' => 0,
+ )));
}
}