1: <?php
2:
3: /**
4: * CONTENIDO Chain.
5: * Generate index of article content entries.
6: *
7: * @package Core
8: * @subpackage Chain
9: * @version SVN Revision $Rev:$
10: *
11: * @author marcus.gnass
12: * @copyright four for business AG <www.4fb.de>
13: * @license http://www.contenido.org/license/LIZENZ.txt
14: * @link http://www.4fb.de
15: * @link http://www.contenido.org
16: */
17:
18: // assert CONTENIDO framework
19: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
20:
21: /**
22: * Generate index of article content entries.
23: *
24: * @param array $articleIds containing keys idclient, idlang, idcat, idcatlang,
25: * idart, idartlang
26: */
27: function cecIndexArticle(array $articleIds) {
28: global $db;
29:
30: // Indexing an article depends on the complete content with all content
31: // types, i.e it can not by differentiated by specific content types.
32: // Therefore one must fetch the complete content array.
33: $aContent = conGetContentFromArticle($articleIds['idartlang']);
34:
35: // cms types to be excluded from indexing
36: // @todo Make this configurable!
37: $aOptions = array(
38: 'img',
39: 'link',
40: 'linktarget',
41: 'swf'
42: );
43:
44: // start indexing
45: $index = new cSearchIndex($db);
46: $index->start($articleIds['idart'], $aContent, 'auto', $aOptions);
47: }
48:
49: ?>