If you set the export range to the same day, you can an empty dataset because the SELECT statement will look for a range spanning a single second of the day.
Line 128 of download_count/includes/download_count.export.inc
$from = strtotime($start['year'] . '-' . $start['month'] . '-' . $start['day']);
$to = strtotime($end['year'] . '-' . $end['month'] . '-' . $end['day']);
below this, add the following conditional:
$from = strtotime($start['year'] . '-' . $start['month'] . '-' . $start['day']);
$to = strtotime($end['year'] . '-' . $end['month'] . '-' . $end['day']);
if ($from == $to) {
$to += 86400;
}
Which means: If the start and end time stamps are the same, make the end time stamp 24 hours after the start time stamp.
I believe this provides expected behavior.
jyg
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | download_count.range-fix.patch | 911 bytes | jyg |
Comments
Comment #1
jyg commentedHere's the patch...
Comment #2
WorldFallz commentedjyg for the trifecta! Thanks again.
Committed to current dev.
http://drupalcode.org/project/download_count.git/commit/04b3cbb