aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorDhruv <dhruv.goel92@gmail.com>2013-12-27 18:01:48 +0530
committerDhruv <dhruv.goel92@gmail.com>2013-12-27 18:01:48 +0530
commitdb94f80c5ba117ca410bb2aafa3ae5c02dcf11c8 (patch)
treeb96c456824cb188bd5115700cd5a45a0fcc273be /phpBB/includes
parentf9c7f0fc193802fb866063c88e2d3448b6f0d010 (diff)
parentbef7bc7900e0c4c364245ee3039ee2aece62a223 (diff)
downloadforums-db94f80c5ba117ca410bb2aafa3ae5c02dcf11c8.tar
forums-db94f80c5ba117ca410bb2aafa3ae5c02dcf11c8.tar.gz
forums-db94f80c5ba117ca410bb2aafa3ae5c02dcf11c8.tar.bz2
forums-db94f80c5ba117ca410bb2aafa3ae5c02dcf11c8.tar.xz
forums-db94f80c5ba117ca410bb2aafa3ae5c02dcf11c8.zip
Merge remote-tracking branch 'nickvergessen/ticket/11911' into develop
# By Joas Schilling # Via Joas Schilling * nickvergessen/ticket/11911: [ticket/11911] Warn admins when there is no search index for the selected engine
Diffstat (limited to 'phpBB/includes')
-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)