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:
authorMatthieu Napoli <matthieu@mnapoli.fr>2014-11-04 00:01:22 +0300
committerMatthieu Napoli <matthieu@mnapoli.fr>2014-11-04 00:01:22 +0300
commitbc3c047a1636a10ce0c69769ed47c58b69bb5470 (patch)
treec8aa7d7a1f40d968eb463184ad7c3943b9e68673 /plugins/Installation/Controller.php
parent67fc32b2c5109cd353824c03c95f35fc7656f803 (diff)
#5052 #6566 Added a form on the last installation step that plugins can enrich
The PrivacyManager plugins adds 2 settings to that form to let user disable (enabled by default) DoNotTrack and IP anonymization
Diffstat (limited to 'plugins/Installation/Controller.php')
-rw-r--r--plugins/Installation/Controller.php24
1 files changed, 17 insertions, 7 deletions
diff --git a/plugins/Installation/Controller.php b/plugins/Installation/Controller.php
index 0e0708c123..32f649ac46 100644
--- a/plugins/Installation/Controller.php
+++ b/plugins/Installation/Controller.php
@@ -404,16 +404,26 @@ class Controller extends \Piwik\Plugin\ControllerAdmin
__FUNCTION__
);
- $form = new FormPrivacyOptions();
+ $form = new FormDefaultSettings();
+
+ /**
+ * Triggered on initialization of the form to customize default Piwik settings (at the end of the installation process).
+ *
+ * @param \Piwik\Plugins\Installation\FormDefaultSettings $form
+ */
+ Piwik::postEvent('Installation.defaultSettingsForm.init', array($form));
+
+ $form->addElement('submit', 'submit', array('value' => Piwik::translate('General_ContinueToPiwik') . ' ยป', 'class' => 'submit'));
if ($form->validate()) {
try {
- $anonymiseIpAddresses = (bool) $form->getSubmitValue('anonymise_ip_addresses');
- if ($anonymiseIpAddresses) {
- IPAnonymizer::activate();
- } else {
- IPAnonymizer::deactivate();
- }
+ /**
+ * Triggered on submission of the form to customize default Piwik settings (at the end of the installation process).
+ *
+ * @param \Piwik\Plugins\Installation\FormDefaultSettings $form
+ */
+ Piwik::postEvent('Installation.defaultSettingsForm.submit', array($form));
+
Url::redirectToUrl('index.php');
} catch (Exception $e) {
$view->errorMessage = $e->getMessage();