diff options
author | Michael Hamann <michael@content-space.de> | 2011-05-02 21:59:13 +0200 |
---|---|---|
committer | Michael Hamann <michael@content-space.de> | 2011-05-02 22:19:21 +0200 |
commit | 2e1018bc8c867d51647ed2934c8129d39a1cf4e1 (patch) | |
tree | 95dcdc13a0aed1cc19be278b8effc1ecf72cddc1 /inc | |
parent | e20ddf03e236f3eb7fdbd65ee2f9fc4c3ddecf62 (diff) | |
download | rpg-2e1018bc8c867d51647ed2934c8129d39a1cf4e1.tar.gz rpg-2e1018bc8c867d51647ed2934c8129d39a1cf4e1.tar.bz2 |
Add line endings at the end of the file
The bug that is fixed here may have corrupted your search index in a way
that it produces wrong or missing results and won't be fixed
automatically. This occurs when you have deleted the last occurrence of
a word that has been on the last line of one of the word indexes. A
functionality for checking for a broken search index will be added.
The index can be fixed by deleting it completely (remove all .idx files
in data/index/) and recreating it using bin/indexer.php -c. The
searchindex plugin will be updated to be able to do the same, soon.
Diffstat (limited to 'inc')
-rw-r--r-- | inc/indexer.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/inc/indexer.php b/inc/indexer.php index d2a38e4a7..03008cd71 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -860,6 +860,8 @@ class Doku_Indexer { $fh = @fopen($fn.'.tmp', 'w'); if (!$fh) return false; fwrite($fh, join("\n", $lines)); + if (!empty($lines)) + fwrite($fh, "\n"); fclose($fh); if (isset($conf['fperm'])) chmod($fn.'.tmp', $conf['fperm']); |