We've been building out a judging/rating module that has a dependency on votingapi for its end-user voting functionality. The client was not totally happy with the 1-day vote rollover option for anon and auth users. They requested that we instead compare a vote's calendar day to the current calendar day instead of the full 24-hour check with the 1-day rollover option:

DATE_FORMAT(FROM_UNIXTIME(timestamp), '%Y-%d-%m') = '2014-04-03'

While this could have been accomplished by implementing hook_votingapi_storage_select_votes in our custom mod, it occurred to us that this "calendar day" option might be a welcome addition for other devs out there. To that end, we elected to create a patch for votingapi that adds this new option and accounts for it in votingapi_select_votes and votingapi_votingapi_storage_select_votes.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

natemow’s picture

natemow’s picture

Status: Active » Needs review
natemow’s picture

Issue summary: View changes