While developing/debugging http://drupal.org/node/208767, I noticed that it would be very helpful if coder_format
- would always create backup files (not only when recursively processing a directory)
- would not have a dependency on file.inc
1. also removes the need to specify a target filename. While being there, we could also automatically determine, if the source is a file or a directory (if so, process it recursively).
Regarding 2. I'd suggest to add the needed functions from file.inc to coder_format.php, and also move all stub functions form coder_format.inc into coder_format.php. Thus, when coder_format.inc is invoked by coder_format.php, all required functions are defined. If it's invoked by Drupal (maybe in the future?), all of these functions already exist.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | coder-DRUPAL-6--1.patch | 28.11 KB | sun |
| #1 | coder-DRUPAL-6--1.patch | 17.21 KB | sun |
Comments
Comment #1
sunFirst shot, something broke in the forked file_* functions.
Comment #2
sunCommitted attached patch, which
- removes file.inc dependency
- removes the target filename parameter (automatically creates backup files for single files now)
- automatically detects if a given argument is a file or directory (automatically processing directories recursively)
- adds a new Windows Explorer context menu entry to restore processed files from backup files.
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.