summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2007-03-01 22:17:51 +0100
committerAndreas Gohr <andi@splitbrain.org>2007-03-01 22:17:51 +0100
commit15018435b2c3805dbe2ab4ea872c904c2f1258e3 (patch)
tree52d4873dba73c23ee7743dfcb50d85ab36652bdb
parenta6a30c1aa8610d4a0a791bf88eb6dc57cf104d6b (diff)
downloadrpg-15018435b2c3805dbe2ab4ea872c904c2f1258e3.tar.gz
rpg-15018435b2c3805dbe2ab4ea872c904c2f1258e3.tar.bz2
fix pass by reference problem in indexer.php
darcs-hash:20070301211751-7ad00-d4212a363176501a31a0971a00f81e18ee00fab3.gz
-rw-r--r--inc/indexer.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/inc/indexer.php b/inc/indexer.php
index b03aed64f..2f03ad409 100644
--- a/inc/indexer.php
+++ b/inc/indexer.php
@@ -120,17 +120,20 @@ function idx_getPageWords($page){
}
$body = '';
- $evt = new Doku_Event('INDEXER_PAGE_ADD', array($page, $body));
- if ($evt->advise_before()) $body .= rawWiki($page);
+ $data = array($page, $body);
+ $evt = new Doku_Event('INDEXER_PAGE_ADD', $data);
+ if ($evt->advise_before()) $data[1] .= rawWiki($page);
$evt->advise_after();
unset($evt);
+
+ list($page,$body) = $data;
$body = strtr($body, "\r\n\t", ' ');
$tokens = explode(' ', $body);
$tokens = array_count_values($tokens); // count the frequency of each token
-// ensure the deaccented or romanised page names of internal links are added to the token array
-// (this is necessary for the backlink function -- there maybe a better way!)
+ // ensure the deaccented or romanised page names of internal links are added to the token array
+ // (this is necessary for the backlink function -- there maybe a better way!)
if ($conf['deaccent']) {
$links = p_get_metadata($page,'relation references');