You are here

function _epsacrop_get_fid_from_path in EPSA Crop - Image Cropping 6

Same name and namespace in other branches
  1. 6.2 epsacrop.module \_epsacrop_get_fid_from_path()
1 call to _epsacrop_get_fid_from_path()
_epsacrop_crop in ./epsacrop.module
Copy of imagecache function

File

./epsacrop.module, line 325
The main file of module

Code

function _epsacrop_get_fid_from_path($path) {
  static $fids = array();
  $fids[$path] = 0;
  if (empty($fids[$path])) {
    $fids[$path] = (int) db_result(db_query_range("SELECT f.fid FROM {files} f LEFT JOIN {epsacrop_files} e ON e.fid = f.fid WHERE f.filepath = '%s' AND e.fid IS NOT NULL", $path, 0, 1));
  }
  return $fids[$path];
}