| Versionen | |
|---|---|
| drupal6 | file_set_status(&$file, $status) |
Set the status of a file.
file A Drupal file object
status A status value to set the file to.
FALSE on failure, TRUE on success and $file->status will contain the status.
includes/
<?php
function file_set_status(&$file, $status) {
if (db_query('UPDATE {files} SET status = %d WHERE fid = %d', $status, $file->fid)) {
$file->status = $status;
return TRUE;
}
return FALSE;
}
?>
Kommentare
Kommentar hinzufügen