function _auditfiles_not_on_server_get_file_data in Audit Files 7.4
Same name and namespace in other branches
- 7.3 auditfiles.notonserver.inc \_auditfiles_not_on_server_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.
2 calls to _auditfiles_not_on_server_get_file_data()
- auditfiles_not_on_server_form in ./
auditfiles.notonserver.inc - Generates the report.
- _auditfiles_not_on_server_batch_display_process_batch in ./
auditfiles.notonserver.inc - The batch process for displaying the files.
File
- ./
auditfiles.notonserver.inc, line 577 - Generates a report showing files in the database, but not on the server.
Code
function _auditfiles_not_on_server_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',
);
}