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