Feature request #5748: Introduced a new TS option that makes indexing of metatags...
authorAndreas Otto <andreas.otto@dkd.de>
Tue, 21 Aug 2007 09:40:12 +0000 (09:40 +0000)
committerAndreas Otto <andreas.otto@dkd.de>
Tue, 21 Aug 2007 09:40:12 +0000 (09:40 +0000)
Changes needed for doc_core_tsref are documented at http://wiki.typo3.org/index.php/Pending_Documentation#doc_core_tsref.

git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2453 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/indexed_search/ChangeLog
typo3/sysext/indexed_search/class.indexer.php

index d5ab54b..eb48a8c 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-08-21 Andreas Otto <andreas.otto@dkd.de>
+
+       * Feature request #5748: Introduced a new TS option that makes indexing of metatags configurable. Adapted code to make use of the new TS option.
+
 2007-08-19  Oliver Hader  <oh@inpublica.de>
 
        * (trivial) Fixed bug #6170: CSC - File locallang.php used in static template instead of locallang.xml
index da047e4..f5ff3fa 100755 (executable)
@@ -1,3 +1,7 @@
+2007-08-21 Andreas Otto <andreas.otto@dkd.de>
+
+       * Feature request #5748: Introduced a new TS option that makes indexing of metatags configurable. Adapted code to make use of the new TS option.
+
 2007-07-06  Michael Stucki  <michael@typo3.org>
 
        * Fix: List of indexed pages could be broken if mutli-byte chars are cut in the middle (patch by Karsten Dambekalns)
index 99405a6..de29dc6 100755 (executable)
@@ -280,6 +280,7 @@ class tx_indexedsearch_indexer {
                                                                // Configuration of behavior:
                                                        $this->conf['index_externals'] = $pObj->config['config']['index_externals'];    // Whether to index external documents like PDF, DOC etc. (if possible)
                                                        $this->conf['index_descrLgd'] = $pObj->config['config']['index_descrLgd'];              // Length of description text (max 250, default 200)
+                                                       $this->conf['index_metatags'] = isset($pObj->config['config']['index_metatags']) ? $pObj->config['config']['index_metatags'] : true;
 
                                                                // Set to zero:
                                                        $this->conf['recordUid'] = 0;
@@ -623,11 +624,13 @@ class tx_indexedsearch_indexer {
                $contentArr['title'] = trim(isset($titleParts[1]) ? $titleParts[1] : $titleParts[0]);
 
                        // get keywords and description metatags
-               for($i=0;$this->embracingTags($headPart,'meta',$dummy,$headPart,$meta[$i]);$i++) { /*nothing*/ }
-               for($i=0;isset($meta[$i]);$i++) {
-                       $meta[$i] = t3lib_div::get_tag_attributes($meta[$i]);
-                       if(stristr($meta[$i]['name'],'keywords')) $contentArr['keywords'].=','.$meta[$i]['content'];
-                       if(stristr($meta[$i]['name'],'description')) $contentArr['description'].=','.$meta[$i]['content'];
+               if($this->conf['index_metatags']) {
+                       for($i=0;$this->embracingTags($headPart,'meta',$dummy,$headPart,$meta[$i]);$i++) { /*nothing*/ }
+                       for($i=0;isset($meta[$i]);$i++) {
+                               $meta[$i] = t3lib_div::get_tag_attributes($meta[$i]);
+                               if(stristr($meta[$i]['name'],'keywords')) $contentArr['keywords'].=','.$meta[$i]['content'];
+                               if(stristr($meta[$i]['name'],'description')) $contentArr['description'].=','.$meta[$i]['content'];
+                       }
                }
 
                        // Process <!--TYPO3SEARCH_begin--> or <!--TYPO3SEARCH_end--> tags: