summaryrefslogtreecommitdiff
path: root/inc/indexer.php
diff options
context:
space:
mode:
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;