[BUGFIX] Email links marked as external when preceded by external link
authorStanislas Rolland <typo3@sjbr.ca>
Tue, 4 Oct 2011 16:46:47 +0000 (12:46 -0400)
committerStanislas Rolland <typo3@sjbr.ca>
Tue, 4 Oct 2011 22:07:23 +0000 (00:07 +0200)
Variable is not initialized leading to incorrect transformation
on way to RTE.

Change-Id: If83c2c8b04def953cbc95f617a14111e7641a867
Resolves: #29782
Releases: 4.4, 4.5, 4.6
Reviewed-on: http://review.typo3.org/5539
Reviewed-by: Stanislas Rolland
Tested-by: Stanislas Rolland
t3lib/class.t3lib_parsehtml_proc.php

index cae95ac..4c584b5 100644 (file)
@@ -665,6 +665,7 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                $siteUrl = $this->siteUrl();
                foreach ($blockSplit as $k => $v) {
                        $error = '';
+                       $external = FALSE;
                        if ($k % 2) { // block:
                                $tagCode = t3lib_div::unQuoteFilenames(trim(substr($this->getFirstTag($v), 0, -1)), true);
                                $link_param = $tagCode[1];
@@ -677,7 +678,6 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                                } else {
                                        $fileChar = intval(strpos($link_param, '/'));
                                        $urlChar = intval(strpos($link_param, '.'));
-                                       $external = FALSE;
                                                // Parse URL:
                                        $pU = parse_url($link_param);
                                                // Detects if a file is found in site-root OR is a simulateStaticDocument.