protected function VotingApi_Criteria::calculateWindow in Voting API 7.3
Calculate the correct timestamp for the vote-rollover.
1 call to VotingApi_Criteria::calculateWindow()
File
- ./
votingapi.module, line 105 - A generalized voting API for Drupal.
Class
- VotingApi_Criteria
- Criteria to select VotingApi_Votes
Code
protected function calculateWindow() {
$window = -1;
if ($this->uid == 0) {
if (!empty($this->vote_source)) {
$window = variable_get('votingapi_anonymous_window', 86400);
}
}
else {
$window = variable_get('votingapi_user_window', -1);
}
if ($window >= 0) {
$this->timestamp = REQUEST_TIME - $window;
}
}