From a6a30c1aa8610d4a0a791bf88eb6dc57cf104d6b Mon Sep 17 00:00:00 2001
From: Esther Brunner <wikidesign@gmail.com>
Date: Tue, 27 Feb 2007 13:44:24 +0100
Subject: [PATCH] INDEXER_PAGE_ADD event

darcs-hash:20070227124424-20862-78b4e1863830e88aa9564e6b9c58fa0cdf03d41c.gz
---
 inc/indexer.php | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

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
-- 
GitLab