diff options
author | Simon Rettberg | 2017-05-02 15:31:35 +0200 |
---|---|---|
committer | Simon Rettberg | 2017-05-02 15:31:35 +0200 |
commit | 850c510472756947295d03f17fb8f27884caaa74 (patch) | |
tree | 947f2b8d235031826590bfc88e78126ebc6693bf /modules-available | |
parent | [locationinfo] frontend: einkmode -> eco, just like it's named in config (diff) | |
download | slx-admin-850c510472756947295d03f17fb8f27884caaa74.tar.gz slx-admin-850c510472756947295d03f17fb8f27884caaa74.tar.xz slx-admin-850c510472756947295d03f17fb8f27884caaa74.zip |
[statistics_reporting] Reporting is opt-out now
Diffstat (limited to 'modules-available')
-rw-r--r-- | modules-available/statistics_reporting/inc/remotereport.inc.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/modules-available/statistics_reporting/inc/remotereport.inc.php b/modules-available/statistics_reporting/inc/remotereport.inc.php index 68a3e95e..e94e9b93 100644 --- a/modules-available/statistics_reporting/inc/remotereport.inc.php +++ b/modules-available/statistics_reporting/inc/remotereport.inc.php @@ -13,18 +13,19 @@ class RemoteReport */ public static function setReportingEnabled($isEnabled) { - $value = ($isEnabled === true || $isEnabled === 'on') ? 'on' : ''; - Property::set(self::ENABLED_ID, $value, 60 * 24 * 14); + $value = ($isEnabled === true || $isEnabled === 'on') ? 'on' : 'off'; + Property::set(self::ENABLED_ID, $value); } /** * Returns whether remote reporting is enabled or not. + * Defaults to on. * * @return bool true if reporting is on, false if off */ public static function isReportingEnabled() { - return Property::get(self::ENABLED_ID, false) === 'on'; + return Property::get(self::ENABLED_ID, 'on') === 'on'; } /** @@ -42,9 +43,9 @@ class RemoteReport // schedule for next time self::writeNextReportingTimestamp(); $ts = Property::get(self::NEXT_SUBMIT_ID, 0); - } elseif ($ts < strtotime('last monday')) { - // Too long ago, move forward to last monday - $ts = strtotime('last monday'); + } elseif ($ts < strtotime('last monday - 14 days')) { + // Too long ago, move forward + $ts = strtotime('last monday - 14 days'); } return $ts; } |