git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@101 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
nanosimbiot 2011-07-13 11:04:15 +00:00
commit e11a04bad0
5 changed files with 28 additions and 26 deletions

View file

@ -1002,7 +1002,7 @@ class attach_parent
{
$error_msg .= '<br />';
}
$error_msg .= $lang['Allowed_only_1st_post_attach'];
$error_msg .= $lang['ALLOWED_ONLY_1ST_POST_ATTACH'];
}
//bt end

View file

@ -57,7 +57,7 @@ $bb_cfg['css_ver'] = 1;
// Increase number of revision after update
$bb_cfg['tp_version'] = '2.0.2';
$bb_cfg['tp_release_state'] = 'TP II r100';
$bb_cfg['tp_release_state'] = 'TP II r101';
$bb_cfg['tp_release_date'] = '13-07-2011';
$bb_cfg['board_disabled_msg'] = 'форум временно отключен'; // 'forums temporarily disabled'; // show this msg if board has been disabled via ON/OFF trigger
@ -408,7 +408,7 @@ $bb_cfg['posts_cache_days_keep'] = 14;
$bb_cfg['max_post_length'] = 120000; // bytes
// Search
$bb_cfg['search_engine_type'] = 'sphinx'; // none, mysql, sphinx
$bb_cfg['search_engine_type'] = 'mysql'; // none, mysql, sphinx
$bb_cfg['sphinx_topic_titles_host'] = '127.0.0.1';
$bb_cfg['sphinx_topic_titles_port'] = 3312;
$bb_cfg['disable_ft_search_in_posts'] = false; // disable searching in post bodies

View file

@ -2852,7 +2852,7 @@ function get_title_match_topics ($title_match_sql, $limit = 500, $forum_ids = ar
if ($bb_cfg['search_engine_type'] == 'sphinx')
{
global $user;
global $user, $title_match; //$title_match - для поиска по постам и топикам (ещё не реализовано)
init_sphinx();
@ -2889,7 +2889,6 @@ function get_title_match_topics ($title_match_sql, $limit = 500, $forum_ids = ar
}
else if ($bb_cfg['search_engine_type'] == 'mysql')
{
$bool_mode = (true) ? " IN BOOLEAN MODE" : '';
$in_forums = ($forum_ids) ? "AND forum_id IN(". join(',', $forum_ids) .")" : '';
$sql = "
SELECT topic_id

View file

@ -535,8 +535,11 @@ else if ( ($submit || $confirm) && !$topic_has_new_posts )
if (defined('TORRENT_ATTACH_ID') && $bb_cfg['bt_newtopic_auto_reg'] && !$error_msg)
{
include(INC_DIR .'functions_torrent.php');
if(!get_torrent_info(TORRENT_ATTACH_ID))
{
tracker_register(TORRENT_ATTACH_ID, 'newtopic');
}
}
if ($mode == 'reply' && $post_info['topic_status'] == TOPIC_LOCKED)
{

View file

@ -453,16 +453,16 @@ if ($post_mode)
if ($text_match_sql)
{
$field_match = ($title_match) ? "t.topic_title" : "ps.search_words" ;
$tmp_text_match_sql = $text_match_sql;
if (mb_substr($tmp_text_match_sql, 0, 1) == '+') $tmp_text_match_sql = mb_substr($tmp_text_match_sql, 1);
$tmp_text_match_sql = str_replace(' +', ' ', $tmp_text_match_sql);
$tmp_text_match_sql = extract_search_words($tmp_text_match_sql, true);
$tmp_text_match_sql = str_replace(' ', '%', $tmp_text_match_sql);
$tmp_text_match_sql = str_replace('%%%', '%', $tmp_text_match_sql);
$tmp_text_match_sql = str_replace('%%', '%', $tmp_text_match_sql);
if ($tmp_text_match_sql == '' || $tmp_text_match_sql == '%') bb_die($lang['NO_SEARCH_MATCH']);
$SQL['WHERE'][] = "$field_match LIKE '%$tmp_text_match_sql%'";
$search_match_topics_csv = '';
if(!$forum_selected[0]) $forum_selected = array();
$title_match_topics = get_title_match_topics($text_match_sql, 500, $forum_selected);
if (!$search_match_topics_csv = join(',', $title_match_topics))
{
bb_die($lang['NO_SEARCH_MATCH']);
}
$SQL['WHERE'][] = "$tbl.topic_id IN($search_match_topics_csv)";
prevent_huge_searches($SQL);
}
@ -626,16 +626,16 @@ else
if ($text_match_sql)
{
$field_match = ($title_match) ? "t.topic_title" : "ps.search_words" ;
$tmp_text_match_sql = $text_match_sql;
if (mb_substr($tmp_text_match_sql, 0, 1) == '+') $tmp_text_match_sql = mb_substr($tmp_text_match_sql, 1);
$tmp_text_match_sql = str_replace(' +', ' ', $tmp_text_match_sql);
$tmp_text_match_sql = extract_search_words($tmp_text_match_sql, true);
$tmp_text_match_sql = str_replace(' ', '%', $tmp_text_match_sql);
$tmp_text_match_sql = str_replace('%%%', '%', $tmp_text_match_sql);
$tmp_text_match_sql = str_replace('%%', '%', $tmp_text_match_sql);
if ($tmp_text_match_sql == '' || $tmp_text_match_sql == '%') bb_die($lang['NO_SEARCH_MATCH']);
$SQL['WHERE'][] = "$field_match LIKE '%$tmp_text_match_sql%'";
$search_match_topics_csv = '';
if(!$forum_selected[0]) $forum_selected = array();
$title_match_topics = get_title_match_topics($text_match_sql, 500, $forum_selected);
if (!$search_match_topics_csv = join(',', $title_match_topics))
{
bb_die($lang['NO_SEARCH_MATCH']);
}
$SQL['WHERE'][] = "$tbl.topic_id IN($search_match_topics_csv)";
prevent_huge_searches($SQL);
}