* FIX Alternative terms (term_alt) were not searched
authorjocrau <jocrau@735d13b6-9817-0410-8766-e36946ffe9aa>
Fri, 10 Jul 2009 13:07:34 +0000 (13:07 +0000)
committerBastian Bringenberg <spam@bastian-bringenberg.de>
Thu, 4 Dec 2014 23:56:06 +0000 (00:56 +0100)
* IMP Some more variables are now initialized

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

ChangeLog
ext_emconf.php
model/class.tx_contagged_model_mapper.php
pi1/class.tx_contagged_pi1.php

index b6ef769..2c1ab64 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+v1.0.4 2009-07-10 Jochen Rau <jochen.rau@typoplanet.de>
+
+       * FIX Alternative terms (term_alt) were not searched
+
 v1.0.3 2009-05-28 Jochen Rau <jochen.rau@typoplanet.de>
 
        * FIX Bug #3017: Page browser is not localised
index 18761c6..ea1c979 100644 (file)
@@ -15,7 +15,7 @@ $EM_CONF[$_EXTKEY] = array(
        'description' => 'This extension parses your content to tag, replace and link specific terms. It is useful to auto-generate a glossary - but not only. See \'ChangeLog\' and WiKi (\'http://wiki.typo3.org/index.php/Contagged\').',
        'category' => 'fe',
        'shy' => 0,
-       'version' => '1.0.3',
+       'version' => '1.0.4',
        'dependencies' => '',
        'conflicts' => '',
        'priority' => '',
index a8c0faa..d888185 100644 (file)
@@ -91,7 +91,7 @@ class tx_contagged_model_mapper {
 
                        // post processing
                        $mappedDataArray['term_alt'] = t3lib_div::trimExplode(chr(10),$row['term_alt'],1);
-                       $mappedDataArray['desc_long'] = $this->cObj->parseFunc($mappedDataArray['desc_long'],$conf='',$ref='< lib.parseFunc_RTE');
+                       $mappedDataArray['desc_long'] = $this->cObj->parseFunc($mappedDataArray['desc_long'], array(), '< lib.parseFunc_RTE');
                        $mappedDataArray['storagePids'] = $this->getStoragePidsArray($typeConfigArray);
                                                
                        if ($typeConfigArray['listPages']) {
index 0f5714e..7608b48 100644 (file)
@@ -160,8 +160,8 @@ class tx_contagged_pi1 extends tslib_pibase {
                        $fieldsToSearch = t3lib_div::trimExplode(',', $this->conf['searchbox.']['fieldsToSearch'] );
                        foreach ($fieldsToSearch as $field) {                                           
                                if (is_array($termArray[$field])) {
-                                       foreach ($termArray[$field] as $subField) {
-                                               if (preg_match('/' . preg_quote($sword,'/') . '/Uis', strip_tags($termArray[$field][$subField])) > 0) {
+                                       foreach ($termArray[$field] as $subFieldValue) {
+                                               if (preg_match('/' . preg_quote($sword,'/') . '/Uis', strip_tags($subFieldValue)) > 0) {
                                                        $swordMatched = TRUE;
                                                        break;
                                                }
@@ -254,6 +254,7 @@ class tx_contagged_pi1 extends tslib_pibase {
                $markerArray['###RELATED###'] = $this->renderRelated($termArray);
                $markerArray['###TERM_LANG###'] = $this->pi_getLL('lang.'.$termArray['term_lang'])?$this->pi_getLL('lang.'.$termArray['term_lang']):$this->pi_getLL('na');
 
+               $labelWrap = array();
                $labelWrap['wrap'] = $typeConfigArray['labelWrap1']?$typeConfigArray['labelWrap1']:$this->conf['labelWrap1'];
                $markerArray['###TERM_TYPE_LABEL###'] = $markerArray['###TERM_TYPE###']?$this->local_cObj->stdWrap($this->pi_getLL('term_type'),$labelWrap):'';
                $markerArray['###TERM_LABEL###'] = $this->local_cObj->stdWrap($this->pi_getLL('term'),$labelWrap);
@@ -268,7 +269,6 @@ class tx_contagged_pi1 extends tslib_pibase {
 
                // make "more..." link
                $markerArray['###DETAILS###'] = $this->pi_getLL('details');
-               unset($typolinkConf);
                $typolinkConf = $this->typolinkConf;
                if (!empty($typeConfigArray['typolink.'])) {
                        $typolinkConf = t3lib_div::array_merge_recursive_overrule($typolinkConf, $typeConfigArray['typolink.']);
@@ -288,7 +288,6 @@ class tx_contagged_pi1 extends tslib_pibase {
                                $key = key($result);
                                if (array_key_exists($key, $this->termsArray)) {
                                        $relatedTerm = current($result);
-                                       unset($typolinkConf);
                                        $typolinkConf = $this->typolinkConf;
                                        if (!empty($typeConfigArray['typolink.'])) {
                                                $typolinkConf = t3lib_div::array_merge_recursive_overrule($typolinkConf, $typeConfigArray['typolink.']);
@@ -328,6 +327,7 @@ class tx_contagged_pi1 extends tslib_pibase {
                        }
                } else {
                        $images = t3lib_div::trimExplode(',', $termArray['image'], 1);
+                       $imagesWithPath = array();
                        foreach ($images as $image) {
                                $imagesWithPath[] = 'uploads/pics/' . $image;
                        }
@@ -383,6 +383,8 @@ class tx_contagged_pi1 extends tslib_pibase {
        }
 
        function getIndexArray() {
+               $indexArray = array();
+               $reverseIndexArray = array();
                // Get localized index chars.
                foreach (t3lib_div::trimExplode(',', $this->pi_getLL('indexChars')) as $key => $value) {
                        $subCharArray = t3lib_div::trimExplode('|', $value);
@@ -393,7 +395,6 @@ class tx_contagged_pi1 extends tslib_pibase {
                }
 
                // The configuered subchars like Ö will be linked as O (see documentation and file "locallang.xml").
-               unset($typolinkConf);
                $typolinkConf = $this->typolinkConf;
                foreach ($this->termsArray as $termKey => $termArray) {
                        if ( $termArray['exclude']!=1 && $this->conf['types.'][$termArray['term_type'].'.']['dontListTerms']!=1 && in_array($GLOBALS['TSFE']->id,$termArray['listPages']) ) {