Closed (fixed)
Project:
Filemanager
Version:
4.6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Sep 2005 at 14:46 UTC
Updated:
28 Oct 2005 at 22:21 UTC
Jump to comment: Most recent file
Comments
Comment #1
vhmauery commentedThis patch adds rename support. It also fixes some other minor bugs in the filemanager code. Namely, it fixes a bug in filemanager_url that incorrectly handled the absolute/relative case, what looked like a possible race condition in filemanager_add_file and a bug in how it counted the number of files in a directory (it looked an otherwise unused variable $curdir)
To add the rename support, I moved the directory finding code out of filemanager_add_file into its own function and called that both from the add file and rename file functions. And I abstracted the locking mechanism to make it easier to use.
I also added a function called filemanager_get_working_copy which returns the working copy of a file if there is one or copies the active file into the working dir and returns that. This was just a very convenient function.
Please look at the patch and include it if it is good. Acidfree, my photo album module requires these changes.
Comment #2
vhmauery commentedThe last patch introduced an error in filemanager_url. Oops. Here is a patch to replace the first one.
Comment #3
ccourtne commentedI have applied the patch. The patch had one bug where it would not properly update the directory number in the database when renaming a file.