Bug #20542 » 11239_01_content.diff
typo3/sysext/cms/tslib/class.tslib_content.php (working copy) | ||
---|---|---|
}
|
||
$q_in = array();
|
||
// explode never returns an empty array, so check in advance
|
||
if ($queryString) {
|
||
foreach (explode('&', $queryString) as $arg) {
|
||
list($k,$v) = explode('=', $arg);
|
||
$q_in[$k] = $v;
|
||
}
|
||
$q_in = t3lib_div::explodeUrl2Array($queryString, TRUE);
|
||
}
|
||
$rawValues = TRUE;
|
||
}
|
||
if ($conf['exclude']) {
|
||
$q_out = array();
|
||
$exclude = t3lib_div::trimExplode(',', $conf['exclude']);
|
||
$exclude[] = 'id'; // never repeat id
|
||
foreach ($q_in as $k => $v) {
|
||
if (!in_array($k, $exclude)) {
|
||
if (isset($overruleQueryArgs[$k])) {
|
||
$v = $overruleQueryArgs[$k];
|
||
unset($overruleQueryArgs[$k]);
|
||
}
|
||
$q_out[$k] = $v;
|
||
}
|
||
}
|
||
// any remaining overrule arguments?
|
||
if ($forceArgs) {
|
||
foreach ($overruleQueryArgs as $k => $v) {
|
||
$q_out[$k] = $v;
|
||
}
|
||
}
|
||
$exclude = implode('&', $exclude);
|
||
$exclude = t3lib_div::explodeUrl2Array($exclude, TRUE);
|
||
$exclude['id'] = 0; // never repeat id
|
||
$q_in = t3lib_div::array_merge_recursive_overrule($q_in, $overruleQueryArgs);
|
||
$q_out = t3lib_div::arrayDiffRecursive($q_in, $exclude);
|
||
} else {
|
||
$q_out = &$q_in;
|
||
}
|
||
$content = '';
|
||
if ($rawValues) {
|
||
foreach ($q_out as $k => $v) {
|
||
$content .= '&'.$k.'='.$v;
|
||
}
|
||
} else {
|
||
$content = t3lib_div::implodeArrayForUrl('',$q_out);
|
||
}
|
||
$content = t3lib_div::implodeArrayForUrl('', $q_out);
|
||
return $content;
|
||
}
|