summaryrefslogtreecommitdiff
path: root/inc/indexer.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2009-10-20 23:23:38 +0200
committerAndreas Gohr <andi@splitbrain.org>2009-10-20 23:23:38 +0200
commitdb959ae30700e3924a73350a3a43a2c36b431de7 (patch)
treef89b3fb0609abb72cf93fa8060f7fc27f4c15f40 /inc/indexer.php
parent8ec3f7bdbf7a5f702a3022332a6f6cb424d0981a (diff)
downloadrpg-db959ae30700e3924a73350a3a43a2c36b431de7.tar.gz
rpg-db959ae30700e3924a73350a3a43a2c36b431de7.tar.bz2
Coding Standard Cleanup
Ignore-this: 259cb5773c3144c6c706d87298dcf674 darcs-hash:20091020212338-7ad00-6bf1c5c403491f136a1c02af5ecd9f84d7227107.gz
Diffstat (limited to 'inc/indexer.php')
-rw-r--r--inc/indexer.php24
1 files changed, 13 insertions, 11 deletions
diff --git a/inc/indexer.php b/inc/indexer.php
index 4b59684cd..1f2ff89e3 100644
--- a/inc/indexer.php
+++ b/inc/indexer.php
@@ -227,18 +227,18 @@ function idx_getPageWords($page){
// 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');
+ $links = p_get_metadata($page,'relation references');
- if (!empty($links)) {
- $tmp = join(' ',array_keys($links)); // make a single string
- $tmp = strtr($tmp, ':', ' '); // replace namespace separator with a space
- $link_tokens = array_unique(explode(' ', $tmp)); // break into tokens
+ if (!empty($links)) {
+ $tmp = join(' ',array_keys($links)); // make a single string
+ $tmp = strtr($tmp, ':', ' '); // replace namespace separator with a space
+ $link_tokens = array_unique(explode(' ', $tmp)); // break into tokens
- foreach ($link_tokens as $link_token) {
- if (isset($tokens[$link_token])) continue;
- $tokens[$link_token] = 1;
+ foreach ($link_tokens as $link_token) {
+ if (isset($tokens[$link_token])) continue;
+ $tokens[$link_token] = 1;
+ }
}
- }
}
$words = array();
@@ -537,7 +537,7 @@ function idx_getIndexWordsSorted($words,&$result){
}
}
}
- return $wids;
+ return $wids;
}
/**
@@ -664,7 +664,9 @@ function idx_upgradePageWords(){
if (empty($page_idx)) return;
$pagewords = array();
$len = count($page_idx);
- for ($n=0;$n<$len;$n++) $pagewords[] = array();
+ for ($n=0;$n<$len;$n++){
+ $pagewords[] = array();
+ }
unset($page_idx);
$n=0;