Skip to content
Snippets Groups Projects
Commit 739d40de authored by Alex Barth's avatar Alex Barth
Browse files

Clarify that file path is TEMPORARY. Use empty() to check for presence of filepath, not isset().

parent 759e58ff
No related branches found
No related tags found
No related merge requests found
...@@ -155,14 +155,15 @@ class FeedsEnclosure extends FeedsElement { ...@@ -155,14 +155,15 @@ class FeedsEnclosure extends FeedsElement {
/** /**
* @return * @return
* The file path to the downloaded resource referenced by the enclosure. * A temporary file path to the downloaded resource referenced by the
* Downloads resource if not downloaded yet. * enclosure. Downloads resource if not downloaded yet. The file path is
* valid for the time of the page load.
* *
* @todo Get file extension from mime_type. * @todo Get file extension from mime_type.
* @todo This is not concurrency safe. * @todo This is not concurrency safe.
*/ */
public function getFile() { public function getFile() {
if(!isset($this->file) && $this->getValue()) { if(empty($this->file) && $this->getValue()) {
$filename = basename($this->getValue()); $filename = basename($this->getValue());
if (module_exists('transliteration')) { if (module_exists('transliteration')) {
require_once (drupal_get_path('module', 'transliteration') . '/transliteration.inc'); require_once (drupal_get_path('module', 'transliteration') . '/transliteration.inc');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment