@@ 187-191 (lines=5) @@ | ||
184 | } |
|
185 | } |
|
186 | ||
187 | if (!empty($since)) { |
|
188 | $starttime = time() - $this->userlog->getSinceTime($since); |
|
189 | $criteriaSince = new CriteriaCompo(); |
|
190 | $criteriaSince->add(new Criteria('log_time', $starttime, '>')); |
|
191 | } |
|
192 | ||
193 | if (!empty($users)) { |
|
194 | $criteriaUser = new CriteriaCompo(); |
@@ 189-193 (lines=5) @@ | ||
186 | } |
|
187 | foreach ($this->period as $per) { |
|
188 | $criteria = new CriteriaCompo(); |
|
189 | if (!empty($per)) { |
|
190 | // today, week, month |
|
191 | $since = $this->userlog->getSinceTime($per); |
|
192 | $criteria->add(new Criteria('log_time', time() - $since, '>'), 'AND'); |
|
193 | } |
|
194 | $logs = $this->userlog->getHandler('log')->getLogsCount($criteria); |
|
195 | $exceed = $logs - $this->userlog->getConfig('maxlogs'); |
|
196 | // if logs exceed the maxlogs delete them |