Skip to content

Commit

Permalink
Fix for wbstats database cleanup
Browse files Browse the repository at this point in the history
keep only data not older than 90days
  • Loading branch information
instantflorian committed Feb 10, 2021
1 parent 7214eea commit 30815a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions wbce/modules/wbstats/class.count.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ function init() {
$this->month = date("Ym",$time);
//$this->old_data = mktime(0, 0, 0, date("n"), date("j"), date("Y")) - 48*60*60 ; // 48 hours
//$this->old_date = date("Ymd", mktime(0, 0, 0, date("n"), date("j")-7, date("Y"))); // 7 days
$this->old_data = date("Ymd", mktime(0, 0, 0, date("n"), date("j") - 90, date("Y"))); // 7 days
$this->old_date = date("Ymd", mktime(0, 0, 0, date("n"), date("j") - 90, date("Y"))); // 7 days
$this->old_data = strtotime(date("Ymd", mktime(0, 0, 0, date("n"), date("j") - 90, date("Y")))); // 90 days
$this->old_date = date("Ymd", mktime(0, 0, 0, date("n"), date("j") - 90, date("Y"))); // 90 days
$this->reload = 3 * 60 * 60 ;
$this->online = $time - 3 * 60;

Expand Down
4 changes: 2 additions & 2 deletions wbce/modules/wbstats/class.stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ function __construct() {
$this->month = date("Ym",$time);
//$this->old_data = mktime(0, 0, 0, date("n"), date("j"), date("Y")) - 48*60*60 ; // 48 hours
//$this->old_date = date("Ymd", mktime(0, 0, 0, date("n"), date("j") - 7, date("Y"))); // 7 days
$this->old_data = date("Ymd", mktime(0, 0, 0, date("n"), date("j") - 90, date("Y"))); // 7 days
$this->old_date = date("Ymd", mktime(0, 0, 0, date("n"), date("j") - 90, date("Y"))); // 7 days
$this->old_data = strtotime(date("Ymd", mktime(0, 0, 0, date("n"), date("j") - 90, date("Y")))); //90 days
$this->old_date = date("Ymd", mktime(0, 0, 0, date("n"), date("j") - 90, date("Y"))); // 90 days
$this->reload = 3 * 60 * 60 ;
$this->online = $time - 5 * 60;
$this->cleanup();
Expand Down

0 comments on commit 30815a9

Please sign in to comment.