From 53219fa128861658f502468a4061eaaca65c6f70 Mon Sep 17 00:00:00 2001 From: Andreas Otto Date: Tue, 21 Aug 2007 09:40:12 +0000 Subject: [PATCH] Feature request #5748: Introduced a new TS option that makes indexing of metatags configurable. Adapted code to make use of the new TS option. 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 | 4 ++++ typo3/sysext/indexed_search/ChangeLog | 4 ++++ typo3/sysext/indexed_search/class.indexer.php | 13 ++++++++----- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index d5ab54bf88ac..eb48a8caf0c1 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-08-21 Andreas Otto + + * 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 * (trivial) Fixed bug #6170: CSC - File locallang.php used in static template instead of locallang.xml diff --git a/typo3/sysext/indexed_search/ChangeLog b/typo3/sysext/indexed_search/ChangeLog index da047e44517b..f5ff3fa4987d 100755 --- a/typo3/sysext/indexed_search/ChangeLog +++ b/typo3/sysext/indexed_search/ChangeLog @@ -1,3 +1,7 @@ +2007-08-21 Andreas Otto + + * 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 * Fix: List of indexed pages could be broken if mutli-byte chars are cut in the middle (patch by Karsten Dambekalns) diff --git a/typo3/sysext/indexed_search/class.indexer.php b/typo3/sysext/indexed_search/class.indexer.php index 99405a6dc867..de29dc6b2e51 100755 --- a/typo3/sysext/indexed_search/class.indexer.php +++ b/typo3/sysext/indexed_search/class.indexer.php @@ -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 or tags: -- 2.20.1