mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 08:55:15 +02:00
Parameters fix for files.
This allows http://example.com/file.php/1/somefile.swf?a=xxx&b=xxxx Thanks to Bernard Boucher!
This commit is contained in:
parent
a8b1f8623d
commit
d45bd055d7
6
file.php
6
file.php
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user