aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/adm/style/acp_main.html6
-rw-r--r--phpBB/includes/acp/acp_main.php16
-rw-r--r--phpBB/language/en/acp/common.php1
3 files changed, 23 insertions, 0 deletions
diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html
index bb39ffe050..f5b030d954 100644
--- a/phpBB/adm/style/acp_main.html
+++ b/phpBB/adm/style/acp_main.html
@@ -26,6 +26,12 @@
</div>
<!-- ENDIF -->
+ <!-- IF S_SEARCH_INDEX_MISSING -->
+ <div class="errorbox">
+ <h3>{L_WARNING}</h3>
+ <p>{L_NO_SEARCH_INDEX}</p>
+ </div>
+ <!-- ENDIF -->
<!-- IF S_REMOVE_INSTALL -->
<div class="errorbox">
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index eecd8c72dc..f01cba0bcc 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -620,6 +620,22 @@ class acp_main
$template->assign_var('S_REMOVE_INSTALL', true);
}
+ // Warn if no search index is created
+ if ($config['num_posts'] && class_exists($config['search_type']))
+ {
+ $error = false;
+ $search_type = $config['search_type'];
+ $search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
+
+ if (!$search->index_created())
+ {
+ $template->assign_vars(array(
+ 'S_SEARCH_INDEX_MISSING' => true,
+ 'L_NO_SEARCH_INDEX' => $user->lang('NO_SEARCH_INDEX', $search->get_name(), '<a href="' . append_sid("{$phpbb_admin_path}index.$phpEx", 'i=acp_search&amp;mode=index') . '">', '</a>'),
+ ));
+ }
+ }
+
if (!defined('PHPBB_DISABLE_CONFIG_CHECK') && file_exists($phpbb_root_path . 'config.' . $phpEx) && phpbb_is_writable($phpbb_root_path . 'config.' . $phpEx))
{
// World-Writable? (000x)
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index 77a7618ce0..0117d85433 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -361,6 +361,7 @@ $lang = array_merge($lang, array(
'GZIP_COMPRESSION' => 'GZip compression',
+ 'NO_SEARCH_INDEX' => 'The selected search backend does not have a search index.<br >Please create the index for ā€œ%1$sā€ in the %2$ssearch index%3$s section.',
'NOT_AVAILABLE' => 'Not available',
'NUMBER_FILES' => 'Number of attachments',
'NUMBER_POSTS' => 'Number of posts',