API page: http://api.drupal.org/api/drupal/includes--file.inc/function/file_set_st...

Describe the problem you have found:

The "status" argument is not explained at all. It accepts 2 constants:

FILE_STATUS_PERMANENT
FILE_STATUS_TEMPORARY

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Title: Documentation problem with file_set_status » file_set_status - $status needs more explanation.
Issue tags: +Novice

Good catch! The OOP is correct on what the values are. This is a D6 issue only (the function does not exist in D7/8). Probably a good project for a novice contributor.

barbi’s picture

Assigned: Unassigned » barbi
Status: Active » Needs review
FileSize
595 bytes
jhodgdon’s picture

Status: Needs review » Needs work

Could you please:
- reformat the @param section so it conforms with our doc standards
- format the choices as a list:

A status value to set the file to. One of:
- FILE_STATUS_PERMANENT
- FILE_STATUS_TEMPORARY

barbi’s picture

Status: Needs work » Needs review
FileSize
571 bytes
jhodgdon’s picture

Status: Needs review » Needs work

Still not formatted correctly:
http://drupal.org/node/1354#functions

Should be more like:
* @param $mail
* A string containing an email address.

Needs:
- $ before the variable names
- @param $var on one line, description on next line
- Period at end of description
- Also, : before the list

charlie-s’s picture

Status: Needs work » Needs review
FileSize
623 bytes
jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

That's better. Thanks! I guess we could also fix the verb at the top of the function to "Sets", but that's kind of a separate issue and anyway much of D6 doesn't follow that standard as it was adopted in D7.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed.

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