FileField Paths gets 'Retroactive updates' updates.

Over the last few days I've made some much needed updates to the 'Retroactive changes' functionality of FileField Paths, including the minor change of renaming it to 'Retroactive updates'.

 
Batch API

The most important change is currently limited to the Drupal 6 version, which is the implementation of Drupal 6's Batch API. What this means is that where previously running Retroactive updates over 2000+ nodes would have caused PHP to timeout or run into memory issues, it will now handle many thousands with no issue.

Depending on the level of difficulty, time involved and demand, this functionality may be backported to Drupal 5 in the future.

 
Original filename

The other major update is a solution for an issue that Retroactive updates inadvertently re-introduced; If you had the [filefield-onlyname] token in combination with anything else in the name portion of the filename, continuous use of Retroactive updates would continue to update the file. The reason this occurs is that the [filefield-onlyname] token is built using the current filename.

Example: test-[filefield-onlyname].[filefield-extension] applied to file.ext
1. test-file.ext
2. test-test-file.ext
3. test-test-test-file.ext

In the latest development build of both the Drupal 5 and 6 versions it now stores the originally uploaded filename in the {files} table of the database and populates two new tokens from that information; [filefield-onlyname-original] and [filefield-extension-original].

 
For more information, or to download the latest builds, head over to the project page: http://drupal.org/project/filefield_paths

Thanks! Your module lets me organize the files on my Drupal sites instead of just dumping them all into the files directory.

Brian Puccio (not verified) on 18 April 2009 - 4:26pm
© 2007 - 2010 deciphered.net. All rights Reserved.