You are here

function scald_gallery_scald_fetch in Scald: Gallery 7

Same name and namespace in other branches
  1. 7.2 scald_gallery.module \scald_gallery_scald_fetch()

Implements hook_scald_fetch().

File

./scald_gallery.module, line 150
Scald Gallery is a Scald Atom Provider for image galleries.

Code

function scald_gallery_scald_fetch($atom, $type) {
  if ($type == 'atom') {
    $file = $atom->scald_thumbnail[LANGUAGE_NONE][0]['uri'];
    if (file_exists($file)) {
      $atom->file_source = $atom->thumbnail_source = $file;
    }
  }
}