diff options
-rw-r--r-- | inc/indexer.php | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/inc/indexer.php b/inc/indexer.php index a167db47f..5ca2f0bb1 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -1218,19 +1218,18 @@ class Doku_Indexer { * @author Tom N Harris <tnharris@whoopdedo.org> */ protected function updateTuple($line, $id, $count) { - $newLine = $line; - if ($newLine !== ''){ - $newLine = preg_replace('/(^|:)'.preg_quote($id,'/').'\*\d*/', '', $newLine); + if ($line != ''){ + $line = preg_replace('/(^|:)'.preg_quote($id,'/').'\*\d*/', '', $line); } - $newLine = trim($newLine, ':'); + $line = trim($line, ':'); if ($count) { - if (strlen($newLine) > 0) { - return "$id*$count:".$newLine; + if ($line) { + return "$id*$count:".$line; } else { - return "$id*$count".$newLine; + return "$id*$count"; } } - return $newLine; + return $line; } /** |