summaryrefslogtreecommitdiff
path: root/inc/indexer.php
diff options
context:
space:
mode:
authorMichael Hamann <michael@content-space.de>2011-01-22 23:01:56 +0100
committerMichael Hamann <michael@content-space.de>2011-01-22 23:01:56 +0100
commitd64516f5d992bb47a765949743506d8433a07d55 (patch)
tree7bfa8f0d524dcb98ac174ea17596cc1f43bde8f6 /inc/indexer.php
parent9b41be2446ea725a496f34b28ac4db84bece57c9 (diff)
downloadrpg-d64516f5d992bb47a765949743506d8433a07d55.tar.gz
rpg-d64516f5d992bb47a765949743506d8433a07d55.tar.bz2
Indexer v3 Rewrite: fix obvious typos and type errors
Diffstat (limited to 'inc/indexer.php')
-rw-r--r--inc/indexer.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/inc/indexer.php b/inc/indexer.php
index a61f3772a..087113587 100644
--- a/inc/indexer.php
+++ b/inc/indexer.php
@@ -277,7 +277,7 @@ class Doku_Indexer {
else unset($val_idx[$id]);
}
$val_idx = array_keys($val_idx);
- $this->_saveIndexKey($metaname.'_p', '', $pid, $val_idx);
+ $this->_saveIndexKey($metaname.'_p', '', $pid, implode(':', $val_idx));
}
unset($metaidx);
unset($metawords);
@@ -559,8 +559,8 @@ class Doku_Indexer {
private function _getIndex($idx, $suffix) {
global $conf;
$fn = $conf['indexdir'].'/'.$idx.$suffix.'.idx';
- if (!@file_exists($fn, FILE_IGNORE_NEW_LINES)) return array();
- return file($fn);
+ if (!@file_exists($fn)) return array();
+ return file($fn, FILE_IGNORE_NEW_LINES);
}
/**
@@ -773,7 +773,7 @@ class Doku_Indexer {
$newLine = preg_replace('/(^|:)'.preg_quote($id,'/').'\*\d*/', '', $newLine);
$newLine = trim($newLine, ':');
if ($count) {
- if ($strlen($newLine) > 0)
+ if (strlen($newLine) > 0)
return "$id*$count:".$newLine;
else
return "$id*$count".$newLine;
@@ -794,7 +794,7 @@ class Doku_Indexer {
foreach ($parts as $tuple) {
if ($tuple == '') continue;
list($key, $cnt) = explode('*', $tuple);
- if (!$cnd) continue;
+ if (!$cnt) continue;
$key = $keys[$key];
if (!$key) continue;
$result[$key] = $cnt;