You are here

function download_count_views_handler_field_file::init in Download Count 7.2

Same name and namespace in other branches
  1. 6.2 includes/download_count_views_handler_field_file.inc \download_count_views_handler_field_file::init()

Constructor to provide additional field info.

Overrides views_handler_field_file::init

File

includes/download_count_views_handler_field_file.inc, line 18
Contains the views handler for download_count to correct file name and filepath links for files protected by the private_upload module. It should really be part of the private_upload module, but private_upload does not currently provide views 2…

Class

download_count_views_handler_field_file
Fix node title field to reflect correct private_upload path.

Code

function init(&$view, &$options) {
  parent::init($view, $options);
  if (!empty($options['link_to_file'])) {
    $this->additional_fields['filename'] = 'filename';
    $this->additional_fields['fid'] = 'fid';
  }
}