function _epsacrop_get_coords_from_fid in EPSA Crop - Image Cropping 7.2
Same name and namespace in other branches
- 8.2 epsacrop.module \_epsacrop_get_coords_from_fid()
- 6.2 epsacrop.module \_epsacrop_get_coords_from_fid()
- 6 epsacrop.module \_epsacrop_get_coords_from_fid()
Get all coordonates for one file.
@access private
Parameters
int $fid:
Return value
array
3 calls to _epsacrop_get_coords_from_fid()
- epsacrop_ajax in ./
epsacrop.module - epsacrop_ajax function.
- epsacrop_crop_image in ./
epsacrop.module - Apply the effect to the image.
- epsacrop_dialog in ./
epsacrop.module - epsacrop_dialog function.
File
- ./
epsacrop.module, line 1028 - The main file of module
Code
function _epsacrop_get_coords_from_fid($fid) {
$files =& drupal_static(__FUNCTION__);
if (empty($files[$fid])) {
$files[$fid] = new stdClass();
$has_coords = _epsacrop_fid_exists($fid);
if ($has_coords != 0) {
$result = db_select('epsacrop_files', 'e')
->fields('e', array(
'coords',
))
->condition('e.fid', $fid)
->execute()
->fetchField();
$files[$fid] = unserialize($result);
}
return $files[$fid];
}
return $files[$fid];
}