Fixed bug 5701: linkHandler Hook Not Initialized Properly, patch supplied by Jeff...
authorIngo Renner <ingo.renner@typo3.org>
Mon, 17 Sep 2007 16:34:59 +0000 (16:34 +0000)
committerIngo Renner <ingo.renner@typo3.org>
Mon, 17 Sep 2007 16:34:59 +0000 (16:34 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-1@2510 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/tslib/class.tslib_content.php

index 95d6eef..7b16674 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2007-09-09  Martin Kutschker  <martin.t.kutschker@blackbox.net>
+
+       * fixed bug 5701: linkHandler Hook Not Initialized Properly , patch supplied by Jeff Segars
 
 2007-09-09  Martin Kutschker  <martin.t.kutschker@blackbox.net>
 
index c5e04f0..a6d234e 100755 (executable)
@@ -5050,10 +5050,13 @@ class tslib_cObj {
 
                                // Check for link-handler keyword:
                        list($linkHandlerKeyword,$linkHandlerValue) = explode(':',trim($link_paramA[0]),2);
-                       if ($TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_content.php']['typolinkLinkHandler'][$linkHandlerKeyword] && strcmp($linkHandlerValue,"")) {
-                               $linkHandlerObj = &t3lib_div::getUserObj($TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_content.php']['typolinkLinkHandler'][$linkHandlerKeyword]);
-                               return $linkHandlerObj->main($linktxt, $conf, $linkHandlerKeyword, $linkHandlerValue, $link_param, $this);
-                       }
+                       if ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['typolinkLinkHandler'][$linkHandlerKeyword] && strcmp($linkHandlerValue, '')) {
+                               $linkHandlerObj = &t3lib_div::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['typolinkLinkHandler'][$linkHandlerKeyword]);
+
+                               if(method_exists($linkHandlerObj, 'main')) {
+                                       return $linkHandlerObj->main($linktxt, $conf, $linkHandlerKeyword, $linkHandlerValue, $link_param, $this);
+                               }
+                       }
 
                        $link_param = trim($link_paramA[0]);    // Link parameter value
                        $linkClass = trim($link_paramA[2]);             // Link class