diff --git includes/common.inc includes/common.inc index eb68850..e22c245 100644 --- includes/common.inc +++ includes/common.inc @@ -7561,6 +7561,15 @@ function entity_uri($entity_type, $entity) { $entity->uri = FALSE; } } + if ($entity_type == 'file') { + if ($uri = file_create_url($entity->uri)) { + return array( + 'path' => $uri, + 'options' => array(), + ); + } + return FALSE; + } return $entity->uri ? $entity->uri : NULL; }