diff --git a/includes/common.inc b/includes/common.inc index c6638dc..f20146f 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -7605,6 +7605,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; }