function imagepicker_get_path in Image Picker 6.2
Same name and namespace in other branches
- 5.2 imagepicker.module \imagepicker_get_path()
- 5 imagepicker.module \imagepicker_get_path()
- 7 imagepicker.module \imagepicker_get_path()
some common utilities
15 calls to imagepicker_get_path()
- imagepicker_admin_view in ./
imagepicker.admin.inc - imagepicker_copy_form_submit in ./
imagepicker.functions.inc - Function to submit the copy form
- imagepicker_delete_olduser_dirs in ./
imagepicker.admin.inc - imagepicker_get_image_path in ./
imagepicker.module - imagepicker_get_watermarks_dir in ./
imagepicker.functions.inc
File
- ./
imagepicker.module, line 860 - Enables permitted roles to upload images for insertion into configured nodes.
Code
function imagepicker_get_path($url = FALSE, $userdir = FALSE) {
global $base_url;
$dirsep = !$url ? DIRECTORY_SEPARATOR : '/';
if (!$url) {
$path = imagepicker_get_files_directory() . $dirsep;
}
else {
if (variable_get('imagepicker_use_full_url', 0)) {
$path = $base_url;
}
else {
$path = base_path();
$path = preg_replace("/\\/\$/", "", $path);
}
$path .= $dirsep . file_directory_path() . $dirsep . IMAGEPICKER_FILES_DIR . $dirsep;
}
if ($userdir) {
$path .= imagepicker_get_userpath($userdir, $dirsep);
}
return $path;
}