In the phpdoc comment for the votingapi_select_results function it is stated that every entry greater than the timestamp criteria will be selected.

 *   $criteria['timestamp']   (If this is set, records with timestamps
 *      GREATER THAN the set value will be selected.)

This is wrong. Only records with timestamps matching the set timestamp will be selected.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andrei.dincu’s picture

Assigned: Unassigned » andrei.dincu
Issue summary: View changes
andrei.dincu’s picture

Status: Active » Needs work
FileSize
642 bytes

Changed doc from GREATER THAN with MATCH.

andrei.dincu’s picture

Status: Needs work » Needs review
andrei.dincu’s picture

torotil’s picture

Another thought: Are we sure that the comment is wrong and not the code? If the comment just described what should happen, and the code failed to do it then the proposed patch would just document the bug instead of solving it.

TR’s picture

Status: Needs review » Closed (duplicate)

Yes, it is definitely the code that is wrong - the documentation describes what the code is supposed to do. It would not make any sense for the code to select votes that MATCH a timestamp - that's a useless selection.

There's an old issue that's already open to address this problem in the code #1304364: timestamp criteria for votingapi_select_votes and votingapi_select_results. You should contribute to that issue!