You are here

protected function FeedsProcessor::getHash in Feeds 7.2

Retrieves the MD5 hash of $entity_id from the database.

Return value

string Empty string if no item is found, hash otherwise.

1 call to FeedsProcessor::getHash()
FeedsProcessor::process in plugins/FeedsProcessor.inc
Process the result of the parsing stage.

File

plugins/FeedsProcessor.inc, line 1395
Contains FeedsProcessor and related classes.

Class

FeedsProcessor
Abstract class, defines interface for processors.

Code

protected function getHash($entity_id) {
  if ($hash = db_query("SELECT hash FROM {feeds_item} WHERE entity_type = :type AND entity_id = :id", array(
    ':type' => $this
      ->entityType(),
    ':id' => $entity_id,
  ))
    ->fetchField()) {

    // Return with the hash.
    return $hash;
  }
  return '';
}