1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-14 09:32:17 +02:00

Merge pull request #3282 from SimSync/fix_3275

Fixes #3275 Added support for legacy urls of type request.php?download.4
This commit is contained in:
Cameron 2018-07-14 12:52:18 -07:00 committed by GitHub
commit 8fc07a1527
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3486,14 +3486,26 @@ class e107
if(!empty($tmp))
{
parse_str($tmp,$qry);
foreach($qry as $k=>$v)
if (strpos($tmp, '=') === false)
{
if(!isset($options['query'][$k])) // $options['query'] overrides any in the original URL.
// required for legacy urls of type "request.php?download.43"
// @see: issue #3275
$legacyUrl .= '?' . $tmp;
$options['query'] = null;
}
else
{
parse_str($tmp,$qry);
foreach($qry as $k=>$v)
{
$options['query'][$k] = $v;
if(!isset($options['query'][$k])) // $options['query'] overrides any in the original URL.
{
$options['query'][$k] = $v;
}
}
}
}