function _auditfiles_managed_not_used_get_file_data in Audit Files 7.3
Same name and namespace in other branches
- 7.4 auditfiles.managednotused.inc \_auditfiles_managed_not_used_get_file_data()
Retrieves information about an individual file from the database.
Parameters
int $file_id: The ID of the file to prepare for display.
Return value
array The row for the table on the report, with the file's information formatted for display.
1 call to _auditfiles_managed_not_used_get_file_data()
- auditfiles_managed_not_used_form in ./
auditfiles.managednotused.inc - Generates the report.
File
- ./
auditfiles.managednotused.inc, line 564 - Generates a report showing files in file_managed, but not in file_usage.
Code
function _auditfiles_managed_not_used_get_file_data($file_id, $date_format) {
$file = file_load($file_id);
return array(
'fid' => $file->fid,
'uid' => $file->uid,
'filename' => $file->filename,
'uri' => $file->uri,
'path' => drupal_realpath($file->uri),
'filemime' => $file->filemime,
'filesize' => number_format($file->filesize),
'datetime' => format_date($file->timestamp, $date_format),
'status' => ($file->status = 1) ? 'Permanent' : 'Temporary',
);
}