You are here

function _drupagram_load_data in Drupagram 7

Fetches a path from the drupagram_local_image table.

1 call to _drupagram_load_data()
drupagram_local_image in ./drupagram.module
Retrieves a local fid of a remote image. Attempts to save it if none is found.

File

./drupagram.module, line 377
Provides API integration with the Instagram microblogging service.

Code

function _drupagram_load_data($path) {
  $query = db_select('drupagram_local_image', 'dli')
    ->fields('dli')
    ->condition('path', substr($path, 0, 255))
    ->execute()
    ->fetchAllAssoc('path');
  if (!empty($query)) {
    $record = array_shift($query);
    return unserialize($record->file_object);
  }
  return FALSE;
}