function imagepicker_file_check_location in Image Picker 7
1 call to imagepicker_file_check_location()
File
- ./
imagepicker.import.inc, line 479
Code
function imagepicker_file_check_location($source, $directory = '') {
$check = realpath($source);
if ($check) {
$source = $check;
}
else {
// This file does not yet exist
$source = realpath(dirname($source)) . '/' . basename($source);
}
$directory = realpath($directory);
if ($directory && strpos($source, $directory) !== 0) {
return 0;
}
return $source;
}