$replace A boolean indicating whether an existing file of the same name in the destination directory should overwritten. A false value will generate a new, unique filename in the destination directory.

The parameter is not actually a boolean, but rather an enumerator (reported by alpapan).

Files: 
CommentFileSizeAuthor
#10 file_save_upload_new3_841134_D6_0.patch2.04 KBjhodgdon
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch file_save_upload_new3_841134_D6_0_0.patch.
[ View ]
#8 file_save_upload_new3_841134_D6.patch2.04 KBdaniels220
#7 file_save_upload_new3_841134_D6.patch2.04 KBdaniels220
#5 file_save_upload_new_841134_D6.patch1.45 KBdaniels220
#3 file_save_upload_841134_D6.patch1.46 KBdaniels220

Comments

jhodgdon’s picture

Good catch. This is only a problem in Drupal 6, not Drupal 7. Also, it's related to (but not a duplicate of):
#373606: file.inc documentation needs overhaul

jhodgdon’s picture

Issue tags:+Novice

This particular fix would be a good project for a novice contributor. Just need to copy what's in Drupal 7 for this function to Drupal 6.

daniels220’s picture

Assigned:Unassigned» daniels220
Status:Active» Needs review
StatusFileSize
new1.46 KB

Here's a patch. I fixed up a couple other style issues in this function's doc as well.

An optional associative array... to (optional) An associative array...

Added a blank line before @return.

jhodgdon’s picture

Status:Needs review» Needs work

I cannot get this patch to apply to D6 dev branch.

Also, if you are fixing up this function docblock, you could make it so the first line is a one-sentence summary, followed by a blank line?

daniels220’s picture

Status:Needs work» Needs review
StatusFileSize
new1.45 KB

Problems on my end sorted out, I think. Here's a new patch.

jhodgdon’s picture

Status:Needs review» Needs work

Applies and looks good, but it still doesn't bring the docblock into compliance, where the first line is a one-sentence summary, and it's followed by a newline and perhaps more description.

daniels220’s picture

StatusFileSize
new2.04 KB

Whoops, I think I accidentally git reset'ed myself and didn't redo all my changes. Fixed by just moving the second sentence into the long description.

daniels220’s picture

Status:Needs work» Needs review
StatusFileSize
new2.04 KB

Whoops, I think I accidentally git reset'ed myself and didn't redo all my changes. Fixed by just moving the second sentence into the long description.

daniels220’s picture

Sorry for the double submit.

jhodgdon’s picture

Status:Needs review» Reviewed & tested by the community
StatusFileSize
new2.04 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch file_save_upload_new3_841134_D6_0_0.patch.
[ View ]

Nitpick: There is a trailing space on the 2nd line. Other than that, the patch is good... To save time, I removed that space from the patch and here it is.

Status:Reviewed & tested by the community» Needs work

The last submitted patch, file_save_upload_new3_841134_D6_0.patch, failed testing.

jhodgdon’s picture

Status:Needs work» Reviewed & tested by the community

D6 test bot is not working. The patch is fine...

Gábor Hojtsy’s picture

Status:Reviewed & tested by the community» Fixed

Superb, thanks, committed.

Status:Fixed» Closed (fixed)
Issue tags:-Novice

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