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(); } /** 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(); } /** 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(); } /**