X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2FttTeamHelper.class.php;h=e726b92fba6eb8c28d39100401cddb8883cd9045;hb=26f9b4e344163cc2a843f48c3163653b94b32911;hp=92169eb265a014a40aab5858325b587d061611fd;hpb=eb14c12d3be2cd31e20988b6abf7585f6af0b34d;p=timetracker.git diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index 92169eb2..e726b92f 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -805,13 +805,14 @@ class ttTeamHelper { return true; } - // The getInactiveTeams is a maintenance function that returns an array of inactive team ids (max 25). + // The getInactiveTeams is a maintenance function that returns an array of inactive team ids (max 50). static function getInactiveTeams() { $inactive_teams = array(); $mdb2 = getConnection(); // Get all team ids for teams created or modified more than 1 year ago. - $ts = date('Y-m-d', strtotime('-1 year')); + // $ts = date('Y-m-d', strtotime('-1 year')); + $ts = date('Y-m-d', strtotime('-4 month')); $sql = "select id from tt_teams where timestamp < '$ts' order by id"; $res = $mdb2->query($sql); @@ -823,7 +824,7 @@ class ttTeamHelper { $count++; $inactive_teams[] = $team_id; // Limit the array size for perfomance by allowing this operation on small chunks only. - if ($count >= 100) break; + if ($count >= 50) break; } } return $inactive_teams;