protected function elFinderDrupal::downloadcount in elFinder file manager 6.2
Same name and namespace in other branches
- 7.3 inc/elfinder.drupal.inc \elFinderDrupal::downloadcount()
- 7.2 inc/elfinder.drupal.inc \elFinderDrupal::downloadcount()
File
- inc/
elfinder.drupal.inc, line 111
Class
Code
protected function downloadcount($args) {
$target = $args['target'];
$error = array(
self::ERROR_UNKNOWN,
'#' . $target,
);
if (($volume = $this
->volume($target)) == false || ($file = $volume
->file($target)) == false) {
return array(
'error' => $this
->error($error, self::ERROR_FILE_NOT_FOUND),
);
}
$error[1] = $file['name'];
if ($volume
->driverId() == 'f') {
return array(
'downloadcount' => '',
);
}
if ($volume
->commandDisabled('downloadcount')) {
return array(
'error' => $this
->error($error, self::ERROR_ACCESS_DENIED),
);
}
if (($downloadcount = $volume
->downloadcount($target)) == false) {
return array(
'error' => $this
->error($error, $volume
->error()),
);
}
return array(
'downloadcount' => $downloadcount,
);
}