diff --git a/phpBB/includes/acp/acp_search.php b/phpBB/includes/acp/acp_search.php index e174f9712e..8e40a5283f 100644 --- a/phpBB/includes/acp/acp_search.php +++ b/phpBB/includes/acp/acp_search.php @@ -504,8 +504,8 @@ class acp_search_info 'title' => 'ACP_SEARCH', 'version' => '1.0.0', 'modes' => array( - 'settings' => array('title' => 'ACP_SEARCH_SETTINGS', 'auth' => 'acl_a_server'), - 'index' => array('title' => 'ACP_SEARCH_INDEX', 'auth' => 'acl_a_server'), + 'settings' => array('title' => 'ACP_SEARCH_SETTINGS', 'auth' => 'acl_a_search'), + 'index' => array('title' => 'ACP_SEARCH_INDEX', 'auth' => 'acl_a_search'), ), ); } diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index 3d5381e2bc..74ffa08a81 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -48,6 +48,19 @@ class fulltext_mysql extends search_backend return $user->lang['FULLTEXT_MYSQL_INCOMPATIBLE_VERSION']; } + $result = $db->sql_query('SHOW TABLE STATUS LIKE \'' . POSTS_TABLE . '\''); + $engine = $db->sql_fetchfield('Engine', 0, $result); + if (!$engine) + { + $engine = $db->sql_fetchfield('Type', 0, $result); + } + $db->sql_freeresult($result); + + if ($engine != 'MyISAM') + { + return $user->lang['FULLTEXT_MYSQL_NOT_MYISAM']; + } + $sql = 'SHOW VARIABLES LIKE \'ft\_%\''; $result = $db->sql_query($sql); diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 429071551d..ff9511ce75 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -292,6 +292,7 @@ INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_prune', 1); INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_ranks', 1); INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_reasons', 1); INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_roles', 1); +INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_search', 1); INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_server', 1); INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_styles', 1); INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_uauth', 1); @@ -594,8 +595,8 @@ INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_nam INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (187, 1, 1, 'permissions', 'acp', 58, 349, 350, 'ACP_GROUPS_FORUM_PERMISSIONS', 'setting_group_local', 'acl_a_authgroups && (acl_a_mauth || acl_a_fauth)'); INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (188, 1, 1, 'permissions', 'acp', 57, 341, 342, 'ACP_USERS_FORUM_PERMISSIONS', 'setting_user_local', 'acl_a_authusers && (acl_a_mauth || acl_a_fauth)'); INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (199, 1, 1, 'reasons', 'acp', 66, 449, 450, 'ACP_MANAGE_REASONS', 'main', 'acl_a_reasons'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (204, 1, 1, 'search', 'acp', 64, 437, 438, 'ACP_SEARCH_INDEX', 'index', 'acl_a_server'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (205, 1, 1, 'search', 'acp', 44, 263, 264, 'ACP_SEARCH_SETTINGS', 'settings', 'acl_a_server'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (204, 1, 1, 'search', 'acp', 64, 437, 438, 'ACP_SEARCH_INDEX', 'index', 'acl_a_search'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (205, 1, 1, 'search', 'acp', 44, 263, 264, 'ACP_SEARCH_SETTINGS', 'settings', 'acl_a_search'); # MCP INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (124, 1, '', 'mcp', 1, 0, 57, 66, 'MCP_MAIN', '', ''); diff --git a/phpBB/language/en/acp/permissions_phpbb.php b/phpBB/language/en/acp/permissions_phpbb.php index a46ff1816b..8ee45f0a74 100644 --- a/phpBB/language/en/acp/permissions_phpbb.php +++ b/phpBB/language/en/acp/permissions_phpbb.php @@ -218,7 +218,7 @@ $lang = array_merge($lang, array( 'acl_a_reasons' => array('lang' => 'Can manage report/denial reasons', 'cat' => 'misc'), # 'acl_a_backup' => array('lang' => 'Can backup database', 'cat' => 'misc'), # 'acl_a_restore' => array('lang' => 'Can restore database', 'cat' => 'misc'), -# 'acl_a_search' => array('lang' => 'Can re-index search tables', 'cat' => 'misc'), + 'acl_a_search' => array('lang' => 'Can manage search backends and settings', 'cat' => 'misc'), )); ?> \ No newline at end of file diff --git a/phpBB/language/en/acp/search.php b/phpBB/language/en/acp/search.php index e6aea37576..5ed8b85bc5 100644 --- a/phpBB/language/en/acp/search.php +++ b/phpBB/language/en/acp/search.php @@ -45,6 +45,7 @@ $lang = array_merge($lang, array( 'DELETING_INDEX_IN_PROGRESS_EXPLAIN' => 'The search backend is currently cleaning its index. This can take a few minutes.', 'FULLTEXT_MYSQL_INCOMPATIBLE_VERSION' => 'The MySQL fulltext backend can only be used with MySQL4 and above.', + 'FULLTEXT_MYSQL_NOT_MYISAM' => 'MySQL fulltext indexes can only be used with MyISAM tables.', 'FULLTEXT_MYSQL_SUBJECT_CARDINALITY' => 'Cardinality of the post_subject fulltext index (estimate of unique values)', 'FULLTEXT_MYSQL_TEXT_CARDINALITY' => 'Cardinality of the post_text fulltext index (estimate of unique values)', 'FULLTEXT_MYSQL_TOTAL_POSTS' => 'Total number of indexed posts',