[TYPO3-core] RFC: fix for bug #2592
Wolfgang Klinger
wolfgang at stufenlos.net
Mon Feb 20 14:13:08 CET 2006
*hiya!*
On Mon, 20 Feb 2006, Wolfgang Klinger wrote the following:
> Type: bugfix
>
> Page type "External URL" causes an error (PHP header warning)
> BT reference: http://bugs.typo3.org/view.php?id=2592
>
> This bug is caused by changes of "stanrolland" on Feb 10 17:09:34,
> so please Stanislas take an indepth look at it.
> (http://cvs.sourceforge.net/viewcvs.py/typo3/TYPO3core/typo3/sysext/cms/tslib/class.tslib_fe.php?r1=1.104.2.8&r2=1.104.2.9)
>
@see Franz's comments
and the attached patches.
bye
Wolfgang
-------------- next part --------------
--- TYPO3core/t3lib/class.t3lib_page.php 2006-02-02 08:40:54.000000000 +0100
+++ TYPO3core_testing/t3lib/class.t3lib_page.php 2006-02-20 13:57:59.000000000 +0100
@@ -654,7 +654,7 @@
* @param array The page row to return URL type for
* @param boolean A flag to simply disable any output from here.
* @return string The URL type from $this->urltypes array. False if not found or disabled.
- * @see tslib_fe::checkJumpUrl()
+ * @see tslib_fe::setExternalJumpUrl()
*/
function getExtURL($pagerow,$disable=0) {
if ($pagerow['doktype']==3 && !$disable) {
--- TYPO3core/typo3/sysext/cms/tslib/class.tslib_fe.php 2006-02-20 12:33:02.000000000 +0100
+++ TYPO3core_testing/typo3/sysext/cms/tslib/class.tslib_fe.php 2006-02-20 14:00:06.000000000 +0100
@@ -95,7 +95,8 @@
* 1949: function locDataCheck($locationData)
* 1965: function sendFormmail()
* 2016: function extractRecipientCopy($bodytext)
- * 2031: function checkJumpUrl()
+ * 2116: function setExternalJumpUrl()
+ * 2126: function checkJumpUrlReferer()
* 2113: function jumpUrl()
* 2157: function setUrlIdToken()
*
@@ -2108,11 +2109,22 @@
}
/**
- * Checks if jumpurl is set.
+ * Sets the jumpurl for page type "External URL"
*
* @return void
*/
- function checkJumpUrl() {
+ 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'))) {
@@ -2128,9 +2140,7 @@
* @return void
*/
function jumpUrl() {
- if ($extUrl=$this->sys_page->getExtURL($this->page,$this->config['config']['disablePageExternalUrl'])) {
- $this->jumpurl = $extUrl;
- }
+ $this->setExternalJumpUrl();
if ($this->jumpurl) {
if (t3lib_div::_GP('juSecure')) {
$hArr = array(
--- TYPO3core/typo3/sysext/cms/tslib/index_ts.php 2006-02-20 12:32:38.000000000 +0100
+++ TYPO3core_testing/typo3/sysext/cms/tslib/index_ts.php 2006-02-20 13:16:25.000000000 +0100
@@ -385,7 +385,8 @@
// ********************************
// Check JumpUrl
// *******************************
-$TSFE->checkJumpUrl();
+$TSFE->setExternalJumpUrl();
+$TSFE->checkJumpUrlReferer();
// ********************************
More information about the TYPO3-team-core
mailing list