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:
29: $cfg = cRegistry::getConfig();
30: $db = cRegistry::getDb();
31:
32: // Indexing an article depends on the complete content with all content
33: // types, i.e it can not by differentiated by specific content types.
34: // Therefore one must fetch the complete content array.
35: $aContent = conGetContentFromArticle($articleIds['idartlang']);
36:
37: // cms types to be excluded from indexing
38: $aOptions = $cfg['search_index']['excluded_content_types'];
39:
40: // start indexing
41: $index = new cSearchIndex($db);
42: $index->start($articleIds['idart'], $aContent, 'auto', $aOptions);
43: }
44:
45: ?>