aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_main.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-12-27 13:15:43 +0100
committerJoas Schilling <nickvergessen@gmx.de>2013-12-27 13:16:38 +0100
commitbef7bc7900e0c4c364245ee3039ee2aece62a223 (patch)
tree07df6f6b603cb0798735952800c487f65cb894f7 /phpBB/includes/acp/acp_main.php
parent558f3cd21cb925395003ebd1a7a226d240f9fccb (diff)
downloadforums-bef7bc7900e0c4c364245ee3039ee2aece62a223.tar
forums-bef7bc7900e0c4c364245ee3039ee2aece62a223.tar.gz
forums-bef7bc7900e0c4c364245ee3039ee2aece62a223.tar.bz2
forums-bef7bc7900e0c4c364245ee3039ee2aece62a223.tar.xz
forums-bef7bc7900e0c4c364245ee3039ee2aece62a223.zip
[ticket/11911] Warn admins when there is no search index for the selected engine
PHPBB3-11911
Diffstat (limited to 'phpBB/includes/acp/acp_main.php')
-rw-r--r--phpBB/includes/acp/acp_main.php16
1 files changed, 16 insertions, 0 deletions
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)