function _epsacrop_get_uri_from_fid in EPSA Crop - Image Cropping 7.2
Same name and namespace in other branches
- 8.2 epsacrop.module \_epsacrop_get_uri_from_fid()
Try to get the uri from a fid.
@access private
Parameters
mixed $fid:
Return value
void
1 call to _epsacrop_get_uri_from_fid()
- _epsacrop_save_coords in ./
epsacrop.module - Save the coordonates in the database.
File
- ./
epsacrop.module, line 1079 - The main file of module
Code
function _epsacrop_get_uri_from_fid($fid) {
if (!empty($fid) && is_numeric($fid)) {
return (string) db_select('file_managed', 'f')
->fields('f', array(
'uri',
))
->condition('f.fid', $fid)
->range(0, 1)
->execute()
->fetchField();
}
return FALSE;
}