You are here

function imagepicker_get_files_directory in Image Picker 6.2

Same name and namespace in other branches
  1. 5.2 imagepicker.module \imagepicker_get_files_directory()
  2. 7 imagepicker.module \imagepicker_get_files_directory()
9 calls to imagepicker_get_files_directory()
imagepicker_admin_orphans_do in ./imagepicker.admin.inc
imagepicker_admin_orphans_form in ./imagepicker.admin.inc
imagepicker_convert_form in ./imagepicker.admin.inc
files and conversion
imagepicker_convert_form_submit in ./imagepicker.admin.inc
imagepicker_file_download in ./imagepicker.module
Implementation of hook_file_download().

... See full list

File

./imagepicker.module, line 1003
Enables permitted roles to upload images for insertion into configured nodes.

Code

function imagepicker_get_files_directory($system_only = FALSE) {
  $drupal_path = file_directory_path();
  if (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PRIVATE) {
    $drupaldir = $drupal_path;
  }
  else {
    $drupaldir = str_replace('/', DIRECTORY_SEPARATOR, getcwd()) . DIRECTORY_SEPARATOR . $drupal_path;
  }
  if ($system_only) {
    return $drupaldir;
  }
  $dir = $drupaldir . DIRECTORY_SEPARATOR . IMAGEPICKER_FILES_DIR;
  return $dir;
}