summaryrefslogtreecommitdiff
path: root/inc/indexer.php
diff options
context:
space:
mode:
authorEsther Brunner <wikidesign@gmail.com>2007-02-27 13:44:24 +0100
committerEsther Brunner <wikidesign@gmail.com>2007-02-27 13:44:24 +0100
commita6a30c1aa8610d4a0a791bf88eb6dc57cf104d6b (patch)
treecc0378bf3a0c120e3f4c2c544102d6813ce04ecd /inc/indexer.php
parent8b3b5ebbb23e1ad6976289770ec480bbcd022cec (diff)
downloadrpg-a6a30c1aa8610d4a0a791bf88eb6dc57cf104d6b.tar.gz
rpg-a6a30c1aa8610d4a0a791bf88eb6dc57cf104d6b.tar.bz2
INDEXER_PAGE_ADD event
darcs-hash:20070227124424-20862-78b4e1863830e88aa9564e6b9c58fa0cdf03d41c.gz
Diffstat (limited to 'inc/indexer.php')
-rw-r--r--inc/indexer.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/inc/indexer.php b/inc/indexer.php
index 5a88ac439..b03aed64f 100644
--- a/inc/indexer.php
+++ b/inc/indexer.php
@@ -119,7 +119,12 @@ function idx_getPageWords($page){
$stopwords = array();
}
- $body = rawWiki($page);
+ $body = '';
+ $evt = new Doku_Event('INDEXER_PAGE_ADD', array($page, $body));
+ if ($evt->advise_before()) $body .= rawWiki($page);
+ $evt->advise_after();
+ unset($evt);
+
$body = strtr($body, "\r\n\t", ' ');
$tokens = explode(' ', $body);
$tokens = array_count_values($tokens); // count the frequency of each token