You are here

function _auditfiles_managed_not_used_get_file_data in Audit Files 7.4

Same name and namespace in other branches
  1. 7.3 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.

2 calls to _auditfiles_managed_not_used_get_file_data()
auditfiles_managed_not_used_form in ./auditfiles.managednotused.inc
Generates the report.
_auditfiles_managed_not_used_batch_display_process_batch in ./auditfiles.managednotused.inc
The batch process for displaying the files.

File

./auditfiles.managednotused.inc, line 557
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',
  );
}