Skip to content

Commit

Permalink
Remove relation_references from the index when it is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
michitux committed Mar 8, 2011
1 parent d8e733e commit a424180
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions inc/indexer.php
Expand Up @@ -1185,6 +1185,8 @@ function idx_addPage($page, $verbose=false) {
$metadata['title'] = p_get_metadata($page, 'title', false);
if (($references = p_get_metadata($page, 'relation references', false)) !== null)
$metadata['relation_references'] = array_keys($references);
else
$metadata['relation_references'] = array();
$data = compact('page', 'body', 'metadata');
$evt = new Doku_Event('INDEXER_PAGE_ADD', $data);
if ($evt->advise_before()) $data['body'] = $data['body'] . " " . rawWiki($page);
Expand Down

0 comments on commit a424180

Please sign in to comment.