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 @@ + +
+

{L_WARNING}

+

{L_NO_SEARCH_INDEX}

+
+
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(), '', ''), + )); + } + } + 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.
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',