When a file reaches its expiration time, it is not being moved to an expired state. It's staying in the download listing, showing 0 time left for download.
Moreover, the expiration calculation is being done ad hoc in multiple places, which probably accounts for this inconsistency.
The attached patch refactors the expiry handling.
A new function ec_file_calculate_expiration() is introduced. The three places that are currently doing expiry calculation now call this routine.
The attached patch was generated against file.module with the following fixes applied:
http://drupal.org/files/issues/file_download_error_checking.patch from http://drupal.org/node/103359
http://drupal.org/files/issues/download-link-fix-try2.patch from http://drupal.org/node/103326
| Comment | File | Size | Author |
|---|---|---|---|
| ecommerce-file-expiry_file_fix.patch | 7.54 KB | chip |
Comments
Comment #1
brmassa commentedChip,
the File module has been rewritten for eC4.
regards,
massa
Comment #2
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.