You are here

function object_log_retrieve in Object Log 7

Same name and namespace in other branches
  1. 8 object_log.module \object_log_retrieve()

Retrieve an object row from the object log.

Parameters

$label: The label of an object to be retrieved.

Return value

The database row as a fetched object. $log->data contains the actual stored object.

1 call to object_log_retrieve()
object_log_build_object in ./object_log.admin.inc
Build a render array for a stored object.

File

./object_log.module, line 56

Code

function object_log_retrieve($label) {
  $result = db_query('SELECT label, data, created FROM {object_log} WHERE label = :label', array(
    ':label' => $label,
  ));
  $log = $result
    ->fetchObject();
  if (empty($log->data)) {
    return FALSE;
  }
  $log->data = unserialize($log->data);
  return $log;
}