From 5253880a426dacc7f228fa099fad057a84934ee3 Mon Sep 17 00:00:00 2001 From: Martin Keckeis Date: Wed, 4 Feb 2015 17:05:48 +0100 Subject: [PATCH 1/3] Settings + 2.4 BC break --- API.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/API.php b/API.php index cedf467..332e4bc 100755 --- a/API.php +++ b/API.php @@ -30,14 +30,9 @@ public function getSettingsCalendars() return false; } - if (version_compare(Version::VERSION, '2.4.0-b1', 'ge')) - { - $settings = new Settings('RerUserDates'); - - return $settings->getSettingValue($settings->calendars); - } + $settings = new Settings('RerUserDates'); - return false; + return $settings->getSetting('profiles')->getValue(); } /** From d62f3ee5a73f44cc9f313407fb4b2c317047a816 Mon Sep 17 00:00:00 2001 From: Martin Keckeis Date: Wed, 4 Feb 2015 17:06:27 +0100 Subject: [PATCH 2/3] Settings + 2.4 BC break --- RerUserDates.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/RerUserDates.php b/RerUserDates.php index d6e48ac..0ad7902 100755 --- a/RerUserDates.php +++ b/RerUserDates.php @@ -13,8 +13,6 @@ use Piwik\Plugin; use Piwik\Notification; use Piwik\Plugins\UsersManager\API as APIUsersManager; -use Piwik\Url; -use Piwik\Version; /** */ @@ -109,11 +107,8 @@ protected function isSuperuser() */ protected function checkPiwikSettingsFeature() { - if (version_compare(Version::VERSION, '2.4.0-b1', 'ge')) - { - $settings = new Settings('RerUserDates'); - $this->profiles = $settings->getSetting($settings->profiles); - } + $settings = new Settings('RerUserDates'); + $this->profiles = $settings->getSetting('profiles')->getValue(); } /** From 0b9867a277374c10f0bd5340609a94c2a61008ed Mon Sep 17 00:00:00 2001 From: Martin Keckeis Date: Wed, 4 Feb 2015 17:07:03 +0100 Subject: [PATCH 3/3] Settings + 2.4 BC break --- Settings.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Settings.php b/Settings.php index be91aef..c184b2c 100755 --- a/Settings.php +++ b/Settings.php @@ -11,7 +11,6 @@ use Piwik\Piwik; use Piwik\Settings\SystemSetting; -use Piwik\Version; /** * Class Settings @@ -35,11 +34,8 @@ class Settings extends \Piwik\Plugin\Settings protected function init() { $this->setIntroduction(Piwik::translate('RerUserDates_Settings')); - if (version_compare(Version::VERSION, '2.4.0-b1', 'ge')) - { - $this->createProfileSettings(); - $this->createCalendarSettings(); - } + $this->createProfileSettings(); + $this->createCalendarSettings(); } /**