Hello, there is a small bug in the swftools.module, if the filename has a query string, the swftools_get_action function will not return the good action because of the file's extension.

To correct this bug, replace in swftools.module at line 642 :

function swftools_get_action($file) {

by :


function swftools_get_action($file) {
  // If query string, get it's position
  if (($q = strpos($file, '?')) !== FALSE) {
    $file = substr($file, 0, $q);
  }

And use the stream variable in othervars when you call swf else the filename will be reset.

CommentFileSizeAuthor
#1 swftools-582742.patch741 bytesKars-T
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Kars-T’s picture

Status: Active » Needs review
FileSize
741 bytes

Resubmitting as patch.

The code is basically the same as here:
http://de3.php.net/manual/en/function.pathinfo.php#88654

I have this runnig at my flash game site > 4.000 Users a day so I believe its okay.

Please add this to the module!

webmasterkai’s picture

Status: Needs review » Reviewed & tested by the community

I have tested against 6.x-2.5 and 6.x-3.0-beta4

I'd like to see this added too.