[+BUGFIX] Fixed non-translated page titles in backlink (Thanks to Oliver Berg for...
authorjocrau <jocrau@735d13b6-9817-0410-8766-e36946ffe9aa>
Wed, 16 Sep 2009 11:05:18 +0000 (11:05 +0000)
committerBastian Bringenberg <spam@bastian-bringenberg.de>
Thu, 4 Dec 2014 23:56:06 +0000 (00:56 +0100)
[+BUGFIX] Fixed an issue with the parser (appended terms to cObj in some rare cases).

git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/contagged/trunk@24540 735d13b6-9817-0410-8766-e36946ffe9aa

ChangeLog
class.tx_contagged.php
model/class.tx_contagged_model_terms.php
pi1/class.tx_contagged_pi1.php

index 31eb9dc..f547f91 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+v1.3.0 2009-09-16 Jochen Rau <jochen.rau@typoplanet.de>
+
+       [+BUGFIX] Fixed non-translated page titles in backlink (Thanks to Oliver Berg for reporting). Resolves #4478.
+       [+BUGFIX] Fixed an issue with the parser (appended terms to cObj in some rare cases).
+
 v1.2.1 2009-08-31 Jochen Rau <jochen.rau@typoplanet.de>
 
        [+BUGFIX] Fixed link in documentation (thanks to Klemens Zleptnik).
index 56e1712..d98b3c0 100644 (file)
@@ -95,9 +95,9 @@ class tx_contagged extends tslib_pibase {
                                        foreach ($sortedTerms as $termAndKey) {
                                                $this->getPositions($splittedContent[$intKey],$positionsArray,$termAndKey['term'],$termAndKey['key']);
                                        }
-                               }
                                ksort($positionsArray);
                                $splittedContent[$intKey] = $this->doReplace($splittedContent[$intKey],$positionsArray);                        
+                       }
                }
                $parsedContent = implode('',$splittedContent);
                
index 5311c58..da4fdbf 100644 (file)
@@ -107,10 +107,10 @@ class tx_contagged_model_terms {
                $fetchedTerms = array();
                foreach ($this->terms as $key => $term) {
                        if ($term['sourceName'] == $sourceName && $term['uid'] == $uid) {
-                               return array($key => $term);
+                               $fetchedTerms = array($key => $term);
                        }
                }
-               return NULL;
+               return $fetchedTerms;
        }
        
        function sourceIsConfigured($sourceName) {
index 7608b48..32e3822 100644 (file)
@@ -212,7 +212,10 @@ class tx_contagged_pi1 extends tslib_pibase {
                // make "back to..." link
                if ($this->backPid) {
                        if($this->conf['addBackLinkDescription']>0) {
-                               $backPage = $this->pi_getRecord('pages', $this->backPid);
+                               $pageSelectObject = new t3lib_pageSelect;
+                               $pageSelectObject->init(FALSE);
+                               $pageSelectObject->sys_language_uid = $GLOBALS['TSFE']->sys_language_uid;
+                               $backPage = $pageSelectObject->getPage($this->backPid);
                                $markerArray['###BACK_TO###'] = $this->pi_getLL('backToPage') . " \"" . $backPage['title'] . "\"";
                        } else {
                                $markerArray['###BACK_TO###'] = $this->pi_getLL('back');
@@ -460,4 +463,4 @@ class tx_contagged_pi1 extends tslib_pibase {
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/contagged/pi1/class.tx_contagged_pi1.php']) {
        include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/contagged/pi1/class.tx_contagged_pi1.php']);
 }
-?>
+?>
\ No newline at end of file