Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Parameters fix for files.
This allows

   http://example.com/file.php/1/somefile.swf?a=xxx&b=xxxx

Thanks to Bernard Boucher!
  • Loading branch information
moodler committed May 1, 2004
1 parent a8b1f86 commit d45bd05
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions file.php
Expand Up @@ -41,7 +41,13 @@
// it's OK to get here if no course was specified

$pathname = "$CFG->dataroot$pathinfo";
if ($pathargs = explode("?",$pathname)) {
$pathname = $pathargs[0]; // Only keep what's before the '?'
}
$filename = $args[$numargs-1];
if ($fileargs = explode("?",$filename)) {
$filename = $fileargs[0]; // Only keep what's before the '?'
}

if (file_exists($pathname)) {
$lastmodified = filemtime($pathname);
Expand Down

0 comments on commit d45bd05

Please sign in to comment.