Remove file.inc dependency and always create backups

sun - January 22, 2008 - 23:04
Project:Coder
Version:6.x-1.x-dev
Component:Coder Format
Category:task
Priority:normal
Assigned:sun
Status:closed
Description

While developing/debugging http://drupal.org/node/208767, I noticed that it would be very helpful if coder_format

  1. would always create backup files (not only when recursively processing a directory)
  2. 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.

#1

sun - January 23, 2008 - 01:08
Status:active» needs work

First shot, something broke in the forked file_* functions.

AttachmentSize
coder-DRUPAL-6--1.patch 17.21 KB

#2

sun - January 26, 2008 - 18:10
Title:Remove file.inc dependency and automatically create backups» Remove file.inc dependency and always create backups
Status:needs work» fixed

Committed 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.

AttachmentSize
coder-DRUPAL-6--1.patch 28.11 KB

#3

Anonymous (not verified) - February 9, 2008 - 18:12
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.