- use a_search permission

- check for MyISAM in fulltext_mysql


git-svn-id: file:///svn/phpbb/trunk@5639 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Nils Adermann 2006-03-16 16:22:32 +00:00
parent bfd169e7ac
commit f11d5dd02b
5 changed files with 20 additions and 5 deletions

View file

@ -504,8 +504,8 @@ class acp_search_info
'title' => 'ACP_SEARCH', 'title' => 'ACP_SEARCH',
'version' => '1.0.0', 'version' => '1.0.0',
'modes' => array( 'modes' => array(
'settings' => array('title' => 'ACP_SEARCH_SETTINGS', 'auth' => 'acl_a_server'), 'settings' => array('title' => 'ACP_SEARCH_SETTINGS', 'auth' => 'acl_a_search'),
'index' => array('title' => 'ACP_SEARCH_INDEX', 'auth' => 'acl_a_server'), 'index' => array('title' => 'ACP_SEARCH_INDEX', 'auth' => 'acl_a_search'),
), ),
); );
} }

View file

@ -48,6 +48,19 @@ class fulltext_mysql extends search_backend
return $user->lang['FULLTEXT_MYSQL_INCOMPATIBLE_VERSION']; 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 $sql = 'SHOW VARIABLES
LIKE \'ft\_%\''; LIKE \'ft\_%\'';
$result = $db->sql_query($sql); $result = $db->sql_query($sql);

View file

@ -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_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_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_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_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_styles', 1);
INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_uauth', 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 (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 (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 (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 (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_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_search');
# MCP # 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', '', ''); 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', '', '');

View file

@ -218,7 +218,7 @@ $lang = array_merge($lang, array(
'acl_a_reasons' => array('lang' => 'Can manage report/denial reasons', 'cat' => 'misc'), 'acl_a_reasons' => array('lang' => 'Can manage report/denial reasons', 'cat' => 'misc'),
# 'acl_a_backup' => array('lang' => 'Can backup database', 'cat' => 'misc'), # 'acl_a_backup' => array('lang' => 'Can backup database', 'cat' => 'misc'),
# 'acl_a_restore' => array('lang' => 'Can restore 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'),
)); ));
?> ?>

View file

@ -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.', '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_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_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_TEXT_CARDINALITY' => 'Cardinality of the post_text fulltext index (estimate of unique values)',
'FULLTEXT_MYSQL_TOTAL_POSTS' => 'Total number of indexed posts', 'FULLTEXT_MYSQL_TOTAL_POSTS' => 'Total number of indexed posts',