update Piwik to version 2.16 (fixes #91)

This commit is contained in:
oliver 2016-04-10 18:55:57 +02:00
commit d885a4baa9
5833 changed files with 418860 additions and 226988 deletions

View file

@ -1,11 +1,11 @@
<?php
/**
* Piwik - Open source web analytics
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*
*/
namespace Piwik\Plugins\ExampleSettingsPlugin;
use Piwik\Settings\SystemSetting;
@ -18,7 +18,6 @@ use Piwik\Settings\UserSetting;
* $settings = new Settings('ExampleSettingsPlugin');
* $settings->autoRefresh->getValue();
* $settings->metric->getValue();
*
*/
class Settings extends \Piwik\Plugin\Settings
{
@ -53,7 +52,7 @@ class Settings extends \Piwik\Plugin\Settings
// User setting --> textbox converted to int defining a validator and filter
$this->createRefreshIntervalSetting();
// User setting --> readio
// User setting --> radio
$this->createColorSetting();
// System setting --> allows selection of a single value
@ -117,6 +116,7 @@ class Settings extends \Piwik\Plugin\Settings
$this->metric->introduction = 'Only Super Users can change the following settings:';
$this->metric->description = 'Choose the metric that should be displayed in the browser tab';
$this->metric->defaultValue = 'nb_visits';
$this->metric->readableByCurrentUser = true;
$this->addSetting($this->metric);
}
@ -129,6 +129,7 @@ class Settings extends \Piwik\Plugin\Settings
$this->browsers->availableValues = array('firefox' => 'Firefox', 'chromium' => 'Chromium', 'safari' => 'safari');
$this->browsers->description = 'The value will be only displayed in the following browsers';
$this->browsers->defaultValue = array('firefox', 'chromium', 'safari');
$this->browsers->readableByCurrentUser = true;
$this->addSetting($this->browsers);
}
@ -136,6 +137,7 @@ class Settings extends \Piwik\Plugin\Settings
private function createDescriptionSetting()
{
$this->description = new SystemSetting('description', 'Description for value');
$this->description->readableByCurrentUser = true;
$this->description->uiControlType = static::CONTROL_TEXTAREA;
$this->description->description = 'This description will be displayed next to the value';
$this->description->defaultValue = "This is the value: \nAnother line";
@ -146,6 +148,7 @@ class Settings extends \Piwik\Plugin\Settings
private function createPasswordSetting()
{
$this->password = new SystemSetting('password', 'API password');
$this->password->readableByCurrentUser = true;
$this->password->uiControlType = static::CONTROL_PASSWORD;
$this->password->description = 'Password for the 3rd API where we fetch the value';
$this->password->transform = function ($value) {