Project

General

Profile

Bug #16599 ยป 4290.patch

Administrator Admin, 2006-09-27 17:30

View differences:

class.tslib_content.new.php Wed Sep 27 17:23:37 2006
function cImage($file,$conf) {
$info = $this->getImgResource($file,$conf['file.']);
$GLOBALS['TSFE']->lastImageInfo=$info;
if (is_array($info)) {
$info[3] = t3lib_div::png_to_gif_by_imagemagick($info[3]);
$GLOBALS['TSFE']->imagesOnPage[]=$info[3]; // This array is used to collect the image-refs on the page...
if (is_array($info)) {
if ($info[3]) {
$info[3] = t3lib_div::png_to_gif_by_imagemagick($info[3]);
$GLOBALS['TSFE']->imagesOnPage[]=$info[3]; // This array is used to collect the image-refs on the page...
if (!strlen($conf['altText']) && !is_array($conf['altText.'])) { // Backwards compatible:
$conf['altText'] = $conf['alttext'];
$conf['altText.'] = $conf['alttext.'];
}
$altParam = $this->getAltParam($conf);
if (!strlen($conf['altText']) && !is_array($conf['altText.'])) { // Backwards compatible:
$conf['altText'] = $conf['alttext'];
$conf['altText.'] = $conf['alttext.'];
}
$altParam = $this->getAltParam($conf);
$theValue = '<img src="'.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.t3lib_div::rawUrlEncodeFP($info[3])).'" width="'.$info[0].'" height="'.$info[1].'"'.$this->getBorderAttr(' border="'.intval($conf['border']).'"').($conf['params']?' '.$conf['params']:'').($altParam).' />';
if ($conf['linkWrap']) {
$theValue = $this->linkWrap($theValue,$conf['linkWrap']);
} elseif ($conf['imageLinkWrap']) {
$theValue = $this->imageLinkWrap($theValue,$info['origFile'],$conf['imageLinkWrap.']);
$theValue = '<img src="'.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.t3lib_div::rawUrlEncodeFP($info[3])).'" width="'.$info[0].'" height="'.$info[1].'"'.$this->getBorderAttr(' border="'.intval($conf['border']).'"').($conf['params']?' '.$conf['params']:'').($altParam).' />';
if ($conf['linkWrap']) {
$theValue = $this->linkWrap($theValue,$conf['linkWrap']);
} elseif ($conf['imageLinkWrap']) {
$theValue = $this->imageLinkWrap($theValue,$info['origFile'],$conf['imageLinkWrap.']);
}
return $this->wrap($theValue,$conf['wrap']);
}
return $this->wrap($theValue,$conf['wrap']);
}
}
/**
    (1-1/1)