Rename some of the config variables to eliminate issues caused by them containing phpbb_

git-svn-id: file:///svn/phpbb/trunk@5845 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Graham Eames 2006-04-25 19:20:01 +00:00
parent 91925b93d8
commit cb053afc47
2 changed files with 15 additions and 15 deletions

View file

@ -34,7 +34,7 @@ class fulltext_phpbb extends search_backend
{ {
global $config; global $config;
$this->word_length = array('min' => $config['fulltext_phpbb_min_search_chars'], 'max' => $config['fulltext_phpbb_max_search_chars']); $this->word_length = array('min' => $config['fulltext_min_search_chars'], 'max' => $config['fulltext_max_search_chars']);
$error = false; $error = false;
} }
@ -101,7 +101,7 @@ class fulltext_phpbb extends search_backend
// check word length // check word length
$clean_len = strlen(str_replace('*', '', $word)); $clean_len = strlen(str_replace('*', '', $word));
if (($clean_len < $config['fulltext_phpbb_min_search_chars']) || ($clean_len > $config['fulltext_phpbb_max_search_chars'])) if (($clean_len < $config['fulltext_min_search_chars']) || ($clean_len > $config['fulltext_max_search_chars']))
{ {
if ($prefixed) if ($prefixed)
{ {
@ -206,7 +206,7 @@ class fulltext_phpbb extends search_backend
for ($i = 0, $n = sizeof($text); $i < $n; $i++) for ($i = 0, $n = sizeof($text); $i < $n; $i++)
{ {
$text[$i] = trim($text[$i]); $text[$i] = trim($text[$i]);
if (strlen($text[$i]) < $config['fulltext_phpbb_min_search_chars'] || strlen($text[$i]) > $config['fulltext_phpbb_max_search_chars']) if (strlen($text[$i]) < $config['fulltext_min_search_chars'] || strlen($text[$i]) > $config['fulltext_max_search_chars'])
{ {
unset($text[$i]); unset($text[$i]);
} }
@ -724,7 +724,7 @@ class fulltext_phpbb extends search_backend
// Is the fulltext indexer disabled? If yes then we need not // Is the fulltext indexer disabled? If yes then we need not
// carry on ... it's okay ... I know when I'm not wanted boo hoo // carry on ... it's okay ... I know when I'm not wanted boo hoo
if (!$config['fulltext_phpbb_load_search_upd']) if (!$config['fulltext_load_search_upd'])
{ {
return; return;
} }
@ -894,7 +894,7 @@ class fulltext_phpbb extends search_backend
// Is the fulltext indexer disabled? If yes then we need not // Is the fulltext indexer disabled? If yes then we need not
// carry on ... it's okay ... I know when I'm not wanted boo hoo // carry on ... it's okay ... I know when I'm not wanted boo hoo
if (!$config['fulltext_phpbb_load_search_upd']) if (!$config['fulltext_load_search_upd'])
{ {
return; return;
} }
@ -1034,23 +1034,23 @@ class fulltext_phpbb extends search_backend
$tpl = ' $tpl = '
<dl> <dl>
<dt><label for="fulltext_phpbb_load_search_upd">' . $user->lang['YES_SEARCH_UPDATE'] . ':</label><br /><span>' . $user->lang['YES_SEARCH_UPDATE_EXPLAIN'] . '</span></dt> <dt><label for="fulltext_load_search_upd">' . $user->lang['YES_SEARCH_UPDATE'] . ':</label><br /><span>' . $user->lang['YES_SEARCH_UPDATE_EXPLAIN'] . '</span></dt>
<dd><input type="radio" id="fulltext_phpbb_load_search_upd" name="config[fulltext_phpbb_load_search_upd]" value="1"' . (($config['fulltext_phpbb_load_search_upd']) ? ' checked="checked"' : '') . ' class="radio" />&nbsp;' . $user->lang['YES'] . '&nbsp;&nbsp;<input type="radio" name="config[fulltext_phpbb_load_search_upd]" value="0"' . ((!$config['fulltext_phpbb_load_search_upd']) ? ' checked="checked"' : '') . ' class="radio" />&nbsp;' . $user->lang['NO'] . '</dd> <dd><input type="radio" id="fulltext_load_search_upd" name="config[fulltext_load_search_upd]" value="1"' . (($config['fulltext_load_search_upd']) ? ' checked="checked"' : '') . ' class="radio" />&nbsp;' . $user->lang['YES'] . '&nbsp;&nbsp;<input type="radio" name="config[fulltext_load_search_upd]" value="0"' . ((!$config['fulltext_load_search_upd']) ? ' checked="checked"' : '') . ' class="radio" />&nbsp;' . $user->lang['NO'] . '</dd>
</dl> </dl>
<dl> <dl>
<dt><label for="fulltext_phpbb_min_search_chars">' . $user->lang['MIN_SEARCH_CHARS'] . ':</label><br /><span>' . $user->lang['MIN_SEARCH_CHARS_EXPLAIN'] . '</span></dt> <dt><label for="fulltext_min_search_chars">' . $user->lang['MIN_SEARCH_CHARS'] . ':</label><br /><span>' . $user->lang['MIN_SEARCH_CHARS_EXPLAIN'] . '</span></dt>
<dd><input id="fulltext_phpbb_min_search_chars" type="text" size="3" maxlength="3" name="config[fulltext_phpbb_min_search_chars]" value="' . (int) $config['fulltext_phpbb_min_search_chars'] . '" /></dd> <dd><input id="fulltext_min_search_chars" type="text" size="3" maxlength="3" name="config[fulltext_min_search_chars]" value="' . (int) $config['fulltext_min_search_chars'] . '" /></dd>
</dl> </dl>
<dl> <dl>
<dt><label for="fulltext_phpbb_max_search_chars">' . $user->lang['MAX_SEARCH_CHARS'] . ':</label><br /><span>' . $user->lang['MAX_SEARCH_CHARS_EXPLAIN'] . '</span></dt> <dt><label for="fulltext_max_search_chars">' . $user->lang['MAX_SEARCH_CHARS'] . ':</label><br /><span>' . $user->lang['MAX_SEARCH_CHARS_EXPLAIN'] . '</span></dt>
<dd><input id="fulltext_phpbb_max_search_chars" type="text" size="3" maxlength="3" name="config[fulltext_phpbb_max_search_chars]" value="' . (int) $config['fulltext_phpbb_max_search_chars'] . '" /></dd> <dd><input id="fulltext_max_search_chars" type="text" size="3" maxlength="3" name="config[fulltext_max_search_chars]" value="' . (int) $config['fulltext_max_search_chars'] . '" /></dd>
</dl> </dl>
'; ';
// These are fields required in the config table // These are fields required in the config table
return array( return array(
'tpl' => $tpl, 'tpl' => $tpl,
'config' => array('fulltext_phpbb_load_search_upd' => 'bool', 'fulltext_phpbb_min_search_chars' => 'integer', 'fulltext_phpbb_max_search_chars' => 'integer') 'config' => array('fulltext_load_search_upd' => 'bool', 'fulltext_min_search_chars' => 'integer', 'fulltext_max_search_chars' => 'integer')
); );
} }
} }

View file

@ -87,9 +87,9 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('forward_pm', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('full_folder_action', '2'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('full_folder_action', '2');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_mysql_max_word_len', '254'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_mysql_max_word_len', '254');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_mysql_min_word_len', '4'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_mysql_min_word_len', '4');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_phpbb_load_search_upd', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_load_search_upd', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_phpbb_max_search_chars', '14'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_max_search_chars', '14');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_phpbb_min_search_chars', '3'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_min_search_chars', '3');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('gzip_compress', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('gzip_compress', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('hot_threshold', '25'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('hot_threshold', '25');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('icons_path', 'images/icons'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('icons_path', 'images/icons');