[TYPO3-core] RFC: fix for bug #2592
Wolfgang Klinger
wolfgang at stufenlos.net
Mon Feb 20 13:23:54 CET 2006
*hiya!*
On Mon, 20 Feb 2006, Franz Holzinger wrote the following:
> When I read the name of the function 'checkJumpUrl' I think this
> function should only do a check.
>
> With your line this is also changing a local variable which it should
> check only.
>
> So please make this change somewhere else or rename the function.
Funny comment. It sounds like I invented this stuff.
I simply did take a look at previous sources and re-added the missing
lines.
We would have to add a new method "setExternalJumpUrl" and rename
"checkJumpUrl" to "checkJumpUrlReferer" (as it does nothing else than
that) and change some other files where "checkJumpUrl" is used.
--------
/**
* Sets the jumpurl for page type "External URL"
*
* @return void
*/
function setExternalJumpUrl() {
if ($extUrl = $this->sys_page->getExtURL($this->page, $this->config['config']['disablePageExternalUrl'])) {
$this->jumpurl = $extUrl;
}
}
/**
* Checks the jumpurl referer if required
*
* @return void
*/
function checkJumpUrlReferer() {
if (strcmp($this->jumpurl,'') && !$this->TYPO3_CONF_VARS['SYS']['doNotCheckReferer']) {
$referer = parse_url(t3lib_div::getIndpEnv('HTTP_REFERER'));
if (!( $referer['host'] == t3lib_div::getIndpEnv('TYPO3_HOST_ONLY'))) {
unset($this->jumpurl);
}
}
}
--------
I need a decision here to fix the bug, tia.
bye
Wolfgang
More information about the TYPO3-team-core
mailing list