Project

General

Profile

Bug #19625 » 9808_v3.diff

Administrator Admin, 2009-04-09 11:34

View differences:

typo3/sysext/cms/tslib/class.tslib_menu.php (working copy)
$GLOBALS['TSFE']->setJS('openPic');
}
// look for type and popup
if (preg_match('/([0-9]+)?[\s]?(([0-9]+)x([0-9]+))?(:.+)?/s', $LD['target'], $matches)) {
// is type?
if($matches[1]) {
$LD['totalURL'] .= '&type=' . trim($matches[1]);
$LD['target'] = trim(substr($LD['target'], strlen($matches[1]) + 1));
}
// is popup?
if ($matches[3] && $matches[4]) {
$JSparamWH = 'width=' . $matches[3] . ',height=' . $matches[4] . ($matches[5] ? ',' . substr($matches[5], 1) : '');
$onClick = 'vHWin=window.open(\'' . $LD['totalURL'] . '\',\'FEopenLink\',\'' . $JSparamWH . '\');vHWin.focus();return false;';
$LD['target'] = '';
}
}
// out:
$list = array();
$list['HREF'] = strlen($LD['totalURL']) ? $LD['totalURL'] : $GLOBALS['TSFE']->baseUrl; // Added this check: What it does is to enter the baseUrl (if set, which it should for "realurl" based sites) as URL if the calculated value is empty. The problem is that no link is generated with a blank URL and blank URLs might appear when the realurl encoding is used and a link to the frontpage is generated.
(1-1/2)