Example #1
0
 public function test_addConfigValuesFromPluginSettings_shouldMaskValueIfTypeIsPassword()
 {
     $settings = new Settings();
     $settings->metric->uiControlType = Settings::CONTROL_PASSWORD;
     $existing = array('ExampleSettingsPlugin' => array('metric' => array('value' => 'test', 'description' => '', 'isCustomValue' => false, 'defaultValue' => null)));
     $configValues = $this->configReader->addConfigValuesFromPluginSettings($existing, array($settings));
     $this->assertSame('******', $configValues['ExampleSettingsPlugin']['metric']['value']);
 }
Example #2
0
 public function configfile()
 {
     Piwik::checkUserHasSuperUserAccess();
     $allSettings = Settings\Manager::getAllPluginSettings();
     $configValues = $this->configReader->getConfigValuesFromFiles();
     $configValues = $this->configReader->addConfigValuesFromPluginSettings($configValues, $allSettings);
     $configValues = $this->sortConfigValues($configValues);
     return $this->renderTemplate('configfile', array('allConfigValues' => $configValues));
 }
Example #3
0
 public function configfile()
 {
     Piwik::checkUserHasSuperUserAccess();
     $settings = new SettingsProvider(\Piwik\Plugin\Manager::getInstance());
     $allSettings = $settings->getAllSystemSettings();
     $configValues = $this->configReader->getConfigValuesFromFiles();
     $configValues = $this->configReader->addConfigValuesFromSystemSettings($configValues, $allSettings);
     $configValues = $this->sortConfigValues($configValues);
     return $this->renderTemplate('configfile', array('allConfigValues' => $configValues));
 }