1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

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
This commit is contained in:
Dhruv
2013-12-27 18:01:48 +05:30
3 changed files with 23 additions and 0 deletions

View File

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