diff options
author | Adrian Lang <mail@adrianlang.de> | 2011-05-08 20:55:40 +0200 |
---|---|---|
committer | Adrian Lang <mail@adrianlang.de> | 2011-05-08 20:55:40 +0200 |
commit | 9199737c351d653a1d384cb50ed0d185f6512826 (patch) | |
tree | 2da4dbc0b92a72c767712549b6d90f53b0a3605e /inc/infoutils.php | |
parent | e68653d8ef3df043761e4042c563d65731f9b9c6 (diff) | |
parent | 2b537ba8dc1863d603770c208ae4f91d4d0877b9 (diff) | |
download | rpg-9199737c351d653a1d384cb50ed0d185f6512826.tar.gz rpg-9199737c351d653a1d384cb50ed0d185f6512826.tar.bz2 |
Merge branch 'master' into stable
Conflicts:
doku.php
Diffstat (limited to 'inc/infoutils.php')
-rw-r--r-- | inc/infoutils.php | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/inc/infoutils.php b/inc/infoutils.php index 5f406aa3e..786661d01 100644 --- a/inc/infoutils.php +++ b/inc/infoutils.php @@ -176,7 +176,8 @@ function check(){ } if($conf['authtype'] == 'plain'){ - if(is_writable(DOKU_CONF.'users.auth.php')){ + global $config_cascade; + if(is_writable($config_cascade['plainauth.users']['default'])){ msg('conf/users.auth.php is writable',1); }else{ msg('conf/users.auth.php is not writable',0); @@ -238,6 +239,36 @@ function check(){ Make sure this directory is properly protected (See <a href="http://www.dokuwiki.org/security">security</a>)',-1); } + + // Check for corrupted search index + $lengths = idx_listIndexLengths(); + $index_corrupted = false; + foreach ($lengths as $length) { + if (count(idx_getIndex('w', $length)) != count(idx_getIndex('i', $length))) { + $index_corrupted = true; + break; + } + } + + foreach (idx_getIndex('metadata', '') as $index) { + if (count(idx_getIndex($index.'_w', '')) != count(idx_getIndex($index.'_i', ''))) { + $index_corrupted = true; + break; + } + } + + if ($index_corrupted) + msg('The search index is corrupted. It might produce wrong results and most + probably needs to be rebuilt. See + <a href="http://www.dokuwiki.org/faq:searchindex">faq:searchindex</a> + for ways to rebuild the search index.', -1); + elseif (!empty($lengths)) + msg('The search index seems to be working', 1); + else + msg('The search index is empty. See + <a href="http://www.dokuwiki.org/faq:searchindex">faq:searchindex</a> + for help on how to fix the search index. If the default indexer + isn\'t used or the wiki is actually empty this is normal.'); } /** |