mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 03:54:10 +01: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:
commit
db94f80c5b
@ -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">
|
||||
|
@ -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&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)
|
||||
|
@ -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',
|
||||
|
Loading…
x
Reference in New Issue
Block a user