When I set up my Drupal-based website I discovered that Flashy player
didn't work for languages other than English because the player was
trying to download non-existing url like
http:////sites/default/files/test.m4v
rather than
http:///sites/default/files/test.m4v
The quick fix follows but it is rather hard-coded to use English. I
though that you would probably like to apply a generic fix for this
issue and put it into the project's code.
Thanks,
Alex.
File: flashy.wrapper.inc
/**
* Gets the path to the file, as a fully qualified path.
*
*/
public function getMediaUrl() {
if ($this->playlist) {
return url($this->playlist, array('absolute' => TRUE));
}
if (count($this->paths) > 1) {
// Do something with dynamic playlists.
}
else {
return url($this->paths[0], array('absolute' => TRUE, 'language' =>
'en')); // fix for multilingual setup
}
}
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | flashy-file_create_url.patch | 850 bytes | floretan |
Comments
Comment #1
svet007 commentedSorry this should look like the following:
When I set up my Drupal-based website I discovered that Flashy player
didn't work for languages other than English because the player was
trying to download non-existing url like
http://[domain]/[lang]/sites/default/files/test.m4v
rather than
http://[domain]/sites/default/files/test.m4v
The quick fix follows but it is rather hard-coded to use English. I
though that you would probably like to apply a generic fix for this
issue and put it into the project's code.
Thanks,
Alex.
File: flashy.wrapper.inc
/**
* Gets the path to the file, as a fully qualified path.
*
*/
public function getMediaUrl() {
if ($this->playlist) {
return url($this->playlist, array('absolute' => TRUE));
}
if (count($this->paths) > 1) {
// Do something with dynamic playlists.
}
else {
return url($this->paths[0], array('absolute' => TRUE, 'language' =>
'en')); // fix for multilingual setup
}
}
Comment #2
floretan commentedfile_create_url()should be used instead ofurl(), leaving the URL unaffected by language prefixes or PURL.This should also solve #733260: Open Atrium PURL base URL problem.