Downloads
Massive restructuring of the uc_file module, implementing all functionality in Drupal 5, plus some extras. Information about new features are avilable in CHANGELOG.txt.
I appreciate you testing and reporting bugs... Thanks!
* behaviors used in place of onclick attributes where possible.
* replaced haphazard update/remove calls with one 'refresh' call to prune and update the file list at once where required.
* pruning files that no longer exist now clean up all db tables, including product feature stuff, etc.
* checks for unlink/rmdir now to ensure deletions worked properly. status messages updated accordingly.
* db tables only removed now if files/dirs were successfully removed.
* get_dir_file_ids needed to use regex or else dealing with a structure like 'something/something'
(child dir same name as parent) could fail, due to str_replace replacing all instances it encounters.
* implemented Check all / Uncheck all on file deletion page.
* implemented JS behavior to update the affected file list when clicking the recursion checkbox.
* not showing the recursion checkbox/affected file list on the file deletion form if there isn't any directories in the list.
* added the resume support.
10/13/2008
* Changed _uc_file_retrieve_file_by_* to _uc_file_get_by_* and added a local cache to speed up performance with many files.
* Changed 'File downloads' fieldset on user profile edit page to 'Ubercart file downloads'.
* Not showing the add.remove dialog on the user account edit page, if there are no files to add/remove.
* Added a message at the user account edit page to inform users where to go to add files for download.
* File autocompletion sorts the candidiates first before returning.
10/14/2008
* Small logic cleanup.
* Fixed pager query logic.
* Improved the way file selection happens with file actions.
10/15/2008
* Cleared up the multi-step form even more; now instead of swtching in each phase of the step, the validate/submit handlers are
set in the first phase, so that each can be separated properly.
* Lots of API tightening, fleshed out the doxygen commenting... UI tweaks and improvements.
10/16/2008 (thanks to sratay http://www.ubercart.org/user/3843)
* Getting a PHP warning about the argument to foreach when there were no files uploaded
* Confirmation message for an uploaded file contained the name of the temp file (which could contain a suffix
if uploading the same file more than once)
* No validation for having to select at least one value when trying to delete files (which ended up causing
some errors down the road)
10/20/2008
* Had a bug where I was using assignment instead of comparator...
* Added primary keys to file_users, and file_products
* Made sure in update_6003 that quantity is set to a valid number.
10/21/2008
* Added a toggle in the product administration settings to warn about duplicate file purchases (default to TRUE).
* Added fields download_limit, address_limit, time_granularity, time_quantity to uc_file_products.
* Added fields download_limit, address_limit, expiration to uc_file_users.
* Added support for overriding access limits at the product feature level, as well as the user level.
10/22/2008
* Added the UI at user account page for file adding/removing to a user... also limit adjusting.
* Limits are propagating correctly.
* Added a workaround for a drupal_write_record() bug...
* Upgrade path now adds expiration fiel to uc_file_users, and calculates it from the granted field.
10/23/2008
* Tweaks and polish and commenting all over...
* Expiration on user account page can now be set to 'never', behaviors implemented for them.
* Conditional Actions interface, don't set the desired order status to fire download updates anymore, specify
it in the CA admin interface. At trigger "Order status gets updated", predicate "Renew purchased files".
10/30/2008
* drupal_write_record() seems unreliable on the upgrade path from 5 -> 6, so it was replaced.
11/10/2008
* The file downloads page wasn't showing the first associated product feature like it should have been.
* The $cache variable in uc_file_get_by_key() shuld have been defined as global, not static (thanks Lyle)
Development
| Preview | Attachment | Size |
|---|---|---|
| uc_file.zip | 34.89 KB |

It isn't total complete lockdown coverage, but it's good. You'll need this file:

