Project

General

Profile

Bug #14547 » bug772.diff

Administrator Admin, 2005-05-22 22:23

View differences:

TYPO3core.new/t3lib/class.t3lib_div.php 2005-05-22 21:10:04.000000000 +0200
$str = t3lib_div::implodeArrayForUrl($thisKeyName,$AVal,$str,$skipBlank,$rawurlencodeParamName);
} else {
if (!$skipBlank || strcmp($AVal,'')) {
$str.='&'.($rawurlencodeParamName ? rawurlencode($thisKeyName) : $thisKeyName).
$str.='&'.($rawurlencodeParamName ? rawurlencode($thisKeyName) : $thisKeyName).
'='.rawurlencode($AVal);
}
}
......
return $tempGetVars;
} else {
$output = array();
$p = explode('&',$string);
$p = preg_split('/&(amp;)?/',$string);
foreach($p as $v) {
if (strlen($v)) {
list($pK,$pV) = explode('=',$v,2);
......
* @see tslib_fe::makeCacheHash(), tslib_cObj::typoLink()
*/
function cHashParams($addQueryParams) {
$params = explode('&',substr($addQueryParams,1)); // Splitting parameters up
$params = preg_split('/&(amp;)?/',substr($addQueryParams,1)); // Splitting parameters up
// Make array:
$pA = array();
TYPO3core.new/typo3/sysext/cms/tslib/class.tslib_content.php 2005-05-22 21:10:04.000000000 +0200
$LD = $GLOBALS['TSFE']->tmpl->linkData($GLOBALS['TSFE']->page,$conf['target'],1,'', '', $this->getClosestMPvalueForPage($GLOBALS['TSFE']->page['uid']));
$targetPart = $LD['target'] ? ' target="'.htmlspecialchars($LD['target']).'"' : '';
$urlParams = $this->URLqMark($LD['totalURL'],
'&sword='.rawurlencode(t3lib_div::_GP('sword')).
'&scols='.rawurlencode(t3lib_div::_GP('scols')).
'&stype='.rawurlencode(t3lib_div::_GP('stype')).
'&scount='.$total);
'&sword='.rawurlencode(t3lib_div::_GP('sword')).
'&scols='.rawurlencode(t3lib_div::_GP('scols')).
'&stype='.rawurlencode(t3lib_div::_GP('stype')).
'&scount='.$total);
// substitution:
$result= $this->cObjGetSingle($conf['layout'],$conf['layout.'], 'layout');
$result = str_replace('###RANGELOW###',$rangeLow,$result);
......
if ($rangeHigh<$total) {
$next = $this->cObjGetSingle($conf['next'], $conf['next.'], 'next');
$next = '<a href="'.htmlspecialchars($urlParams.'&spointer='.($spointer+$theRange)).'"'.$targetPart.$GLOBALS['TSFE']->ATagParams.'>'.$next.'</a>';
$next = '<a href="'.htmlspecialchars($urlParams.'&amp;spointer='.($spointer+$theRange)).'"'.$targetPart.$GLOBALS['TSFE']->ATagParams.'>'.$next.'</a>';
} else $next='';
$result = str_replace('###NEXT###',$next,$result);
if ($rangeLow>1) {
$prev = $this->cObjGetSingle($conf['prev'], $conf['prev.'], 'prev');
$prev = '<a href="'.htmlspecialchars($urlParams.'&spointer='.($spointer-$theRange)).'"'.$targetPart.$GLOBALS['TSFE']->ATagParams.'>'.$prev.'</a>';
$prev = '<a href="'.htmlspecialchars($urlParams.'&amp;spointer='.($spointer-$theRange)).'"'.$targetPart.$GLOBALS['TSFE']->ATagParams.'>'.$prev.'</a>';
} else $prev='';
$result = str_replace('###PREV###',$prev,$result);
......
$thumbFile=$thisUrl.$imgConf['3'].'|'.$imgConf[0].'x'.$imgConf[1].'|'.$origDim[0].'x'.$origDim[1].'|'.filesize($imgConf['origFile']).'|'.filemtime($imgConf['origFile']);
// Set url:
$url = $conf['url']
.'&NP[offsite][1]='.rawurlencode($origFile)
.'&NP[offsite_thumb][1]='.rawurlencode($thumbFile);
.'&amp;NP[offsite][1]='.rawurlencode($origFile)
.'&amp;NP[offsite_thumb][1]='.rawurlencode($thumbFile);
$linkCObject = $this->cObjGetSingle($conf['cObject'],$conf['cObject.']);
if ($linkCObject) {
$ATagParams = trim($conf['ATagParams']) ? ' '.trim($conf['ATagParams']) : '';
......
// imageFileLink:
if ($content==$string && @is_file($imageFile)) {
$params = '';
if ($conf['width']) {$params.='&width='.rawurlencode($conf['width']);}
if ($conf['height']) {$params.='&height='.rawurlencode($conf['height']);}
if ($conf['effects']) {$params.='&effects='.rawurlencode($conf['effects']);}
if ($conf['sample']) {$params.='&sample=1';}
if ($conf['alternativeTempPath']) {$params.='&alternativeTempPath='.rawurlencode($conf['alternativeTempPath']);}
if ($conf['bodyTag']) {$params.='&bodyTag='.rawurlencode($conf['bodyTag']);}
if ($conf['title']) {$params.='&title='.rawurlencode($conf['title']);}
if ($conf['wrap']) {$params.='&wrap='.rawurlencode($conf['wrap']);}
if ($conf['width']) {$params.='&amp;width='.rawurlencode($conf['width']);}
if ($conf['height']) {$params.='&amp;height='.rawurlencode($conf['height']);}
if ($conf['effects']) {$params.='&amp;effects='.rawurlencode($conf['effects']);}
if ($conf['sample']) {$params.='&amp;sample=1';}
if ($conf['alternativeTempPath']) {$params.='&amp;alternativeTempPath='.rawurlencode($conf['alternativeTempPath']);}
if ($conf['bodyTag']) {$params.='&amp;bodyTag='.rawurlencode($conf['bodyTag']);}
if ($conf['title']) {$params.='&amp;title='.rawurlencode($conf['title']);}
if ($conf['wrap']) {$params.='&amp;wrap='.rawurlencode($conf['wrap']);}
$md5_value = md5($imageFile.'|'.$conf['width'].'|'.$conf['height'].'|'.$conf['effects'].'|'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'].'|');
$params.= '&md5='.$md5_value;
$params.= '&amp;md5='.$md5_value;
$url = $GLOBALS['TSFE']->absRefPrefix.'showpic.php?file='.rawurlencode($imageFile).$params;
if ($conf['JSwindow.']['altUrl'] || $conf['JSwindow.']['altUrl.']) {
$altUrl = $this->stdWrap($conf['JSwindow.']['altUrl'], $conf['JSwindow.']['altUrl.']);
......
function filelink($theValue, $conf) {
$output = '';
$aTagParams = $GLOBALS['TSFE']->ATagParams.($conf['ATagParams']?' '.$conf['ATagParams']:'');
$initP = '?id='.$GLOBALS['TSFE']->id.'&type='.$GLOBALS['TSFE']->type;
$initP = '?id='.$GLOBALS['TSFE']->id.'&amp;type='.$GLOBALS['TSFE']->type;
$conf['path'] = $this->stdWrap($conf['path'],$conf['path.']);
$theFile = trim($conf['path']).$theValue;
if (@is_file($theFile)) {
$theFileEnc = str_replace('%2F', '/', rawurlencode($theFile));
$locDataAdd = $conf['jumpurl.']['secure'] ? $this->locDataJU($theFileEnc,$conf['jumpurl.']['secure.']) : '';
$url = ($conf['jumpurl']) ? $GLOBALS['TSFE']->config['mainScript'].$initP.'&jumpurl='.rawurlencode($theFileEnc).$locDataAdd.$GLOBALS['TSFE']->getMethodUrlIdToken : $theFileEnc; // && $GLOBALS['TSFE']->config['config']['jumpurl_enable']
$url = ($conf['jumpurl']) ? $GLOBALS['TSFE']->config['mainScript'].$initP.'&amp;jumpurl='.rawurlencode($theFileEnc).$locDataAdd.$GLOBALS['TSFE']->getMethodUrlIdToken : $theFileEnc; // && $GLOBALS['TSFE']->config['config']['jumpurl_enable']
$theLinkWrap = '<a href="'.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.$url).'"'.($conf['target']?' target="'.$conf['target'].'"':'').$aTagParams.'>|</a>';
$theSize = filesize($theFile);
......
if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['thumbnails']) {
$thumbSize = '';
if ($conf['icon_thumbSize'] || $conf['icon_thumbSize.']) { $thumbSize = '&size='.$this->stdWrap($conf['icon_thumbSize'], $conf['icon_thumbSize.']); }
$icon = 't3lib/thumbs.php?&dummy='.$GLOBALS['EXEC_TIME'].'&file='.rawurlencode('../'.$theFile).$thumbSize;
$icon = 't3lib/thumbs.php?dummy='.$GLOBALS['EXEC_TIME'].'&amp;file='.rawurlencode('../'.$theFile).$thumbSize;
} else {
$icon = 't3lib/gfx/notfound_thumb.gif';
}
......
while(list(,$v)=each($mimeTypes)) {
$parts = explode('=',$v,2);
if (strtolower($fI['extension']) == strtolower(trim($parts[0]))) {
$mimetype = '&mimeType='.rawurlencode(trim($parts[1]));
$mimetype = '&amp;mimeType='.rawurlencode(trim($parts[1]));
}
}
}
$locationData = $GLOBALS['TSFE']->id.':'.$this->currentRecord;
$rec='&locationData='.rawurlencode($locationData);
$rec='&amp;locationData='.rawurlencode($locationData);
$hArr = array(
$jumpUrl,
$locationData,
$GLOBALS['TSFE']->TYPO3_CONF_VARS['SYS']['encryptionKey']
);
$juHash='&juHash='.t3lib_div::shortMD5(serialize($hArr));
return '&juSecure=1'.$mimetype.$rec.$juHash;
$juHash='&amp;juHash='.t3lib_div::shortMD5(serialize($hArr));
return '&amp;juSecure=1'.$mimetype.$rec.$juHash;
}
/**
......
$textpieces = explode('http://', $data);
$pieces = count($textpieces);
$textstr = $textpieces[0];
$initP = '?id='.$GLOBALS['TSFE']->id.'&type='.$GLOBALS['TSFE']->type;
$initP = '?id='.$GLOBALS['TSFE']->id.'&amp;type='.$GLOBALS['TSFE']->type;
for($i=1; $i<$pieces; $i++) {
$len=strcspn($textpieces[$i],chr(32).chr(9).chr(13).chr(10));
if (trim(substr($textstr,-1))=='' && $len) {
......
$target = isset($conf['extTarget']) ? $conf['extTarget'] : $GLOBALS['TSFE']->extTarget;
if ($GLOBALS['TSFE']->config['config']['jumpurl_enable']) {
$res = '<a'.
' href="'.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.$GLOBALS['TSFE']->config['mainScript'].$initP.'&jumpurl='.rawurlencode('http://'.$parts[0]).$GLOBALS['TSFE']->getMethodUrlIdToken).'"'.
' href="'.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.$GLOBALS['TSFE']->config['mainScript'].$initP.'&amp;jumpurl='.rawurlencode('http://'.$parts[0]).$GLOBALS['TSFE']->getMethodUrlIdToken).'"'.
($target ? ' target="'.$target.'"' : '').
$aTagParams.
'>';
......
$textpieces = explode('mailto:', $data);
$pieces = count($textpieces);
$textstr = $textpieces[0];
$initP = '?id='.$GLOBALS['TSFE']->id.'&type='.$GLOBALS['TSFE']->type;
$initP = '?id='.$GLOBALS['TSFE']->id.'&amp;type='.$GLOBALS['TSFE']->type;
for($i=1; $i<$pieces; $i++) {
$len = strcspn($textpieces[$i],chr(32).chr(9).chr(13).chr(10));
if (trim(substr($textstr,-1))=='' && $len) {
......
$link_param = trim($this->stdWrap($conf['parameter'],$conf['parameter.']));
$sectionMark = trim($this->stdWrap($conf['section'],$conf['section.']));
$sectionMark = $sectionMark ? '#'.$sectionMark : '';
$initP = '?id='.$GLOBALS['TSFE']->id.'&type='.$GLOBALS['TSFE']->type;
$initP = '?id='.$GLOBALS['TSFE']->id.'&amp;type='.$GLOBALS['TSFE']->type;
$this->lastTypoLinkUrl = '';
$this->lastTypoLinkTarget = '';
if ($link_param) {
......
if ($linktxt=='') $linktxt = $link_param;
if (!$pU['scheme']) {$scheme='http://';} else {$scheme='';}
if ($GLOBALS['TSFE']->config['config']['jumpurl_enable']) {
$this->lastTypoLinkUrl = $GLOBALS['TSFE']->absRefPrefix.$GLOBALS['TSFE']->config['mainScript'].$initP.'&jumpurl='.rawurlencode($scheme.$link_param).$GLOBALS['TSFE']->getMethodUrlIdToken;
$this->lastTypoLinkUrl = $GLOBALS['TSFE']->absRefPrefix.$GLOBALS['TSFE']->config['mainScript'].$initP.'&amp;jumpurl='.rawurlencode($scheme.$link_param).$GLOBALS['TSFE']->getMethodUrlIdToken;
} else {
$this->lastTypoLinkUrl = $scheme.$link_param;
}
......
if (@file_exists(rawurldecode($splitLinkParam[0])) || $isLocalFile) {
if ($linktxt=='') $linktxt = rawurldecode($link_param);
if ($GLOBALS['TSFE']->config['config']['jumpurl_enable']) {
$this->lastTypoLinkUrl = $GLOBALS['TSFE']->absRefPrefix.$GLOBALS['TSFE']->config['mainScript'].$initP.'&jumpurl='.rawurlencode($link_param).$GLOBALS['TSFE']->getMethodUrlIdToken;
$this->lastTypoLinkUrl = $GLOBALS['TSFE']->absRefPrefix.$GLOBALS['TSFE']->config['mainScript'].$initP.'&amp;jumpurl='.rawurlencode($link_param).$GLOBALS['TSFE']->getMethodUrlIdToken;
} else {
$this->lastTypoLinkUrl = $GLOBALS['TSFE']->absRefPrefix.$link_param;
}
......
$addQueryParams = '';
} elseif ($conf['useCacheHash']) { // cache hashing:
$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)
$addQueryParams.= '&cHash='.t3lib_div::shortMD5(serialize($pA));
$addQueryParams.= '&amp;cHash='.t3lib_div::shortMD5(serialize($pA));
}
// Add "&MP" var:
if (count($MPvarAcc)) {
$addQueryParams.= '&MP='.rawurlencode(implode(',',$MPvarAcc));
$addQueryParams.= '&amp;MP='.rawurlencode(implode(',',$MPvarAcc));
}
// If other domain, overwrite
if ($tCR_domain) {
......
}
}
return !$raw ? ($MP ? '&MP='.rawurlencode($MP) : '') : $MP;
return !$raw ? ($MP ? '&amp;MP='.rawurlencode($MP) : '') : $MP;
}
/**
......
$theCompURL.='.html?';
}
} else {
$theCompURL = $GLOBALS['TSFE']->config['mainScript'].'?id='.$GLOBALS['TSFE']->page['uid'].'&type='.intval($typeNum);
$theCompURL = $GLOBALS['TSFE']->config['mainScript'].'?id='.$GLOBALS['TSFE']->page['uid'].'&amp;type='.intval($typeNum);
}
// Add absRefPrefix if exists.
$finalURL = $GLOBALS['TSFE']->absRefPrefix.$theCompURL.($setup['options']?'&'.$setup['options']:'').$GLOBALS['TSFE']->linkVars.$GLOBALS['TSFE']->getMethodUrlIdToken.($GLOBALS['TSFE']->no_cache?'&no_cache=1':'');
$finalURL = $GLOBALS['TSFE']->absRefPrefix.$theCompURL.($setup['options']?'&amp;'.$setup['options']:'').$GLOBALS['TSFE']->linkVars.$GLOBALS['TSFE']->getMethodUrlIdToken.($GLOBALS['TSFE']->no_cache?'&amp;no_cache=1':'');
$finalURL = $GLOBALS['TSFE']->tmpl->removeQueryString($finalURL);
*/
// From 3.6.0, use "linkData" for ALL links:
$LD = $GLOBALS['TSFE']->tmpl->linkData($GLOBALS['TSFE']->page,'',$GLOBALS['TSFE']->no_cache,'','',($setup['options']?'&'.$setup['options']:'').$GLOBALS['TSFE']->cObj->getClosestMPvalueForPage($GLOBALS['TSFE']->page['uid']), intval($typeNum));
$LD = $GLOBALS['TSFE']->tmpl->linkData($GLOBALS['TSFE']->page,'',$GLOBALS['TSFE']->no_cache,'','',($setup['options']?'&amp;'.$setup['options']:'').$GLOBALS['TSFE']->cObj->getClosestMPvalueForPage($GLOBALS['TSFE']->page['uid']), intval($typeNum));
$finalURL = $LD['totalURL'];
TYPO3core.new/typo3/sysext/cms/tslib/class.tslib_fe.php 2005-05-22 21:10:04.000000000 +0200
*/
function setIDfromArgV() {
if (!$this->id) {
list($theAlias) = explode('&',t3lib_div::getIndpEnv('QUERY_STRING'));
list($theAlias) = explode('&amp;',t3lib_div::getIndpEnv('QUERY_STRING'));
$theAlias = trim($theAlias);
$this->id = $theAlias ? $theAlias : 0;
}
......
$TSConf = $this->getPagesTSconfig();
if ($TSConf['TSFE.']['jumpUrl_transferSession']) {
$uParts = parse_url($this->jumpurl);
$params = '&FE_SESSION_KEY='.rawurlencode($this->fe_user->id.'-'.md5($this->fe_user->id.'/'.$this->TYPO3_CONF_VARS['SYS']['encryptionKey']));
$params = '&amp;FE_SESSION_KEY='.rawurlencode($this->fe_user->id.'-'.md5($this->fe_user->id.'/'.$this->TYPO3_CONF_VARS['SYS']['encryptionKey']));
$this->jumpurl.=($uParts['query']?'':'?').$params; // Add the session parameter ...
}
Header('Location: '.$this->jumpurl);
......
function simulateStaticDocuments_pEnc_onlyP_proc($linkVars) {
$remainLinkVars = '';
if (strcmp($linkVars,'')) {
$p = explode('&',$linkVars);
$p = preg_split('/&(amp;)?/',$linkVars);
sort($p); // This sorts the parameters - and may not be needed and further it will generate new MD5 hashes in many cases. Maybe not so smart. Hmm?
$rem = array();
foreach($p as $k => $v) {
......
} else unset($p[$k]);
}
$linkVars = count($p) ? '&'.implode('&',$p) : '';
$remainLinkVars = count($rem) ? '&'.implode('&',$rem) : '';
$linkVars = count($p) ? '&amp;'.implode('&amp;',$p) : '';
$remainLinkVars = count($rem) ? '&amp;'.implode('&amp;',$rem) : '';
}
return array($linkVars, $remainLinkVars);
}
TYPO3core.new/typo3/sysext/cms/tslib/class.tslib_menu.php 2005-05-22 21:10:04.000000000 +0200
array_merge($currentPageWithNoOverlay, $lRecs),
array(
'ITEM_STATE' => $iState,
'_ADD_GETVARS' => '&L='.$sUid,
'_ADD_GETVARS' => '&amp;L='.$sUid,
'_SAFE' => TRUE
)
);
......
$olRec = $GLOBALS['TSFE']->sys_page->getPageOverlay($data['uid'], $Lvar);
if (!count($olRec)) {
// If no pages_language_overlay record then page can NOT be accessed in the language pointed to by "&L" and therefore we protect the link by setting "&L=0"
$data['_ADD_GETVARS'].= '&L=0';
$data['_ADD_GETVARS'].= '&amp;L=0';
}
}
}
......
// Mount points:
$MP_var = $this->getMPvar($key);
$MP_params = $MP_var ? '&MP='.rawurlencode($MP_var) : '';
$MP_params = $MP_var ? '&amp;MP='.rawurlencode($MP_var) : '';
// Setting override ID
if ($this->mconf['overrideId'] || $this->menuArr[$key]['overrideId']) {
......
// Set "&MP=" var:
$MP_var = implode(',',$MP_array);
$MP_params = $MP_var ? '&MP='.rawurlencode($MP_var) : '';
$MP_params = $MP_var ? '&amp;MP='.rawurlencode($MP_var) : '';
// UIDs to ban:
$banUidArray=array();
(6-6/6)