Hello,
the provider of my Drupal 6 (latest, greatest) site doesn't allow clean urls (costs extra :-( ) so I can't use them.
For security reasons I want to /need to set the download method to "private".
This results in media URLs that containt the "?q=" portion that tells drupal the action gets replaced by the code in
function _swftools_get_flashvars_string(&$flashvars) {
foreach ($flashvars AS $var => $value) {
$flashvars[$var] = str_replace(array('&', '=', '?'), array('%26', '%3D', '%3F'), $value);
}
from ?q= to %3Fq%3D.
However, some code (I haven't figured out which) will replace this again to %253Fq%253D so the player cannot find the file anymore.
If I comment out the replacements in function _swftools_get_flashvars_string(&$flashvars) everything works fine, since the second replacement takes care of the ?q= to %3Fq%3D conversion anyways. So I wonder, why the replacement in this function is needed anymore, or where I'll break the code elsewhere if I modify this.
Tilman
but I wonder what else will break then.
Comments
Comment #1
skybow commented[Update]
I just did some more debugging. Here I what I got:
The double replacements takes place in
drupal_query_string_encode($flashvars).I added the following line to compensate this:
Could someone please check on this?
Comment #2
mafet commentedbeen looking for this fix as well thanx skybow... it works on my test site as well....