Project

General

Profile

Bug #14547 » class.tslib_content.php.amp.patch

Administrator Admin, 2005-05-18 14:39

View differences:

class.tslib_content.php 2005-05-18 14:34:50.869631832 +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);
......
$icon = $this->cObjGetSingle($conf['iconCObject'],$conf['iconCObject.'],'iconCObject');
} else {
if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['thumbnails']) {
$icon = 't3lib/thumbs.php?&dummy='.$GLOBALS['EXEC_TIME'].'&file='.rawurlencode('../'.$theFile);
$icon = 't3lib/thumbs.php?dummy='.$GLOBALS['EXEC_TIME'].'&amp;file='.rawurlencode('../'.$theFile);
} 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) {
......
}
}
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'];
(2-2/6)