0005010_3.patch

Administrator Admin, 2007-02-19 11:07

Download (4.05 KB)

View differences:

t3lib/class.t3lib_tstemplate.php (Arbeitskopie)
1374 1374
		$LD['no_cache'] = (trim($page['no_cache']) || $no_cache) ? '&no_cache=1' : '';
1375 1375

  
1376 1376
			// linkVars
1377
		if ($GLOBALS['TSFE']->config['config']['uniqueLinkVars']) {
1378
			if ($addParams) {
1379
				$LD['linkVars'] = t3lib_div::implodeArrayForUrl('',t3lib_div::explodeUrl2Array($GLOBALS['TSFE']->linkVars.$addParams));
1380
			} else {
1381
				$LD['linkVars'] = $GLOBALS['TSFE']->linkVars;
1382
			}
1383
		} else {
1384
			$LD['linkVars'] = $GLOBALS['TSFE']->linkVars.$addParams;
1377
		$LD['linkVars'] = $GLOBALS['TSFE']->linkVars.$addParams;			
1378
		if ($GLOBALS['TSFE']->config['config']['uniqueLinkVars'] && $addParams) {
1379
			$LD['linkVars'] = t3lib_div::implodeArrayForUrl('',t3lib_div::explodeUrl2Array($LD['linkVars']));
1385 1380
		}
1386 1381

  
1387 1382
			// If simulateStaticDocuments is enabled:
typo3/sysext/cms/tslib/class.tslib_pagegen.php (Arbeitskopie)
197 197
		$linkVars = (string)$GLOBALS['TSFE']->config['config']['linkVars'];
198 198
		if ($linkVars)	{
199 199
			$linkVarArr = explode(',',$linkVars);
200
			$linkVars = '';
200 201

  
201
			$GLOBALS['TSFE']->linkVars='';
202 202
			$GET = t3lib_div::_GET();
203 203

  
204 204
			foreach ($linkVarArr as $val)	{
......
213 213
					if (!is_array($GET[$val]))	{
214 214
						$tmpVal = rawurlencode($GET[$val]);
215 215

  
216
						if ($test && !TSpagegen::isAllowedLinkVarValue($tmpVal,$test))	{
216
						if ($val=='cHash') {
217
								// Reusing cHash will not work - if set, remove it here and recreate it later if necessary.
218
							if (isset($tmpVal)) {
219
								$createCHash = true;
220
							}
221
							continue;
222
						} elseif ($test && !TSpagegen::isAllowedLinkVarValue($tmpVal,$test))	{
217 223
							continue;	// Error: This value was not allowed for this key
218 224
						}
219 225

  
......
226 232
					}
227 233
				} else continue;
228 234

  
229
				$GLOBALS['TSFE']->linkVars.= $value;
235
					// Readd the current variable to the linkVars:
236
				$linkVars.= $value;
230 237
			}
231 238
			unset($GET);
239

  
240
				// Recreate cHash if necessary:
241
			if ($linkVars && $createCHash) {
242
					// Get the array with query params, one key is the encryptionKey by default:
243
				$pA = t3lib_div::cHashParams($linkVars);
244
				if (count($pA) > 1) {
245
					$linkVars.= '&cHash='.t3lib_div::shortMD5(serialize($pA));
246
				}
247
			}
248
			$GLOBALS['TSFE']->linkVars = $linkVars;
232 249
		} else {
233
			$GLOBALS['TSFE']->linkVars='';
250
			$GLOBALS['TSFE']->linkVars = '';
234 251
		}
235 252

  
236 253
			// Setting XHTML-doctype from doctype
typo3/sysext/cms/tslib/class.tslib_content.php (Arbeitskopie)
5199 5199
						if (substr($addQueryParams,0,1)!='&')		{
5200 5200
							$addQueryParams = '';
5201 5201
						} elseif ($conf['useCacheHash']) {	// cache hashing:
5202
							$pA = t3lib_div::cHashParams($addQueryParams.$GLOBALS['TSFE']->linkVars);	// Added '.$this->linkVars' dec 2003: The need for adding the linkVars is that they will be included in the link, but not the cHash. Thus the linkVars will always be the problem that prevents the cHash from working. I cannot see what negative implications in terms of incompatibilities this could bring, but for now I hope there are none. So here we go... (- kasper)
5202
							$pA = t3lib_div::cHashParams($GLOBALS['TSFE']->linkVars.$addQueryParams);	// Added '.$this->linkVars' dec 2003: The need for adding the linkVars is that they will be included in the link, but not the cHash. Thus the linkVars will always be the problem that prevents the cHash from working. I cannot see what negative implications in terms of incompatibilities this could bring, but for now I hope there are none. So here we go... (- kasper)
5203 5203
							$addQueryParams.= '&cHash='.t3lib_div::shortMD5(serialize($pA));
5204 5204
						}
5205 5205