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

CommentFileSizeAuthor
ecommerce-file-expiry_file_fix.patch7.54 KBchip

Comments

brmassa’s picture

Status: Needs review » Fixed

Chip,

the File module has been rewritten for eC4.

regards,

massa

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.